[jboss-as7-dev] Packaging utility classes in an .ear
Francesco Marchioni
marchioni.francesco at gmail.com
Tue Jul 12 07:52:51 EDT 2011
yes, thanks I've added the newline at the end of the Class-Path.
What I find odd, is that adding to to jboss-deployment-structure.xml the
resources element, deployment fails because the Utility module has been
already loaded.....
<jboss-deployment-structure>
<deployment>
<resources>
<resource-root path="Utility.jar" />
</resources>
</deployment>
</jboss-deployment-structure>
Caused by: org.jboss.msc.service.DuplicateServiceException: Service
jboss.module.information.service."deployment.EnterpriseApp.ear.Utility.jar".main
is already registered
......walking in the dark........
2011/7/12 Stuart Douglas <stuart.w.douglas at gmail.com>
> This should work, and there are tests for this in the test suite. Are you
> missing a newline at the end of the Class-Path: line in the manifest by any
> chance?
>
> For some really annoying reason the JDK manifest processing stuff does not
> work unless there is newline at the end of the file.
>
> Stuart
>
>
> On 12/07/2011, at 7:06 PM, Francesco Marchioni wrote:
>
> > Dear devs,
> > I'm testing .ear classloading with utility classes packaged in the
> Enterprise Archive.
> > The following case test fails, so I'm wondering if it's my
> misundertanding or a bug:
> >
> > application.ear
> > |
> > | Webapplication.war
> > | Utility.jar
> > |
> > | META-INF/MANIFEST.MF
> >
> > Manifest file contains the Java EE compliant dependency to the class
> Utility.jar
> > Class-Path: Utility.jar
> >
> > However, the Webapplication fails to load the classes from Utility.jar,
> which are instead correctly pickedup if I move them into the ear's lib
> folder.
> >
> > As side note - I've tried also stating isolated deployments to false, in
> jboss-deployment-structure.xml (which should default) without success:
> > <jboss-deployment-structure>
> > <ear-subdeployments-isolated>false</ear-subdeployments-isolated>
> > </jboss-deployment-structure>
> >
> > Any suggestion?
> > Thanks a lot
> > Francesco
> > _______________________________________________
> > jboss-as7-dev mailing list
> > jboss-as7-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-as7-dev/attachments/20110712/bf03e599/attachment.html
More information about the jboss-as7-dev
mailing list