[jboss-as7-dev] Question about EAR's and Class Loading
Andrig Miller
anmiller at redhat.com
Tue Mar 22 15:29:51 EDT 2011
So, I got past the class not found exception for logging (I actually had to add org.jboss.logmanager export), since I was using the logmanager.
So, after getting past that, and successfully creating a module for MySQL and defining my data source, I know have another interesting issue with my ear file.
I get the following:
Caused by: java.lang.ClassNotFoundException: services.entities.Product from [Module "deployment.OrderManagerApp.ear.OrderManagerEJB.jar:main" from Service Module Loader]
So, my ear is constructed in a fairly simple manner, and the same as it was for AS 5/6. I have an OrderManagerEntities.jar that has the entities in them, including the services.entities.Product that its complaining about, and that jar is in the ear, but the stateless session beans in OrderManagerEJB.jar reference it. It appears that there is not proper visibility to the entities in the other jar of the ear, and it cannot find it.
Is there something I need to do differently in my ear on AS 7, or is this a bug? I could probably work around it, and put the entities in the same jar as the stateless session beans, I suppose.
Andy
----- Original Message -----
> From: "David M. Lloyd" <david.lloyd at redhat.com>
> To: jboss-as7-dev at lists.jboss.org
> Sent: Tuesday, March 22, 2011 10:19:26 AM
> Subject: Re: [jboss-as7-dev] Question about JBoss Logging
> A dependency added to an EAR won't automatically propagate to its
> constituent deployments unless you declare it as exported:
>
> Dependency: org.jboss.logging export
>
> Not sure it's ever been tried - good luck! ;-)
>
> On 03/22/2011 11:16 AM, Andrig Miller wrote:
> > Jaikiran,
> >
> > I have tried the approach of adding the dependencies into the
> > MANIFEST.MF, but I still get the same class not found exception when
> > trying to use JBoss Logging. I have attached my ear file. Maybe
> > someone
> > could look at it, and see what I might be doing wrong.
> >
> > Andy
> >
> > ------------------------------------------------------------------------
> >
> > *From: *"Andrig Miller" <anmiller at redhat.com>
> > *To: *jpai at redhat.com
> > *Cc: *jboss-as7-dev at lists.jboss.org
> > *Sent: *Friday, March 18, 2011 9:51:31 AM
> > *Subject: *Re: [jboss-as7-dev] Question about JBoss Logging
> >
> > Okay, thanks. Ales pinged me via Skype and said the same thing.
> >
> > Thanks again.
> >
> > Andy
> >
> > ------------------------------------------------------------------------
> >
> > *From: *"Jaikiran Pai" <jpai at redhat.com>
> > *To: *"Andrig Miller" <anmiller at redhat.com>
> > *Cc: *jboss-as7-dev at lists.jboss.org
> > *Sent: *Friday, March 18, 2011 9:02:59 AM
> > *Subject: *Re: [jboss-as7-dev] Question about JBoss Logging
> >
> > You _don't_ need the jboss-structure.xml (or any other JBoss
> > specific descriptors).
> >
> > -Jaikiran
> > On Friday 18 March 2011 08:17 PM, Andrig Miller wrote:
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > *From: *"Jaikiran Pai" <jpai at redhat.com>
> > *To: *jboss-as7-dev at lists.jboss.org
> > *Sent: *Friday, March 18, 2011 7:21:57 AM
> > *Subject: *Re: [jboss-as7-dev] Question about JBoss
> > Logging
> >
> > On Friday 18 March 2011 06:39 PM, Andrig Miller
> > wrote:
> >
> >
> > Is JBoss Logging exposed as a public API through
> > the
> > module system?
> >
> > From what I remember, it's not.
> >
> > If not, what is the recommended approach?
> >
> > Add the following to META-INF/MANIFEST.MF:
> >
> > Manifest-Version: 1.0
> > Dependencies: org.jboss.logging
> >
> > Do, I have to do this, plus the jboss-structure.xml?
> >
> > Andy
> >
> >
> >
> > -Jaikiran
> >
> >
> > _______________________________________________
> > jboss-as7-dev mailing list
> > 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
>
>
> --
> - DML
> _______________________________________________
> 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