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/10/03 00:29:26 UTC

Re: classloaders for non-JMS MDBs

Hey guys,
Does anyone have any more insight as to what may be going on here?

Thanks,
Nate

On 9/30/06, Nathan Mittler <na...@gmail.com> wrote:
>
> David, Thanks for the response.  Sure thing - I've captured the stack
> trace from the ejbCreate method of both MDBs.
>
> First, here's the stack trace from the JMS MDB:
>
> java.lang.Exception: Stack trace
>         at java.lang.Thread.dumpStack(Thread.java:1158)
>         at com.test.CourierPositionMDB.ejbCreate(CourierPositionMDB.java
> :32)
>         at com.test.CourierPositionMDB$$FastClassByCGLIB$$c60caec2.invoke
> (<generated>)
>         at org.openejb.slsb.EJBCreateMethod.execute(EJBCreateMethod.java
> :94)
>         at org.openejb.dispatch.DispatchInterceptor.invoke(
> DispatchInterceptor.java:72)
>         at
> org.apache.geronimo.naming.java.ComponentContextInterceptor.invoke(
> ComponentContextInterceptor.java:56)
>         at org.openejb.mdb.MDBInstanceContext.ejbCreate(
> MDBInstanceContext.java:153)
>         at org.openejb.mdb.MDBInstanceFactory.createInstance(
> MDBInstanceFactory.java:72)
>         at org.openejb.util.SoftLimitedInstancePool.acquire(
> SoftLimitedInstancePool.java:81)
>         at org.openejb.mdb.MDBInstanceInterceptor.invoke(
> MDBInstanceInterceptor.java:81)
>         at org.openejb.SystemExceptionInterceptor.invoke(
> SystemExceptionInterceptor.java:82)
>         at org.openejb.mdb.MDBContainer.invoke(MDBContainer.java:242)
>         at org.openejb.mdb.EndpointHandler.invoke(EndpointHandler.java
> :180)
>         at org.openejb.mdb.EndpointHandler.intercept(EndpointHandler.java
> :223)
>         at
> org.openejb.mdb.EndpointProxy$$EnhancerByCGLIB$$e708dc8a.onMessage
> (<generated>)
>         at
> org.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(
> MessageEndpointProxy.java:117)
>         at org.activemq.ra.MessageEndpointProxy.onMessage(
> MessageEndpointProxy.java:57)
>         at org.activemq.ActiveMQSession.deliver(ActiveMQSession.java:569)
>         at org.activemq.ActiveMQSession.run(ActiveMQSession.java:551)
>         at org.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java
> :165)
>         at org.apache.geronimo.connector.work.WorkerContext.run(
> WorkerContext.java:291)
>         at org.apache.geronimo.pool.ThreadPool$1.run(ThreadPool.java:172)
>         at
> org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run(
> ThreadPool.java:289)
>         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> Source)
>         at java.lang.Thread.run(Thread.java:595)
>
> ... and here's the stack trace from the custom MDB:
>
> java.lang.Exception: Stack trace
>         at java.lang.Thread.dumpStack(Thread.java:1158)
>         at com.test.CourierPositionMDB.ejbCreate(CourierPositionMDB.java
> :56)
>         at com.test.CourierPositionMDB$$FastClassByCGLIB$$adae8521.invoke
> (<generated>)
>         at org.openejb.slsb.EJBCreateMethod.execute(EJBCreateMethod.java
> :94)
>         at org.openejb.dispatch.DispatchInterceptor.invoke(
> DispatchInterceptor.java:72)
>         at
> org.apache.geronimo.naming.java.ComponentContextInterceptor.invoke(
> ComponentContextInterceptor.java:56)
>         at org.openejb.mdb.MDBInstanceContext.ejbCreate(
> MDBInstanceContext.java:153)
>         at org.openejb.mdb.MDBInstanceFactory.createInstance(
> MDBInstanceFactory.java:72)
>         at org.openejb.util.SoftLimitedInstancePool.acquire(
> SoftLimitedInstancePool.java:81)
>         at org.openejb.mdb.MDBInstanceInterceptor.invoke(
> MDBInstanceInterceptor.java:81)
>         at org.openejb.SystemExceptionInterceptor.invoke(
> SystemExceptionInterceptor.java:82)
>         at org.openejb.mdb.MDBContainer.invoke(MDBContainer.java:242)
>         at org.openejb.mdb.EndpointHandler.invoke(EndpointHandler.java
> :180)
>         at org.openejb.mdb.EndpointHandler.intercept(EndpointHandler.java
> :223)
>         at
> org.openejb.mdb.EndpointProxy$$EnhancerByCGLIB$$224d7765.onCourierPosition
> (<generated>)
>         at com.test.ra.EndpointWorker$1.run(EndpointWorker.java:109)
>         at org.apache.geronimo.connector.work.WorkerContext.run(
> WorkerContext.java:291)
>         at org.apache.geronimo.pool.ThreadPool$1.run(ThreadPool.java:172)
>         at
> org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run(
> ThreadPool.java:289)
>         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> Source)
>         at java.lang.Thread.run(Thread.java:595)
>
> Thanks,
> Nate
>
>
> On 9/30/06, David Jencks <da...@yahoo.com> wrote:
> >
> >
> > On Sep 30, 2006, at 8:27 AM, Nathan Mittler wrote:
> >
> > > Hi,
> > > Has anyone created custom connectors with G?
> > >
> > > I have a two versions of a simple MDB - one that implements
> > > javax.jms.MessageListener and one that implements a custom
> > > interface.  When onMessage is invoked by the AMQ RAR, I appear to
> > > be in the context of the MDB's classloader and can use dependencies
> > > specified in the MDB's deployment plan.  However, when I invoke the
> > > MDB from a custom connector, it seems to be in the context of the
> > > RAR classloader and I don't have access to any of the MDB's
> > > dependencies.  I assume that I'm doing something bone-headed in my
> > > connector, but I'm not seeing it.  Any ideas?
> >
> > It oughtta work :-).  I don't think it's your connector.  Would it be
> > difficult to get stack traces from the mdbs to see if the paths to
> > get to the mdb are different?
> >
> > thanks
> > david jencks
> >
> > >
> > > Thanks for the help,
> > > Nate
> >
> >
>

