-
1. Re: Any configuration to load EAR component by single class loader ?
jameslivingston Jun 3, 2015 8:57 PM (in response to jboss234)You should do one of:
1) Have them only in the EJB and add a Class-Path MANIFEST.MF header to the WAR (portable)
2) Move those classes out of both the EJB and WAR sub deployments, and put them in a library jar at the EAR level (portable)
3) Have them only in the EJB and disable sub-deployment isolation in the EAR's jboss-deployment-structure.xml (JBoss specific)
-
2. Re: Any configuration to load EAR component by single class loader ?
jboss234 Jun 3, 2015 10:08 PM (in response to jameslivingston)My application (WAR) uses Cocoon framework, it uses XSP which get compiled to Java classes at runtime.
The problem with compiled XSP is that its not finding classes from EJB jar. It have to have classes in WAR file.
That's why I have classes at both locations (WAR and EJB jar)
How to handle it.
Thanks
-
3. Re: Any configuration to load EAR component by single class loader ?
jaikiran Jun 3, 2015 10:38 PM (in response to jboss234)James' suggestion #2 should work in that case and it's portable too:
2) Move those classes out of both the EJB and WAR sub deployments, and put them in a library jar at the EAR level (portable)
-
4. Re: Any configuration to load EAR component by single class loader ?
jboss234 Jun 4, 2015 11:30 PM (in response to jaikiran)Hi Jaikiran,
I tried 2nd option (Move those classes out of both the EJB and WAR sub deployments, and put them in a library jar at the EAR level (portable) ).
Cocoon is not able to detecting classes from library jar at the EAR level.
Based on XSP Cocoon generates java classes at runtime, these classes not able to find classes from library jar. Looks like these generated XSP java classes tries to find classes from same module (WAR file)
Any other configuration for wildfly to use single class loader to load EAR modules classes.
Thanks,
Dhaval
-
5. Re: Any configuration to load EAR component by single class loader ?
jaikiran Jun 4, 2015 11:43 PM (in response to jboss234)D P wrote:
Hi Jaikiran,
I tried 2nd option (Move those classes out of both the EJB and WAR sub deployments, and put them in a library jar at the EAR level (portable) ).
How exactly did you do that? You need to put that .jar file at .ear/lib/ folder. Have you created the lib folder in the .ear and placed that jar there?
-
6. Re: Any configuration to load EAR component by single class loader ?
jboss234 Jun 5, 2015 9:41 AM (in response to jaikiran)Yes I did create lib folder inside EAR and put my Jar there.
EAR----|
|------lib------|
| |--- util.jar
|--- EJB.jar
|
|--- WEBAPP.war
|
Thanks,
-
7. Re: Any configuration to load EAR component by single class loader ?
jaikiran Jun 5, 2015 9:45 AM (in response to jboss234)Please post the complete exception stacktrace that you see related to that class not being found and also post the output of:
jar -tf youear.ear
and
jar -tf util.jar