You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Nathan Mittler <na...@gmail.com> on 2006/07/27 03:49:35 UTC
classpath for MDBs
Hi,
I'm fairly new to EJB and am trying understand the way classpaths work in
Geronimo with respect to MDBs. I have a pretty simple app - just one MDB
that consumes from JMS and writes to the database. It requires a few jars
(hibernate, spring, etc) and I bundle those dependencies along with the MDB
into an ear (using Maven) and then deploy the whole app to Geronimo 1.1.
However, when the MDB receives JMS messages from AMQ, it doesn't seem to be
able to find any of the other classes in the EAR. I'm guessing this is due
to it being in the classloader of the AMQ connector, rather than the ear
upon invocation. I was able to fix this by manually adding all of the
dependencies to Geronimo's repository and then listing those dependencies in
the openejb-jar.xml. This seems to do the trick.
My questions are:
1) Is there a better way to deploy a module along with all its dependencies
to Geronimo - rather than wrapping them up in an ear? A tool perhaps?
2) Is there a more appropriate (and simpler) solution to the classloader
"problem" with MDBs? ( ... assuming I have diagnosed the problem correctly)
Thanks,
Nathan Mittler
Re: classpath for MDBs
Posted by John Sisson <jr...@gmail.com>.
We are aiming to have it out in approximately two weeks (assuming we
don't encounter any major problems).
Regards,
John
Nathan Mittler wrote:
> Thanks for the help, John ... that does appear to be my problem. I
> guess I'll wait for 1.1.1. Is there an ETA?
>
> On 7/27/06, *John Sisson* < jsisson.apache@internode.on.net
> <ma...@internode.on.net>> wrote:
>
> Reposting response without all those extra slashes..
>
> John
>
> John Sisson wrote:
> > Nathan Mittler wrote:
> >> Hi,
> >> I'm fairly new to EJB and am trying understand the way
> classpaths work
> >> in Geronimo with respect to MDBs. I have a pretty simple app -
> just
> >> one MDB that consumes from JMS and writes to the database. It
> >> requires a few jars (hibernate, spring, etc) and I bundle those
> >> dependencies along with the MDB into an ear (using Maven) and then
> >> deploy the whole app to Geronimo 1.1.
> >>
> >> However, when the MDB receives JMS messages from AMQ, it
> doesn't seem
> >> to be able to find any of the other classes in the EAR. I'm
> guessing
> >> this is due to it being in the classloader of the AMQ connector,
> >> rather than the ear upon invocation. I was able to fix this by
> >> manually adding all of the dependencies to Geronimo's
> repository and
> >> then listing those dependencies in the openejb-jar.xml. This
> seems to
> >> do the trick.
> >>
> >> My questions are:
> >> 1) Is there a better way to deploy a module along with all its
> >> dependencies to Geronimo - rather than wrapping them up in an
> ear? A
> >> tool perhaps?
> >> 2) Is there a more appropriate (and simpler) solution to the
> >> classloader "problem" with MDBs? ( ... assuming I have
> diagnosed the
> >> problem correctly)
>
> It could be that you are hitting a bug that should be fixed in the
> upcoming 1.1.1 release (
> http://issues.apache.org/jira/browse/GERONIMO-2125
> <http://issues.apache.org/jira/browse/GERONIMO-2125> ). Also
> check you
> are setting the "Class-Path:" entry in the META-INF/MANIFEST.MF
> file in the JAR containing the MDB to point to the libraries (e.g.
> hibernate) in the EAR (not that this will help you without the fix).
>
> Also see the following mail threads related to the issue:
>
> http://www.mail-archive.com/user@geronimo.apache.org/msg03407.html
> http://www.mail-archive.com/dev@geronimo.apache.org/msg26669.html
>
> John
> >
> > Regards,
> >
> > John
> >>
> >> Thanks,
> >> Nathan Mittler
> >
> >
>
>
Re: classpath for MDBs
Posted by Nathan Mittler <na...@gmail.com>.
Thanks for the help, John ... that does appear to be my problem. I guess
I'll wait for 1.1.1. Is there an ETA?
On 7/27/06, John Sisson <js...@internode.on.net> wrote:
>
> Reposting response without all those extra slashes..
>
> John
>
> John Sisson wrote:
> > Nathan Mittler wrote:
> >> Hi,
> >> I'm fairly new to EJB and am trying understand the way classpaths work
> >> in Geronimo with respect to MDBs. I have a pretty simple app - just
> >> one MDB that consumes from JMS and writes to the database. It
> >> requires a few jars (hibernate, spring, etc) and I bundle those
> >> dependencies along with the MDB into an ear (using Maven) and then
> >> deploy the whole app to Geronimo 1.1.
> >>
> >> However, when the MDB receives JMS messages from AMQ, it doesn't seem
> >> to be able to find any of the other classes in the EAR. I'm guessing
> >> this is due to it being in the classloader of the AMQ connector,
> >> rather than the ear upon invocation. I was able to fix this by
> >> manually adding all of the dependencies to Geronimo's repository and
> >> then listing those dependencies in the openejb-jar.xml. This seems to
> >> do the trick.
> >>
> >> My questions are:
> >> 1) Is there a better way to deploy a module along with all its
> >> dependencies to Geronimo - rather than wrapping them up in an ear? A
> >> tool perhaps?
> >> 2) Is there a more appropriate (and simpler) solution to the
> >> classloader "problem" with MDBs? ( ... assuming I have diagnosed the
> >> problem correctly)
>
> It could be that you are hitting a bug that should be fixed in the
> upcoming 1.1.1 release (
> http://issues.apache.org/jira/browse/GERONIMO-2125 ). Also check you
> are setting the "Class-Path:" entry in the META-INF/MANIFEST.MF
> file in the JAR containing the MDB to point to the libraries (e.g.
> hibernate) in the EAR (not that this will help you without the fix).
>
> Also see the following mail threads related to the issue:
>
> http://www.mail-archive.com/user@geronimo.apache.org/msg03407.html
> http://www.mail-archive.com/dev@geronimo.apache.org/msg26669.html
>
> John
> >
> > Regards,
> >
> > John
> >>
> >> Thanks,
> >> Nathan Mittler
> >
> >
>
Re: classpath for MDBs
Posted by John Sisson <js...@internode.on.net>.
Reposting response without all those extra slashes..
John
John Sisson wrote:
> Nathan Mittler wrote:
>> Hi,
>> I'm fairly new to EJB and am trying understand the way classpaths work
>> in Geronimo with respect to MDBs. I have a pretty simple app - just
>> one MDB that consumes from JMS and writes to the database. It
>> requires a few jars (hibernate, spring, etc) and I bundle those
>> dependencies along with the MDB into an ear (using Maven) and then
>> deploy the whole app to Geronimo 1.1.
>>
>> However, when the MDB receives JMS messages from AMQ, it doesn't seem
>> to be able to find any of the other classes in the EAR. I'm guessing
>> this is due to it being in the classloader of the AMQ connector,
>> rather than the ear upon invocation. I was able to fix this by
>> manually adding all of the dependencies to Geronimo's repository and
>> then listing those dependencies in the openejb-jar.xml. This seems to
>> do the trick.
>>
>> My questions are:
>> 1) Is there a better way to deploy a module along with all its
>> dependencies to Geronimo - rather than wrapping them up in an ear? A
>> tool perhaps?
>> 2) Is there a more appropriate (and simpler) solution to the
>> classloader "problem" with MDBs? ( ... assuming I have diagnosed the
>> problem correctly)
It could be that you are hitting a bug that should be fixed in the
upcoming 1.1.1 release (
http://issues.apache.org/jira/browse/GERONIMO-2125 ). Also check you
are setting the "Class-Path:" entry in the META-INF/MANIFEST.MF
file in the JAR containing the MDB to point to the libraries (e.g.
hibernate) in the EAR (not that this will help you without the fix).
Also see the following mail threads related to the issue:
http://www.mail-archive.com/user@geronimo.apache.org/msg03407.html
http://www.mail-archive.com/dev@geronimo.apache.org/msg26669.html
John
>
> Regards,
>
> John
>>
>> Thanks,
>> Nathan Mittler
>
>
Re: classpath for MDBs
Posted by John Sisson <jr...@gmail.com>.
Nathan Mittler wrote:
> Hi,
> I'm fairly new to EJB and am trying understand the way classpaths work
> in Geronimo with respect to MDBs. I have a pretty simple app - just
> one MDB that consumes from JMS and writes to the database. It
> requires a few jars (hibernate, spring, etc) and I bundle those
> dependencies along with the MDB into an ear (using Maven) and then
> deploy the whole app to Geronimo 1.1.
>
> However, when the MDB receives JMS messages from AMQ, it doesn't seem
> to be able to find any of the other classes in the EAR. I'm guessing
> this is due to it being in the classloader of the AMQ connector,
> rather than the ear upon invocation. I was able to fix this by
> manually adding all of the dependencies to Geronimo's repository and
> then listing those dependencies in the openejb-jar.xml. This seems to
> do the trick.
>
> My questions are:
> 1) Is there a better way to deploy a module along with all its
> dependencies to Geronimo - rather than wrapping them up in an ear? A
> tool perhaps?
> 2) Is there a more appropriate (and simpler) solution to the
> classloader "problem" with MDBs? ( ... assuming I have diagnosed the
> problem correctly)
//It could be that you are hitting a bug that should be fixed in the
upcoming 1.1.1 release (
//http://issues.apache.org/jira/browse/GERONIMO-2125 ). Also check you
are setting the "//Class-Path: entry"// in the META-INF///MANIFEST.MF
file in the JAR containing the MDB to point to the libraries (e.g.
hibernate) in the EAR (not that this will help you without the fix).
Also see the following mail threads related to the issue:
//http://www.mail-archive.com/user@geronimo.apache.org/msg03407.html
http://www.mail-archive.com/dev@geronimo.apache.org/msg26669.html
Regards,
John
>
> Thanks,
> Nathan Mittler
Re: classpath for MDBs
Posted by Kanchana Welagedara <ka...@gmail.com>.
Hi Nathan
Since you are using openejb.jar why don't you package the service as a "
jar" rather than ear?
Following are the deployment plans for Geronimo
File Standard Deployment Descriptors in the J2EE specification Apache
Geronimo specific Deployment plan Web Application Archive (WAR)
web.xmlunder the WEB-INF directory
geronimo-web.xml Enterprise Web application archive (EAR) application.xml
geronimo-application.xml J2EE Connector resources archive (RAR) ra.xml
geronimo-ra.xml J2EE client application archive (JAR) client.xml
geronimo-application-client.xml JAR containing EJBs ejb-jar.xml under the
META-INF directory openejb-jar.xml
Developers are working on the deployment plans for the geronimov1.1
yet.Itwill be on line
soon.I'm giving you the following resource url to get you an understanding
of how to deploy JMS and MDB with Geronimo .Have a look in this article
http://www-128.ibm.com/developerworks/edu/os-dw-os-ag-machine4.html
The Article has been provided you all the artifacts in geronimov1.0 version
you can use the geronimo_home/bin/upgrade Tool to generate the deployment
plan for the GeronimoV1.1
Hope this is useful for you
Regards,
Kanchana
On 7/27/06, Nathan Mittler <na...@gmail.com> wrote:
>
> Hi,
> I'm fairly new to EJB and am trying understand the way classpaths work in
> Geronimo with respect to MDBs. I have a pretty simple app - just one MDB
> that consumes from JMS and writes to the database. It requires a few jars
> (hibernate, spring, etc) and I bundle those dependencies along with the MDB
> into an ear (using Maven) and then deploy the whole app to Geronimo 1.1.
>
> However, when the MDB receives JMS messages from AMQ, it doesn't seem to
> be able to find any of the other classes in the EAR. I'm guessing this is
> due to it being in the classloader of the AMQ connector, rather than the ear
> upon invocation. I was able to fix this by manually adding all of the
> dependencies to Geronimo's repository and then listing those dependencies in
> the openejb-jar.xml. This seems to do the trick.
>
> My questions are:
> 1) Is there a better way to deploy a module along with all its
> dependencies to Geronimo - rather than wrapping them up in an ear? A tool
> perhaps?
> 2) Is there a more appropriate (and simpler) solution to the classloader
> "problem" with MDBs? ( ... assuming I have diagnosed the problem correctly)
>
> Thanks,
> Nathan Mittler
>