This content has been marked as final.
Show 7 replies
-
1. Re: Two EARs with shared EJB/WAR
nickarls Jan 24, 2008 5:56 AM (in response to aleeuwen)Do you have an jboss-app.xml with a loader-repository?
-
2. Re: Two EARs with shared EJB/WAR
aleeuwen Jan 24, 2008 7:52 AM (in response to aleeuwen)"nickarls" wrote:
Do you have an jboss-app.xml with a loader-repository?
That would be a no, however upon trying to use the following content in mij /META-INF/jboss-app.xml:<!DOCTYPE jboss-app PUBLIC "-//JBoss//DTD J2EE Application 1.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-app_4_2.dtd"> <jboss-app> <loader-repository> seam.jboss.org:loader=ORM-ear.ear </loader-repository> </jboss-app>
It gives me the following error:13:41:44,032 INFO [Contexts] starting up: org.jboss.seam.bpm.jbpm 13:41:44,069 ERROR [[/orm]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener java.lang.NoClassDefFoundError: org/w3c/dom/Document at org.jbpm.configuration.ObjectFactoryParser.parseElementsFromResource(ObjectFactoryParser.java:104) at org.jbpm.JbpmConfiguration.parseObjectFactory(JbpmConfiguration.java:312) at org.jbpm.JbpmConfiguration.parseResource(JbpmConfiguration.java:360) at org.jboss.seam.bpm.Jbpm.<clinit>(Jbpm.java:305)
If I don't have jboss-app.xml placed there it starts up okay. Clues?
Thank you very much so far :-) It does seem to scope Seam (etc) correctly. -
3. Re: Two EARs with shared EJB/WAR
aleeuwen Jan 24, 2008 8:29 AM (in response to aleeuwen)As a follow-up: Commenting out the <bpm:jbpm ... /> in the following components.xml
<?xml version="1.0" encoding="UTF-8"?> <components xmlns="http://jboss.com/products/seam/components" xmlns:core="http://jboss.com/products/seam/core" xmlns:persistence="http://jboss.com/products/seam/persistence" xmlns:drools="http://jboss.com/products/seam/drools" xmlns:bpm="http://jboss.com/products/seam/bpm" xmlns:security="http://jboss.com/products/seam/security" xmlns:mail="http://jboss.com/products/seam/mail" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.0.xsd http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.0.xsd http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.0.xsd http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd" > <core:manager concurrent-request-timeout="500" conversation-timeout="1200000" conversation-id-parameter="cid" /> <security:identity authenticate-method="#{authenticator.authenticate}" /> <mail:mail-session host="localhost" port="2525" username="test" password="test" /> <!-- For use with jBPM pageflow or process management --> <bpm:jbpm> <bpm:pageflow-definitions> <value>createdataset.jpdl.xml</value> <value>addhazardstojobindustry.jpdl.xml</value> <value>addhazardsfromscratch.jpdl.xml</value> </bpm:pageflow-definitions> </bpm:jbpm> </components>
works like a charm, however I need the pageflows! Once again: if I lose the previously posted jboss-app.xml this problem works, however I can't have the two ears on one server. -
4. Re: Two EARs with shared EJB/WAR
nickarls Jan 24, 2008 3:18 PM (in response to aleeuwen)There is some info here:
http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration
I don't have much experience in this since I haven't had that many classloading problems but following seam-gen example, try putting in the ear META-INF a jboss-app.xml with<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE jboss-app PUBLIC "-//JBoss//DTD J2EE Application 4.2//EN" "http://www.jboss.org/j2ee/dtd/jboss-app_4_2.dtd"> <jboss-app> <loader-repository>seam.jboss.org:loader=unique</loader-repository> </jboss-app>
and something other unique in the other ear.
It's a long shot since one would think that normally one ear couldn't possible have effect on the other but experience shows otherwise as you have experienced... -
5. Re: Two EARs with shared EJB/WAR
aleeuwen Jan 24, 2008 5:01 PM (in response to aleeuwen)"nickarls" wrote:
It's a long shot since one would think that normally one ear couldn't possible have effect on the other but experience shows otherwise as you have experienced...
Yeah I came across that page as well and have indeed put that jboss-app.xml in both of my ears with different 'unique' values. Reading my own post again and your response I realize that I didn't make myself all that clear:
What I meant was that the jboss-app.xml seems to work like a charm for the 'scoping' of the classes so that one EAR doesn't interfere with the other. However as soon as I use that jboss-app.xml in one of the ears I get an exception when the WAR is loaded: java.lang.NoClassDefFoundError: org/w3c/dom/Document when trying to initialize bpm (see earlier post).
So now I have the situation:
1. I don't use jboss-app.xml -> I can't have two EARs
2. I use jboss-app.xml -> I can have two EARs but one of them doesn't start.
Thanks so far for your time :-) and I still hope you or someone else has some pointers... -
6. Re: Two EARs with shared EJB/WAR
pmuir Jan 25, 2008 5:04 AM (in response to aleeuwen)You should use scoped classloading with Seam always.
You should fix your NCDFE error by including the correct library n your deployed archives. -
7. Re: Two EARs with shared EJB/WAR
aleeuwen Jan 25, 2008 8:02 AM (in response to aleeuwen)"pete.muir@jboss.org" wrote:
You should use scoped classloading with Seam always.
You should fix your NCDFE error by including the correct library n your deployed archives.
Apparently I generated my current project with JBoss Tools v2.0.0.RC1 which didn't create that file for me, so that's why I missed that part.
However looking more into the problem of the NCDFE, it appears is it was not so much an including of the correct library as much as an excluding of one. One of the libraries had part of org.w3c.dom.* packed inside their own library (sigh) which was apparently causing the classloading issue.
Thanks for your replies.