ivanorro
asked on
JBoss multiple ear files
I have two ear files: A.ear and B.ear. How can I make JBoss start both applications? Just the A.ear works.
for a.ear application.xml should be like this
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
<display-name>a</display-name>
<web>
<web-uri>web.war</web-uri>
<context-root>/A</context-root>
</web>
</module>
<ejb>a.jar</ejb>
</module>
</application>
..............................
for b.ear application.xml should be like this
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
<display-name>b</display-name>
<web>
<web-uri>web.war</web-uri>
<context-root>/B</context-root>
</web>
</module>
<ejb>b.jar</ejb>
</module>
</application>
How are you verifying that your ear "does not work" ? Do you see any errors in logs ?
ASKER
I know it does not work because when I start JBoss I get the following error message:
org.jboss.deployment.Deplo ymentExcep tion: Trying to install an already registered mbean: jboss.jca:name=jca/JETI/Ad apter,serv ice=TxCM
org.jboss.deployment.Deplo
so you have deployed two ears in the same jboss.can you send server.log file?
ASKER
in the server.log file at line 3315 below errror is coming.can you resolve this error?
2008-10-30 11:31:55,031 DEBUG [org.jboss.web.tomcat.tc5. Tomcat5] warURL: file:/C:/jboss-4.0.1sp1/se rver/defau lt/deploy/ jmx-consol e.war/
2008-10-30 11:31:55,062 ERROR [org.jboss.metadata.XmlFil eLoader] The markup in the document following the root element must be well-formed.:2:8
org.xml.sax.SAXParseExcept ion: The markup in the document following the root element must be well-formed.
2008-10-30 11:31:55,093 WARN [org.jboss.web.tomcat.tc5. Tomcat5] Failed to parse descriptors for war(file:/C:/jboss-4.0.1sp 1/server/d efault/dep loy/jmx-co nsole.war/ )
org.jboss.deployment.Deplo ymentExcep tion: Failed to parse WEB-INF/jboss-web.xml; - nested throwable: (org.jboss.deployment.Depl oymentExce ption: The markup in the document following the root element must be well-formed.; - nested throwable: (org.xml.sax.SAXParseExcep tion: The markup in the document following the root element must be well-formed.))
at org.jboss.web.AbstractWebC ontainer.p arseMetaDa ta(Abstrac tWebContai ner.java:6 55)
at org.jboss.web.AbstractWebC ontainer.i nit(Abstra ctWebConta iner.java: 294)
at org.jboss.deployment.MainD eployer.in it(MainDep loyer.java :828)
at org.jboss.deployment.MainD eployer.de ploy(MainD eployer.ja va:765)
at org.jboss.deployment.MainD eployer.de ploy(MainD eployer.ja va:738)
at sun.reflect.GeneratedMetho dAccessor4 9.invoke(U nknown Source)
at sun.reflect.DelegatingMeth odAccessor Impl.invok e(Delegati ngMethodAc cessorImpl .java:25)
at org.apache.xerces.parsers. DOMParser. parse(Unkn own Source)
at org.apache.xerces.jaxp.Doc umentBuild erImpl.par se(Unknown Source)
at org.jboss.metadata.XmlFile Loader.get Document(X mlFileLoad er.java:31 3)
at org.jboss.metadata.XmlFile Loader.get Document(X mlFileLoad er.java:25 7)
at org.jboss.web.AbstractWebC ontainer.p arseMetaDa ta(Abstrac tWebContai ner.java:6 48)
at org.jboss.web.AbstractWebC ontainer.i nit(Abstra ctWebConta iner.java: 294)
at org.jboss.deployment.MainD eployer.in it(MainDep loyer.java :828)
at org.jboss.deployment.MainD eployer.de ploy(MainD eployer.ja va:765)
2008-10-30 11:31:55,031 DEBUG [org.jboss.web.tomcat.tc5.
2008-10-30 11:31:55,062 ERROR [org.jboss.metadata.XmlFil
org.xml.sax.SAXParseExcept
2008-10-30 11:31:55,093 WARN [org.jboss.web.tomcat.tc5.
org.jboss.deployment.Deplo
at org.jboss.web.AbstractWebC
at org.jboss.web.AbstractWebC
at org.jboss.deployment.MainD
at org.jboss.deployment.MainD
at org.jboss.deployment.MainD
at sun.reflect.GeneratedMetho
at sun.reflect.DelegatingMeth
at org.apache.xerces.parsers.
at org.apache.xerces.jaxp.Doc
at org.jboss.metadata.XmlFile
at org.jboss.metadata.XmlFile
at org.jboss.web.AbstractWebC
at org.jboss.web.AbstractWebC
at org.jboss.deployment.MainD
at org.jboss.deployment.MainD
ASKER
Sorry, that was a mistake. I have done so many changes in the configuration... Here is the correct server.log
server.log
server.log
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
A.ear as http://localhost:8080/A
B.ear as http://localhost:8080/B