geronimo and javamail ( decoding problems)

Posted by sreepriya ramakrishnan <sr...@yahoo.com>.
Hi all ,


I added geronimo-javamail_1.3.1_spec-1.0.jar into the
classpath and compiled a standalone java class with
the following code. All I am trying here is to convert
a base 64 version of a string using the MimeUtility
class provided by javamail(in this case the jar
specified holds this class).

I find that the same value is returned instead of the
the decoded value. I tried placing the javamails 1.3.1
version of jar file and it converted properly.

This is a test program taht I have written before I
add it to a class that will run in Geronimo.

Please let me know as to what I am doing wrong here or
if there is somethign wrong with javamail provided by
Geronimo.

Thanks,
Priya



String userpassEncoded = "dXNlcjE6c3lzdGVt";
ByteArrayInputStream stringBufferstrema = new
ByteArrayInputStream(userpassEncoded.getBytes());
		InputStream is =
MimeUtility.decode(stringBufferstrema,"base64");


InputStream theDecodedStream =
MimeUtility.decode(stringBufferstrema,"base64");
            String theText = "";
            int theByte;
            while ((theByte = theDecodedStream.read())
!= -1)
            {
                theText += (char)theByte;
            }

            System.out.println(theText);


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: classloaders for non-JMS MDBs

Posted by David Jencks <da...@yahoo.com>.
On Oct 2, 2006, at 4:13 PM, Nathan Mittler wrote:

> I'm pretty new to EJB so it might take me a while to figure out how  
> to set it up for debugging on the server.  If you know of some docs  
> that would get me started, it would be appreciated.  I'll keep you  
> posted as to what I find.

Start geronimo like

java -Xdebug -Xnoagent -Djava.compiler=NONE - 
Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -jar bin/ 
server.jar --long

open the openejb project in your favorite IDE and remote-debug on  
port 5005.... put a breakpoint where the TCCL is being set in  
setupDelivery and see if you hit it and what the classloader is.

Easy in IDEA.... don't know about any other IDEs

I'm not sure which g/openejb version you are on, but you should be  
able to check out something appropriate from

http://svn.apache.org/repos/asf/incubator/openejb/tags/v2_1_1/openejb2

thanks
david jencks

