[jboss-user] [Installation, Configuration & DEPLOYMENT] - Deployment classpath issue in EAR
johndubchak
do-not-reply at jboss.com
Wed Oct 1 20:20:29 EDT 2008
Hi,
I have an EAR file that is structured like this:
EAR
| -> META-INF
| | -> application.xml
| -> WAR
| | -> META-INF
| | -> MANIFEST.MF -> Class-path: config.xml
| | -> WEB-INF -> lib/classes etc
| -> depA.jar
| -> depB.jar
| -> config.xml
The war contains a servlet that is loaded on startup. The servlet instantiates a class from depA.jar that uses a framework-type of class from depB.jar that (ideally) reads, and parses, the config.xml file.
However, the deployment produces a FileNotFoundException indicating no such file or directory. Here is a snippet of the stacktrace:
18:35:44,233 ERROR [FileUtils] java.io.FileNotFoundException: /config.xml (No such file or directory)
18:35:44,235 ERROR [STDERR] org.dom4j.DocumentException: Error on line -1 of document : Premature end of file. Nested exception: Premature end of file.
18:35:44,235 ERROR [STDERR] at org.dom4j.io.SAXReader.read(SAXReader.java:482)
18:35:44,235 ERROR [STDERR] at org.dom4j.DocumentHelper.parseText(DocumentHelper.java:278)
18:35:44,236 ERROR [STDERR] at com.foo.depA.util.ConfigAdapter.createConfiguration(ConfigAdapter.java:56)
18:35:44,236 ERROR [STDERR] at com.foo.war.ui.app.server.BootstrapServlet.createConfig(Unknown Source)
18:35:44,236 ERROR [STDERR] at com.foo.war.ui.app.server.BootstrapServlet.initializeBroker(Unknown Source)
18:35:44,236 ERROR [STDERR] at com.foo.war.app.server.BootstrapServlet.init(Unknown Source)
18:35:44,236 ERROR [STDERR] at javax.servlet.GenericServlet.init(GenericServlet.java:212)
18:35:44,236 ERROR [STDERR] at com.foo.war.ui.app.server.BootstrapServlet.init(Unknown Source)
18:35:44,236 ERROR [STDERR] at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
18:35:44,237 ERROR [STDERR] at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
18:35:44,237 ERROR [STDERR] at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4071)
18:35:44,237 ERROR [STDERR] at org.apache.catalina.core.StandardContext.start(StandardContext.java:4375)
18:35:44,237 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
18:35:44,237 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
I even included a Class-path entry in the MANIFEST.MF, for config.xml, in depA.jar and (for good measure) in depB.jar - still no luck.
What have I messed up with this configuration?
Thanks for any help,
John
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179908#4179908
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179908
More information about the jboss-user
mailing list