1 Reply Latest reply on Jul 11, 2017 12:46 AM by jaikiran

    JBOSS EAP 6.4 - module system and "custom code"

    premaut

      Dear JBoss developers,

       

      I'm working on JBOSS 6.4 and deploying a Java application which is packaged in an .EAR file. This is the "base product" and is deployed fine.

      I now want to use JBOSS's module system to load a library of custom Java classes to add on top of the base product. I was able to do this, however my custom code does not get included "correctly": it depends on (actually it extends) a class from the base application, inside the .EAR file. This works in e.g. WebSphere when simply putting the custom jar file in the classpath, but it doesn't seem to work here.

       

      Is there a way to get around this? Can I make the custom code "see" the base code?

       

      Relevant output of the server.log:

       

      16:22:35,291 WARN  [org.jboss.modules] (Application) Failed to define class *custom class* in Module "libs:main" from local module loader @53424146 (finder: local module finder @22cb855e (roots: *module directories*)): java.lang.LinkageError: Failed to link *custom class* (Module "libs:main" from local module loader...

      ...Caused by: java.lang.ClassNotFoundException: *base class from inside the .EAR file* from [Module "libs:main" from local module loader @53424146 (finder: local module ...