>
> Thanks,
> Nate
>
> On 10/2/06, David Jencks <da...@yahoo.com> wrote:
> The code paths look identical to me.  I haven't had time to set up  
> a test case.  Can you get set up to debug in openejb and see what  
> is happening in openejb EndpointHandler.setupDelivery?  That's  
> where we should be setting the application classloader onto the  
> thread.  (I'm looking at apache-incubator openejb2 trunk but I  
> think the same code applies to all released openejb2 versions)
>
> thanks
> david jencks
>
> On Oct 2, 2006, at 3:29 PM, Nathan Mittler wrote:
>
>> Hey guys,
>> Does anyone have any more insight as to what may be going on here?
>>
>> Thanks,
>> Nate
>>
>> On 9/30/06,  Nathan Mittler <nathan.mittler@gmail.com > wrote:
>> David, Thanks for the response.  Sure thing - I've captured the  
>> stack trace from the ejbCreate method of both MDBs.
>>
>> First, here's the stack trace from the JMS MDB:
>>
>> java.lang.Exception: Stack trace
>>         at java.lang.Thread.dumpStack(Thread.java:1158)
>>         at com.test.CourierPositionMDB.ejbCreate 
>> (CourierPositionMDB.java :32)
>>         at com.test.CourierPositionMDB$$FastClassByCGLIB$ 
>> $c60caec2.invoke(<generated>)
>>         at org.openejb.slsb.EJBCreateMethod.execute 
>> (EJBCreateMethod.java:94)
>>         at org.openejb.dispatch.DispatchInterceptor.invoke  
>> (DispatchInterceptor.java:72)
>>         at  
>> org.apache.geronimo.naming.java.ComponentContextInterceptor.invoke 
>> (ComponentContextInterceptor.java:56)
>>         at org.openejb.mdb.MDBInstanceContext.ejbCreate 
>> (MDBInstanceContext.java :153)
>>         at org.openejb.mdb.MDBInstanceFactory.createInstance 
>> (MDBInstanceFactory.java:72)
>>         at org.openejb.util.SoftLimitedInstancePool.acquire 
>> (SoftLimitedInstancePool.java:81)
>>         at org.openejb.mdb.MDBInstanceInterceptor.invoke  
>> (MDBInstanceInterceptor.java:81)
>>         at org.openejb.SystemExceptionInterceptor.invoke 
>> (SystemExceptionInterceptor.java:82)
>>         at org.openejb.mdb.MDBContainer.invoke(MDBContainer.java:242)
>>         at org.openejb.mdb.EndpointHandler.invoke  
>> (EndpointHandler.java:180)
>>         at org.openejb.mdb.EndpointHandler.intercept 
>> (EndpointHandler.java:223)
>>         at org.openejb.mdb.EndpointProxy$$EnhancerByCGLIB$ 
>> $e708dc8a.onMessage(<generated>)
>>         at org.activemq.ra.MessageEndpointProxy 
>> $MessageEndpointAlive.onMessage(MessageEndpointProxy.java:117)
>>         at org.activemq.ra.MessageEndpointProxy.onMessage 
>> (MessageEndpointProxy.java:57)
>>         at org.activemq.ActiveMQSession.deliver  
>> (ActiveMQSession.java:569)
>>         at org.activemq.ActiveMQSession.run(ActiveMQSession.java:551)
>>         at org.activemq.ra.ServerSessionImpl.run 
>> (ServerSessionImpl.java:165)
>>         at org.apache.geronimo.connector.work.WorkerContext.run  
>> (WorkerContext.java:291)
>>         at org.apache.geronimo.pool.ThreadPool$1.run 
>> (ThreadPool.java:172)
>>         at org.apache.geronimo.pool.ThreadPool 
>> $ContextClassLoaderRunnable.run(ThreadPool.java:289)
>>         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor 
>> $Worker.run (Unknown Source)
>>         at java.lang.Thread.run(Thread.java:595)
>>
>> ... and here's the stack trace from the custom MDB:
>>
>> java.lang.Exception: Stack trace
>>         at java.lang.Thread.dumpStack(Thread.java:1158)
>>         at com.test.CourierPositionMDB.ejbCreate 
>> (CourierPositionMDB.java:56)
>>         at com.test.CourierPositionMDB$$FastClassByCGLIB$ 
>> $adae8521.invoke(<generated>)
>>         at org.openejb.slsb.EJBCreateMethod.execute  
>> (EJBCreateMethod.java:94)
>>         at org.openejb.dispatch.DispatchInterceptor.invoke 
>> (DispatchInterceptor.java:72)
>>         at  
>> org.apache.geronimo.naming.java.ComponentContextInterceptor.invoke 
>> (ComponentContextInterceptor.java :56)
>>         at org.openejb.mdb.MDBInstanceContext.ejbCreate 
>> (MDBInstanceContext.java:153)
>>         at org.openejb.mdb.MDBInstanceFactory.createInstance 
>> (MDBInstanceFactory.java:72)
>>         at org.openejb.util.SoftLimitedInstancePool.acquire  
>> (SoftLimitedInstancePool.java:81)
>>         at org.openejb.mdb.MDBInstanceInterceptor.invoke 
>> (MDBInstanceInterceptor.java:81)
>>         at org.openejb.SystemExceptionInterceptor.invoke 
>> (SystemExceptionInterceptor.java:82)
>>         at org.openejb.mdb.MDBContainer.invoke(MDBContainer.java:242)
>>         at org.openejb.mdb.EndpointHandler.invoke 
>> (EndpointHandler.java:180)
>>         at org.openejb.mdb.EndpointHandler.intercept 
>> (EndpointHandler.java :223)
>>         at org.openejb.mdb.EndpointProxy$$EnhancerByCGLIB$ 
>> $224d7765.onCourierPosition(<generated>)
>>         at com.test.ra.EndpointWorker$1.run(EndpointWorker.java:109)
>>         at org.apache.geronimo.connector.work.WorkerContext.run  
>> (WorkerContext.java:291)
>>         at org.apache.geronimo.pool.ThreadPool$1.run 
>> (ThreadPool.java:172)
>>         at org.apache.geronimo.pool.ThreadPool 
>> $ContextClassLoaderRunnable.run(ThreadPool.java:289)
>>         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor 
>> $Worker.run (Unknown Source)
>>         at java.lang.Thread.run(Thread.java:595)
>>
>> Thanks,
>> Nate
>>
>>
>>
>> On 9/30/06,  David Jencks <david_jencks@yahoo.com > wrote:
>>
>> On Sep 30, 2006, at 8:27 AM, Nathan Mittler wrote:
>>
>> > Hi,
>> > Has anyone created custom connectors with G?
>> >
>> > I have a two versions of a simple MDB - one that implements
>> > javax.jms.MessageListener and one that implements a custom
>> > interface.  When onMessage is invoked by the AMQ RAR, I appear to
>> > be in the context of the MDB's classloader and can use dependencies
>> > specified in the MDB's deployment plan.  However, when I invoke the
>> > MDB from a custom connector, it seems to be in the context of the
>> > RAR classloader and I don't have access to any of the MDB's
>> > dependencies.  I assume that I'm doing something bone-headed in my
>> > connector, but I'm not seeing it.  Any ideas?
>>
>> It oughtta work :-).  I don't think it's your connector.  Would it be
>> difficult to get stack traces from the mdbs to see if the paths to
>> get to the mdb are different?
>>
>> thanks
>> david jencks
>>
>> >
>> > Thanks for the help,
>> > Nate
>>
>>
>>
>
>


