[jboss-as7-dev] Packaging utility classes in an .ear
Jaikiran Pai
jpai at redhat.com
Tue Jul 12 09:23:32 EDT 2011
Okay. Can you please post the entire exception stacktrace? That'll give
us an hint on what might be wrong. Also please post the exact contents
of the .ear/META-INF/MANIFEST.MF file.
-Jaikiran
On Tuesday 12 July 2011 06:51 PM, Francesco Marchioni wrote:
> >Just to be clear, did that newline fix the issue?
> Hi Jaikiran. No that didn't fix it. On the other hand, the library is
> correctly picked up in the EAR/lib folder, just not at the root of the
> archive.
>
> 2011/7/12 Jaikiran Pai <jpai at redhat.com <mailto:jpai at redhat.com>>
>
> On Tuesday 12 July 2011 05:22 PM, Francesco Marchioni wrote:
> > yes, thanks I've added the newline at the end of the Class-Path.
> Just to be clear, did that newline fix the issue?
>
> -Jaikiran
>
> >
> > 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
> <mailto:stuart.w.douglas at gmail.com>
> > <mailto:stuart.w.douglas at gmail.com
> <mailto: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
> <mailto:jboss-as7-dev at lists.jboss.org>
> <mailto:jboss-as7-dev at lists.jboss.org
> <mailto:jboss-as7-dev at lists.jboss.org>>
> > > https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
> >
> >
> >
> >
> > _______________________________________________
> > jboss-as7-dev mailing list
> > jboss-as7-dev at lists.jboss.org <mailto:jboss-as7-dev at lists.jboss.org>
> > https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org <mailto:jboss-as7-dev at lists.jboss.org>
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>
>
>
>
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
More information about the jboss-as7-dev
mailing list