1

I have a simple java application using the RXTX library and it is working fine.No links errors and no builds errors.

I made another web dynamic application (JAVA EE) using the same library but when i try to deployed it on a Wildfly 10.0 i have this error :

java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier

Which i know means that either the library is not found or loaded multiple times.

Here is the library :

enter image description here

and here is the hierarchy of my application :

enter image description here

As you can see for the Eclipse part it is ok, but on the server-side it is not working.

I aleady read this and this, but it did not solve my problem.

I tried to put the .jar and the dlls of the library in multiple folders of the wildfly server, to change the classpaths ... but nothing.

Community
  • 1
  • 1
Mxsky
  • 749
  • 9
  • 27
  • Is that class `gnu.io.CommPortIdentifier.class` in the `RXTXcomm.jar`? Also make sure that library is in your WAR/lib directory in the packaged WAR too. – James R. Perkins Apr 21 '16 at 18:14
  • I resolved my problem "for now" by putting my RXTXComm.jar in the `wildfly-10.0.0.Final\standalone\deployments\Servlet.war\WEB-INF\lib` folder.However sometimes it seems to disappear and i have to repeat the process again ... I think that it may be because i do not have an XML file with infos on this library but i do not see how to configure that properly. – Mxsky Apr 22 '16 at 06:57
  • It seems like your `Servlet.war` is not being created correctly then. You need to look at how you build it and ensure that dependent libraries end up in the correct place. – James R. Perkins Apr 22 '16 at 16:54

0 Answers0