Re: classloaders for non-JMS MDBs

Posted by Nathan Mittler <na...@gmail.com>.
I'm pretty new to EJB so it might take me a while to figure out how to set
it up for debugging on the server.  If you know of some docs that would get
me started, it would be appreciated.  I'll keep you posted as to what I
find.

Thanks,
Nate

On 10/2/06, David Jencks <da...@yahoo.com> wrote:
>
> The code paths look identical to me.  I haven't had time to set up a test
> case.  Can you get set up to debug in openejb and see what is happening in
> openejb EndpointHandler.setupDelivery?  That's where we should be setting
> the application classloader onto the thread.  (I'm looking at
> apache-incubator openejb2 trunk but I think the same code applies to all
> released openejb2 versions)
> thanks
> david jencks
>
> On Oct 2, 2006, at 3:29 PM, Nathan Mittler wrote:
>
> Hey guys,
> Does anyone have any more insight as to what may be going on here?
>
> Thanks,
> Nate
>
> On 9/30/06, Nathan Mittler <na...@gmail.com> wrote:
> >
> > David, Thanks for the response.  Sure thing - I've captured the stack
> > trace from the ejbCreate method of both MDBs.
> >
> > First, here's the stack trace from the JMS MDB:
> >
> > java.lang.Exception: Stack trace
> >         at java.lang.Thread.dumpStack(Thread.java:1158)
> >         at com.test.CourierPositionMDB.ejbCreate(CourierPositionMDB.java
> > :32)
> >         at
> > com.test.CourierPositionMDB$$FastClassByCGLIB$$c60caec2.invoke
> > (<generated>)
> >         at org.openejb.slsb.EJBCreateMethod.execute(EJBCreateMethod.java
> > :94)
> >         at org.openejb.dispatch.DispatchInterceptor.invoke(
> > DispatchInterceptor.java:72)
> >         at
> > org.apache.geronimo.naming.java.ComponentContextInterceptor.invoke(
> > ComponentContextInterceptor.java:56)
> >         at org.openejb.mdb.MDBInstanceContext.ejbCreate(
> > MDBInstanceContext.java:153)
> >         at org.openejb.mdb.MDBInstanceFactory.createInstance(
> > MDBInstanceFactory.java:72)
> >         at org.openejb.util.SoftLimitedInstancePool.acquire(
> > SoftLimitedInstancePool.java:81)
> >         at org.openejb.mdb.MDBInstanceInterceptor.invoke(
> > MDBInstanceInterceptor.java:81)
> >         at org.openejb.SystemExceptionInterceptor.invoke(
> > SystemExceptionInterceptor.java:82)
> >         at org.openejb.mdb.MDBContainer.invoke(MDBContainer.java:242)
> >         at org.openejb.mdb.EndpointHandler.invoke(EndpointHandler.java
> > :180)
> >         at org.openejb.mdb.EndpointHandler.intercept(
> > EndpointHandler.java:223)
> >         at
> > org.openejb.mdb.EndpointProxy$$EnhancerByCGLIB$$e708dc8a.onMessage
> > (<generated>)
> >         at
> > org.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(
> > MessageEndpointProxy.java:117)
> >         at org.activemq.ra.MessageEndpointProxy.onMessage(
> > MessageEndpointProxy.java:57)
> >         at org.activemq.ActiveMQSession.deliver(ActiveMQSession.java
> > :569)
> >         at org.activemq.ActiveMQSession.run(ActiveMQSession.java:551)
> >         at org.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java
> > :165)
> >         at org.apache.geronimo.connector.work.WorkerContext.run(
> > WorkerContext.java:291)
> >         at org.apache.geronimo.pool.ThreadPool$1.run(ThreadPool.java
> > :172)
> >         at
> > org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run(
> > ThreadPool.java:289)
> >         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> > Source)
> >         at java.lang.Thread.run(Thread.java:595)
> >
> > ... and here's the stack trace from the custom MDB:
> >
> > java.lang.Exception: Stack trace
> >         at java.lang.Thread.dumpStack(Thread.java:1158)
> >         at com.test.CourierPositionMDB.ejbCreate(CourierPositionMDB.java
> > :56)
> >         at
> > com.test.CourierPositionMDB$$FastClassByCGLIB$$adae8521.invoke
> > (<generated>)
> >         at org.openejb.slsb.EJBCreateMethod.execute(EJBCreateMethod.java
> > :94)
> >         at org.openejb.dispatch.DispatchInterceptor.invoke(
> > DispatchInterceptor.java:72)
> >         at
> > org.apache.geronimo.naming.java.ComponentContextInterceptor.invoke(
> > ComponentContextInterceptor.java:56)
> >         at org.openejb.mdb.MDBInstanceContext.ejbCreate(
> > MDBInstanceContext.java:153)
> >         at org.openejb.mdb.MDBInstanceFactory.createInstance(
> > MDBInstanceFactory.java:72)
> >         at org.openejb.util.SoftLimitedInstancePool.acquire(
> > SoftLimitedInstancePool.java:81)
> >         at org.openejb.mdb.MDBInstanceInterceptor.invoke(
> > MDBInstanceInterceptor.java:81)
> >         at org.openejb.SystemExceptionInterceptor.invoke(
> > SystemExceptionInterceptor.java:82)
> >         at org.openejb.mdb.MDBContainer.invoke(MDBContainer.java:242)
> >         at org.openejb.mdb.EndpointHandler.invoke(EndpointHandler.java
> > :180)
> >         at org.openejb.mdb.EndpointHandler.intercept(
> > EndpointHandler.java:223)
> >         at
> > org.openejb.mdb.EndpointProxy$$EnhancerByCGLIB$$224d7765.onCourierPosition
> > (<generated>)
> >         at com.test.ra.EndpointWorker$1.run(EndpointWorker.java:109)
> >         at org.apache.geronimo.connector.work.WorkerContext.run(
> > WorkerContext.java:291)
> >         at org.apache.geronimo.pool.ThreadPool$1.run(ThreadPool.java
> > :172)
> >         at
> > org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run(
> > ThreadPool.java:289)
> >         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> > Source)
> >         at java.lang.Thread.run(Thread.java:595)
> >
> > Thanks,
> > Nate
> >
> >
> > On 9/30/06, David Jencks <david_jencks@yahoo.com > wrote:
> > >
> > >
> > > On Sep 30, 2006, at 8:27 AM, Nathan Mittler wrote:
> > >
> > > > Hi,
> > > > Has anyone created custom connectors with G?
> > > >
> > > > I have a two versions of a simple MDB - one that implements
> > > > javax.jms.MessageListener and one that implements a custom
> > > > interface.  When onMessage is invoked by the AMQ RAR, I appear to
> > > > be in the context of the MDB's classloader and can use dependencies
> > > > specified in the MDB's deployment plan.  However, when I invoke the
> > > > MDB from a custom connector, it seems to be in the context of the
> > > > RAR classloader and I don't have access to any of the MDB's
> > > > dependencies.  I assume that I'm doing something bone-headed in my
> > > > connector, but I'm not seeing it.  Any ideas?
> > >
> > > It oughtta work :-).  I don't think it's your connector.  Would it be
> > > difficult to get stack traces from the mdbs to see if the paths to
> > > get to the mdb are different?
> > >
> > > thanks
> > > david jencks
> > >
> > > >
> > > > Thanks for the help,
> > > > Nate
> > >
> > >
> >
>
>

