JBoss 7试图从JBoss bin中加载模块库 [英] JBoss 7 is trying to load modules libraries from JBoss bin

查看:72
本文介绍了JBoss 7试图从JBoss bin中加载模块库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个模块,描述如下:

I got a module, described like this:

<?xml version="1.0" encoding="UTF-8"?>  
<module xmlns="urn:jboss:module:1.0" name="com.mymodule">  
  <resources> 
    <resource-root path="myFirstJar.jar" />
    <resource-root path="mySecondJar.jar" />
    <resource-root path="Lib/linux" />
  </resources>
</module>

在我的jboss-deployment-structure.xml中:

In my jboss-deployment-structure.xml:

<jboss-deployment-structure><deployment>
  <dependencies>
    <module name="com.mymodule" />
  </dependencies>
</deployment></jboss-deployment-structure>

找到了jar文件,但是其中一个试图访问.so库.该库位于"Lib/linux"文件夹中.但是JBoss将研究%JBOSS_HOME%/bin/mylib.so. 我试图遵循命名约定(请参见 jboss.org ),相同的错误:

The jar files are found, but one of them tries to access an .so library. That library exist in the "Lib/linux" folder. But JBoss will look into %JBOSS_HOME%/bin/mylib.so . I tried to follow the naming convention (see jboss.org), getting the same error:

原因:java.lang.UnsatisfiedLinkError:无法加载库:/usr/local/jboss/jboss-as-7.1.1.Final/bin/mylib.so

我在做什么错了?

修改 如果将.so文件放入我的JBoss/bin文件夹中,那么JVM会在JNI调用时崩溃.

Edit If I put the .so file into my JBoss/bin folder, then the JVM crash on a JNI call.

推荐答案

尝试将Lib/linux重命名为lib/linux-i686/和/或lib/linux-x86_64/.我们似乎在出厂的org.hornetq和org.jboss.as.web模块的模块设置中使用了此功能

Try renaming Lib/linux to lib/linux-i686/ and/or lib/linux-x86_64/. We seem to use this in our shipped module setup for the org.hornetq and org.jboss.as.web modules

这篇关于JBoss 7试图从JBoss bin中加载模块库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