JBoss 7 tries to load module libraries from JBoss bin

I have a module described as follows:

<?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> 

In my jboss-deployment-structure.xml:

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

Jar files were found, but one of them is trying to access the .so library. This library exists in the "lib / linux" folder. But JBoss will consider% JBOSS_HOME% / bin / mylib.so. I tried to execute a naming convention (see jboss.org ), getting the same error:

Called: java.lang.UnsatisfiedLinkError: unable to load library: /usr/local/jboss/jboss-as-7.1.1.Final/bin/mylib.so

What am I doing wrong?

Edit If I put the .so file in the JBoss / bin folder, then the JVM crash will cause the JNI.

+3
source share
3 answers

I think this should solve your problem.

in module.xml module

 <?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> <dependencies> <module name="javax.api"/> <module name="THE JAR IT IS TRYING TO LOOK OUTSIDE"/> </dependencies> </module> 

you need to add the dependency of your module on the bank, it depends on how it works

0
source

The libraries I work with are installed with the program. I ended up writing my module with a relative path to the JAR, finding them directly in the lib program folder. For libraries, I do not need to reference them. They are loaded into the system because the program works as a service on the machine. The errors I received were more related to the problem of this program than to the JBoss problem.

0
source

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

0
source

All Articles