Sure.<br><br>The sample.Test servlet (WebApp1.war) attempts to use the sample.Utility class (Utility.jar) packaged <br><br><br>16:23:58,576 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/WebApp1].[sample.Test]] (http--127.0.0.1-8080-1) Servlet.service() for servlet sample.Test threw exception: java.lang.ClassNotFoundException: sample.Utility from [Module "deployment.EnterpriseApp.ear.WebApp1.war:main" from Service Module Loader]<br>
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)<br> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)<br> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)<br>
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)<br> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:101)<br> at sample.Test.doGet(Test.java:36) [classes:]<br>
at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]<br> at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]<br>
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.0.CR4.jar:7.0.0.CR1]<br> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.0.CR4.jar:7.0.0.CR1]<br>
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.0.CR4.jar:7.0.0.CR1]<br> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.0.CR4.jar:7.0.0.CR1]<br>
at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.0.0.CR1.jar:7.0.0.CR1]<br> at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:49) [jboss-as-jpa-7.0.0.CR1.jar:7.0.0.CR1]<br>
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.0.CR4.jar:7.0.0.CR1]<br> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.0.CR4.jar:7.0.0.CR1]<br>
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.0.CR4.jar:7.0.0.CR1]<br> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.0.CR4.jar:7.0.0.CR1]<br>
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.0.CR4.jar:7.0.0.CR1]<br> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667) [jbossweb-7.0.0.CR4.jar:7.0.0.CR1]<br>
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [jbossweb-7.0.0.CR4.jar:7.0.0.CR1]<br> at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]<br><br><br>META-INF/MANIFEST.MF is<br><br>
Manifest-Version: 1.0<br>Class-Path: Utility.jar<br><br>(I've checked also without Manifest-Version: 1.0 declaration)<br>I guess tomorrow with some skull bash, will get it to work :-) )<br><div class="gmail_quote"><br>
<br><br>2011/7/12 Jaikiran Pai <span dir="ltr"><<a href="mailto:jpai@redhat.com">jpai@redhat.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Okay. Can you please post the entire exception stacktrace? That'll give<br>
us an hint on what might be wrong. Also please post the exact contents<br>
of the .ear/META-INF/MANIFEST.MF file.<br>
<br>
-Jaikiran<br>
<div class="im">On Tuesday 12 July 2011 06:51 PM, Francesco Marchioni wrote:<br>
> >Just to be clear, did that newline fix the issue?<br>
> Hi Jaikiran. No that didn't fix it. On the other hand, the library is<br>
> correctly picked up in the EAR/lib folder, just not at the root of the<br>
> archive.<br>
><br>
</div>> 2011/7/12 Jaikiran Pai <<a href="mailto:jpai@redhat.com">jpai@redhat.com</a> <mailto:<a href="mailto:jpai@redhat.com">jpai@redhat.com</a>>><br>
<div><div></div><div class="h5">><br>
> On Tuesday 12 July 2011 05:22 PM, Francesco Marchioni wrote:<br>
> > yes, thanks I've added the newline at the end of the Class-Path.<br>
> Just to be clear, did that newline fix the issue?<br>
><br>
> -Jaikiran<br>
><br>
> ><br>
> > What I find odd, is that adding to to jboss-deployment-structure.xml<br>
> > the resources element, deployment fails because the Utility<br>
> module has<br>
> > been already loaded.....<br>
> ><br>
> > <jboss-deployment-structure><br>
> ><br>
> > <deployment><br>
> ><br>
> > <resources><br>
> > <resource-root path="Utility.jar" /><br>
> > </resources><br>
> > </deployment><br>
> ><br>
> > </jboss-deployment-structure><br>
> ><br>
> ><br>
> > Caused by: org.jboss.msc.service.DuplicateServiceException: Service<br>
> ><br>
> jboss.module.information.service."deployment.EnterpriseApp.ear.Utility.jar".main<br>
> > is already registered<br>
> ><br>
> > ......walking in the dark........<br>
> ><br>
> ><br>
> > 2011/7/12 Stuart Douglas <<a href="mailto:stuart.w.douglas@gmail.com">stuart.w.douglas@gmail.com</a><br>
> <mailto:<a href="mailto:stuart.w.douglas@gmail.com">stuart.w.douglas@gmail.com</a>><br>
> > <mailto:<a href="mailto:stuart.w.douglas@gmail.com">stuart.w.douglas@gmail.com</a><br>
> <mailto:<a href="mailto:stuart.w.douglas@gmail.com">stuart.w.douglas@gmail.com</a>>>><br>
> ><br>
> > This should work, and there are tests for this in the test<br>
> suite.<br>
> > Are you missing a newline at the end of the Class-Path: line in<br>
> > the manifest by any chance?<br>
> ><br>
> > For some really annoying reason the JDK manifest processing<br>
> stuff<br>
> > does not work unless there is newline at the end of the file.<br>
> ><br>
> > Stuart<br>
> ><br>
> ><br>
> > On 12/07/2011, at 7:06 PM, Francesco Marchioni wrote:<br>
> ><br>
> > > Dear devs,<br>
> > > I'm testing .ear classloading with utility classes packaged in<br>
> > the Enterprise Archive.<br>
> > > The following case test fails, so I'm wondering if it's my<br>
> > misundertanding or a bug:<br>
> > ><br>
> > > application.ear<br>
> > > |<br>
> > > | Webapplication.war<br>
> > > | Utility.jar<br>
> > > |<br>
> > > | META-INF/MANIFEST.MF<br>
> > ><br>
> > > Manifest file contains the Java EE compliant dependency to the<br>
> > class Utility.jar<br>
> > > Class-Path: Utility.jar<br>
> > ><br>
> > > However, the Webapplication fails to load the classes from<br>
> > Utility.jar, which are instead correctly pickedup if I move them<br>
> > into the ear's lib folder.<br>
> > ><br>
> > > As side note - I've tried also stating isolated deployments to<br>
> > false, in jboss-deployment-structure.xml (which should default)<br>
> > without success:<br>
> > > <jboss-deployment-structure><br>
> > > <ear-subdeployments-isolated>false</ear-subdeployments-isolated><br>
> > > </jboss-deployment-structure><br>
> > ><br>
> > > Any suggestion?<br>
> > > Thanks a lot<br>
> > > Francesco<br>
> > > _______________________________________________<br>
> > > jboss-as7-dev mailing list<br>
> > > <a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a><br>
> <mailto:<a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a>><br>
> <mailto:<a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a><br>
> <mailto:<a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a>>><br>
> > > <a href="https://lists.jboss.org/mailman/listinfo/jboss-as7-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jboss-as7-dev</a><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > jboss-as7-dev mailing list<br>
> > <a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a> <mailto:<a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a>><br>
> > <a href="https://lists.jboss.org/mailman/listinfo/jboss-as7-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jboss-as7-dev</a><br>
><br>
> _______________________________________________<br>
> jboss-as7-dev mailing list<br>
> <a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a> <mailto:<a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a>><br>
> <a href="https://lists.jboss.org/mailman/listinfo/jboss-as7-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jboss-as7-dev</a><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> jboss-as7-dev mailing list<br>
> <a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/jboss-as7-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jboss-as7-dev</a><br>
<br>
_______________________________________________<br>
jboss-as7-dev mailing list<br>
<a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/jboss-as7-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jboss-as7-dev</a><br>
</div></div></blockquote></div><br>