2 Replies Latest reply on Jan 27, 2014 3:44 AM by lokeshdotp

    Class loading problem in EAP 6.2


      Hi All,


      I have two enterprise applications packaged into two ears (client.ear, aserver.ear) both of them use common code such as interfaces, helpers etc which are placed as seperate modules in the modules directory (interfaces module, server-common module). Now I am facing this exception when trying to access web application in client.ear


      Caused by: java.lang.IllegalArgumentException: Can not set centina.sa.interfaces.nb.SystemSessionLocal field centina.sa.client.session.NetOmniaAnonymousBean.sys to centina.sa.interfaces.nb.SystemSessionLocal$$$view57


      Please let me know if you need any further details.

        • 1. Re: Class loading problem in EAP 6.2

          I managed to resolve this by using @EJB(lookup = "<jndi name>") instead of mapped name.


          But can someone please let me know if an ear say a.ear has a module called a-module.jar, which is exposed in the jboss-deploymnet-strucure.xml and is referenced by another ear b.ear in its jboss-deploymnet-structure.xml will there be two different instances in the JVM of the classes present in a-module.jar.








          |------b-module.jar(This references a-module.ear)

          1 of 1 people found this helpful
          • 2. Re: Class loading problem in EAP 6.2

            I finally managed to solve the class loading problem.


            I have incorrectly declared the dependency of b-module.jar on a-module.jar. Then I realised thanks to manual, that each sub deployment in EAR deployment is loaded as a module, I just added that sub deployments dependency (deployment.a.ear.a-module.jar:main )into the b.ear which solved the problem. Now it loads a single class of a-module.jar.