Re: classloaders for non-JMS MDBs

Posted by David Jencks <da...@yahoo.com>.
The code paths look identical to me.  I haven't had time to set up a  
test case.  Can you get set up to debug in openejb and see what is  
happening in openejb EndpointHandler.setupDelivery?  That's where we  
should be setting the application classloader onto the thread.  (I'm  
looking at apache-incubator openejb2 trunk but I think the same code  
applies to all released openejb2 versions)

thanks
david jencks

On Oct 2, 2006, at 3:29 PM, Nathan Mittler wrote:

> Hey guys,
> Does anyone have any more insight as to what may be going on here?
>
> Thanks,
> Nate
>
> On 9/30/06, Nathan Mittler <na...@gmail.com> wrote:
> David, Thanks for the response.  Sure thing - I've captured the  
> stack trace from the ejbCreate method of both MDBs.
>
> First, here's the stack trace from the JMS MDB:
>
> java.lang.Exception: Stack trace
>         at java.lang.Thread.dumpStack(Thread.java:1158)
>         at com.test.CourierPositionMDB.ejbCreate 
> (CourierPositionMDB.java:32)
>         at com.test.CourierPositionMDB$$FastClassByCGLIB$ 
> $c60caec2.invoke(<generated>)
>         at org.openejb.slsb.EJBCreateMethod.execute 
> (EJBCreateMethod.java:94)
>         at org.openejb.dispatch.DispatchInterceptor.invoke 
> (DispatchInterceptor.java:72)
>         at  
> org.apache.geronimo.naming.java.ComponentContextInterceptor.invoke 
> (ComponentContextInterceptor.java:56)
>         at org.openejb.mdb.MDBInstanceContext.ejbCreate 
> (MDBInstanceContext.java:153)
>         at org.openejb.mdb.MDBInstanceFactory.createInstance 
> (MDBInstanceFactory.java:72)
>         at org.openejb.util.SoftLimitedInstancePool.acquire 
> (SoftLimitedInstancePool.java:81)
>         at org.openejb.mdb.MDBInstanceInterceptor.invoke 
> (MDBInstanceInterceptor.java:81)
>         at org.openejb.SystemExceptionInterceptor.invoke 
> (SystemExceptionInterceptor.java:82)
>         at org.openejb.mdb.MDBContainer.invoke(MDBContainer.java:242)
>         at org.openejb.mdb.EndpointHandler.invoke 
> (EndpointHandler.java:180)
>         at org.openejb.mdb.EndpointHandler.intercept 
> (EndpointHandler.java:223)
>         at org.openejb.mdb.EndpointProxy$$EnhancerByCGLIB$ 
> $e708dc8a.onMessage(<generated>)
>         at org.activemq.ra.MessageEndpointProxy 
> $MessageEndpointAlive.onMessage(MessageEndpointProxy.java:117)
>         at org.activemq.ra.MessageEndpointProxy.onMessage 
> (MessageEndpointProxy.java:57)
>         at org.activemq.ActiveMQSession.deliver 
> (ActiveMQSession.java:569)
>         at org.activemq.ActiveMQSession.run(ActiveMQSession.java:551)
>         at org.activemq.ra.ServerSessionImpl.run 
> (ServerSessionImpl.java:165)
>         at org.apache.geronimo.connector.work.WorkerContext.run 
> (WorkerContext.java:291)
>         at org.apache.geronimo.pool.ThreadPool$1.run 
> (ThreadPool.java:172)
>         at org.apache.geronimo.pool.ThreadPool 
> $ContextClassLoaderRunnable.run(ThreadPool.java:289)
>         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor 
> $Worker.run(Unknown Source)
>         at java.lang.Thread.run(Thread.java:595)
>
> ... and here's the stack trace from the custom MDB:
>
> java.lang.Exception: Stack trace
>         at java.lang.Thread.dumpStack(Thread.java:1158)
>         at com.test.CourierPositionMDB.ejbCreate 
> (CourierPositionMDB.java:56)
>         at com.test.CourierPositionMDB$$FastClassByCGLIB$ 
> $adae8521.invoke(<generated>)
>         at org.openejb.slsb.EJBCreateMethod.execute 
> (EJBCreateMethod.java:94)
>         at org.openejb.dispatch.DispatchInterceptor.invoke 
> (DispatchInterceptor.java:72)
>         at  
> org.apache.geronimo.naming.java.ComponentContextInterceptor.invoke 
> (ComponentContextInterceptor.java:56)
>         at org.openejb.mdb.MDBInstanceContext.ejbCreate 
> (MDBInstanceContext.java:153)
>         at org.openejb.mdb.MDBInstanceFactory.createInstance 
> (MDBInstanceFactory.java:72)
>         at org.openejb.util.SoftLimitedInstancePool.acquire 
> (SoftLimitedInstancePool.java:81)
>         at org.openejb.mdb.MDBInstanceInterceptor.invoke 
> (MDBInstanceInterceptor.java:81)
>         at org.openejb.SystemExceptionInterceptor.invoke 
> (SystemExceptionInterceptor.java:82)
>         at org.openejb.mdb.MDBContainer.invoke(MDBContainer.java:242)
>         at org.openejb.mdb.EndpointHandler.invoke 
> (EndpointHandler.java:180)
>         at org.openejb.mdb.EndpointHandler.intercept 
> (EndpointHandler.java:223)
>         at org.openejb.mdb.EndpointProxy$$EnhancerByCGLIB$ 
> $224d7765.onCourierPosition(<generated>)
>         at com.test.ra.EndpointWorker$1.run(EndpointWorker.java:109)
>         at org.apache.geronimo.connector.work.WorkerContext.run 
> (WorkerContext.java:291)
>         at org.apache.geronimo.pool.ThreadPool$1.run 
> (ThreadPool.java:172)
>         at org.apache.geronimo.pool.ThreadPool 
> $ContextClassLoaderRunnable.run(ThreadPool.java:289)
>         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor 
> $Worker.run(Unknown Source)
>         at java.lang.Thread.run(Thread.java:595)
>
> Thanks,
> Nate
>
>
>
> On 9/30/06, David Jencks <david_jencks@yahoo.com > wrote:
>
> On Sep 30, 2006, at 8:27 AM, Nathan Mittler wrote:
>
> > Hi,
> > Has anyone created custom connectors with G?
> >
> > I have a two versions of a simple MDB - one that implements
> > javax.jms.MessageListener and one that implements a custom
> > interface.  When onMessage is invoked by the AMQ RAR, I appear to
> > be in the context of the MDB's classloader and can use dependencies
> > specified in the MDB's deployment plan.  However, when I invoke the
> > MDB from a custom connector, it seems to be in the context of the
> > RAR classloader and I don't have access to any of the MDB's
> > dependencies.  I assume that I'm doing something bone-headed in my
> > connector, but I'm not seeing it.  Any ideas?
>
> It oughtta work :-).  I don't think it's your connector.  Would it be
> difficult to get stack traces from the mdbs to see if the paths to
> get to the mdb are different?
>
> thanks
> david jencks
>
> >
> > Thanks for the help,
> > Nate
>
>
>