You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by falom <fa...@yahoo.com.cn> on 2007/01/19 03:36:04 UTC

[geronimo1.1.1] Axis2 war classloader ClassNotFoundException

Hi,

I installed axis2 war in both tomcat and geronimo.

First I managed to test axis2 jms transport in tomcat connecting to standalone activemq broker by deploying one service using servicelifecycle to start up the jmslistener. 

BUT when i deploy the same service in geronimo, while trying connect to the activemq broker within geronimo, i got following exception attached, seems like problem related to classloader, or something else which i am really stuck with. I also reconfigured axis2 listener to use org.activemq.jndi.ActiveMQInitialContextFactory instead of org.apache.activemq.jndi.ActiveMQInitialContextFactory, but same exception.
I really need some clue what i do wrong, or how to go around this classloading issue.
  
falom

22:46:30,709 INFO  [JMSActiveEchoServiceLifeCycle] JMSActiveEchoServiceLifeCycle startUp called.
22:46:30,719 ERROR [JMSListener] Error connecting to JMS connection factory : TopicConnectionFactory
javax.naming.NoInitialContextException: Cannot instantiate class: org.apache.activemq.jndi.ActiveMQInitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.apache.activemq.jndi.ActiveMQInitialContextFactory in classloader default/axis211/1164548268298/war]
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.<init>(InitialContext.java:197)
    at org.apache.axis2.transport.jms.JMSConnectionFactory.createInitialContext(JMSConnectionFactory.java:133)
    at org.apache.axis2.transport.jms.JMSConnectionFactory.connect(JMSConnectionFactory.java:122)
    at org.apache.axis2.transport.jms.JMSListener.initializeConnectionFactories(JMSListener.java:244)
    at org.apache.axis2.transport.jms.JMSListener.init(JMSListener.java:104)
    at org.apache.axis2.jms2.JMSActiveEchoServiceLifeCycle.startUp(JMSActiveEchoServiceLifeCycle.java:56)
    at org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass(ServiceBuilder.java:354)
    at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:136)
    at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:91)
    at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:133)
    at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:528)
    at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:196)
    at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:227)
    at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:174)
    at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:88)
    at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:252)
    at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:72)
    at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:373)
    at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:317)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
    at org.apache.geronimo.tomcat.GeronimoStandardContext.access$201(GeronimoStandardContext.java:67)
    at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:337)
    at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:31)
    at org.apache.geronimo.tomcat.GeronimoStandardContext.start(GeronimoStandardContext.java:192)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
    at org.apache.geronimo.tomcat.TomcatContainer.addContext(TomcatContainer.java:313)
    at org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$$9370b073.invoke(<generated>)
    at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
    at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
    at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
    at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
    at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
    at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
    at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
    at org.apache.geronimo.tomcat.TomcatContainer$$EnhancerByCGLIB$$f3376869.addContext(<generated>)
    at org.apache.geronimo.tomcat.TomcatWebAppContext.doStart(TomcatWebAppContext.java:438)
    at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:981)
    at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:267)
    at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
    at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124)
    at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:540)
    at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379)
    at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:374)
    at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187)
    at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:527)
    at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:508)
    at org.apache.geronimo.kernel.config.SimpleConfigurationManager$$FastClassByCGLIB$$ce77a924.invoke(<generated>)
    at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
    at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
    at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
    at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
    at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
    at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
    at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
    at org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$d98215e2.startConfiguration(<generated>)
    at org.apache.geronimo.system.main.Daemon.doStartup(Daemon.java:297)
    at org.apache.geronimo.system.main.Daemon.<init>(Daemon.java:74)
    at org.apache.geronimo.system.main.Daemon.main(Daemon.java:377)


 		
---------------------------------
 雅虎免费邮箱-3.5G容量,20M附件

[geronimo1.1.1] Strange behavior calling jms service between axis2 and geronimo

Posted by falom <fa...@yahoo.com.cn>.
Hi,

I first setup jms resources in geronimo with AxisConnectionFactory and AxisQueue, and deploy one axis2 service with jms transport. Now two confusing situations below:

1.When i configure the axis2 jmslistener (initiated when geronimo loads up the axis2 war app) to listen to this queue by java:comp/env/jms/AxisQueue, the jmslistner can find the queue directly, but when a standalone axis2 client send msg to the queue to call the service, the queue got the msg but the axis2 engine can not find the service to call.

2. When i instead configure the jmslistener to listen to AxisQueue directly, the jmslistener can not find the queue, so it creates a queue with same name AxisQueue. The same axis2 client makes the same call, now this time it went through without problem, the client got the expected response from the service.

Can someone please give me some clue on what happened really, what possibly is reason behind this? Thanks.

falom

 		
---------------------------------
 Mp3疯狂搜-新歌热歌高速下   

[geronimo1.1.1] Re:Re: Re: Axis2 war classloader ClassNotFoundException

Posted by falom <fa...@yahoo.com.cn>.
Hi David,
   
  I finally made this work after some struggling with all the jms configuring in geronimo and axis2. It turned out as you mentioned below, i should merge activemq's jms config into axis2 to make it right for axis2 1.1 and geronimo 1.1.1. It feels still some work need to be done to get better user experiences for using axis2 over jms with geronimo activemq. Anyway feels good to get one exmaple to work at this stage. 
   
  falom

David Jencks <da...@yahoo.com> wrote��
  
    On Jan 20, 2007, at 7:42 PM, falom wrote:

  Hi David,

The axis2 client code is standalone, the name being looked up is java:comp/env/jms/myQueueConnectionFactory, it should return an object of ConnectionFactory. 

I think if i use plain javax.jms.* api instead of axis2 jms api, i can connect to the predefined jms resources in geronimo. So i'm kind of confused, since axis2 jms api should be based on standards. Maybe something else i'm missing here?
  

OK, I think I know what's going on but keep in mind I haven't tried any of this :-)
  

  If your code is not running in a javaee container its extremely unlikely that you can look up anything under java:comp.  That context is "reserved" by the ee specs for stuff configured by ee descriptors or annotations specific to the ee component, and it provides a layer of indirection so you can change what your app gets without changing its code.
  

  Since you're client is not running in an ee container you need to configure the activemq jndi using the amq specific properties file configuration outlined here:
  http://incubator.apache.org/activemq/jndi-support.html
  

  In particular your app is going to need to look up something like "myQueueConnectionFactory" rather than "java:comp/env/myQueueConnectionFactory"
  

  If you client was running in an ee app client container or ee server then it should be possible to configure jndi so java:comp/env/myQueueConnectionFactory gets you what you want.
  

  Hope this helps
  david jencks
  
  
falom

David Jencks <da...@yahoo.com> wrote�?lt;BLOCKQUOTE class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> 
    On Jan 20, 2007, at 9:04 AM, falom wrote:

  Hi David,

I installed axis2 1.1 war in geronimo. Since Axis2 support soap over jms, so what i'm trying to do is:
- first start axis2 jmslistner to listen one queue on geronimo activemq which i managed to do with a delpoyed axis2 web service�?within geronimo server
- then i write a axis2 client to call the service, which involve first connecting to the�?geronimo activemq broker to locate a predefined connectionfactory, where i got the following exception.
  

Is the code that generates the stack trace running in geronimo or standalone?
  

  What name is being looked up in jndi and what object do you expect to get back?
  

  thanks
  david jencks
  

    
falom

David Jencks <da...@yahoo.com> wrote锛�  I don't understand what you are trying to do, but I will comment anyway.  

  I suspect you are trying to use the wrong jndi tree.鑱� I would expect that in geronimo you would set up an amq rar deployment pointing to your remote amq broker and deploy an outbound connection factory and some admin objects/destinations/queues or topics.鑱� This would all be in geronimo.鑱借伣
  

  The next step would be to make it so axis is using the geronimo java:comp jndi context instead of the amq remote context.鑱� I suspect this is going to involve installing an interceptor into axis2 since from the stack trace it looks like the thread involved is coming from a thread pool controlled by axis and the jndi java:comp context relies on a ThreadLocal to hold the correct context.鑱� An axis2 expert is going to need to comment on how to do this :-)
  

  thanks
  david jencks
  
    On Jan 20, 2007, at 5:48 AM, falom wrote:

  Hi Lin,

I setup jms resource in geronimo and have one axis2 client trying to connection to it and call one axis2 service, but i got javax.naming.NamingException: scheme java not recognized exception. Does this mean incompatibility between geronimo's activemq and current axis2 jms implementation? Or do you have any idea how to go around this. I did manage to have the axis2 jms listener up working within geronimo server.

falom

2007-1-20 21:37:26 org.apache.axis2.transport.jms.JMSOutTransportInfo handleException
error: Cannot get JMS Connection factory with props : {java.naming.provider.url=tcp://localhost:61616, java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextFactory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/myQueueConnectionFactory}
javax.naming.NamingException: scheme java not recognized
鑱借伣鑱� at org.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:198)
鑱借伣鑱� at javax.naming.InitialContext.lookup(Unknown Source)
鑱借伣鑱� at org.apache.axis2.transport.jms.JMSOutTransportInfo.getConnectionFactory(JMSOutTransportInfo.java:85)
鑱借伣鑱� at org.apache.axis2.transport.jms.JMSOutTransportInfo.<init>(JMSOutTransportInfo.java:69)
鑱借伣鑱� at org.apache.axis2.transport.jms.JMSSender.invoke(JMSSender.java:66)
鑱借伣鑱� at org.apache.axis2.engine.AxisEngine$TransportNonBlockingInvocationWorker.run(AxisEngine.java:746)
鑱借伣鑱� at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
鑱借伣鑱� at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
鑱借伣鑱� at java.lang.Thread.run(Unknown Source)
2007-1-20 21:37:26 org.apache.axis2.engine.AxisEngine$TransportNonBlockingInvocationWorker run
info: Cannot get JMS Connection factory with props : {java.naming.provider.url=tcp://localhost:61616, java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextFactory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/myQueueConnectionFactory}
C:\Axis2_1.1\axis2-1.1\samples\Axis2JmsWorkingSample2\client_repository
2007-1-20 21:37:29 org.apache.axis2.deployment.DeploymentEngine doDeploy
info: Deploying module : addressing-1.1
2007-1-20 21:37:29 org.apache.axis2.transport.jms.JMSOutTransportInfo handleException
error: Cannot get JMS Connection factory with props : {java.naming.provider.url=tcp://localhost:61616, java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextFactory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/myQueueConnectionFactory}
javax.naming.NamingException: scheme java not recognized
鑱借伣鑱� at org.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:198)
鑱借伣鑱� at javax.naming.InitialContext.lookup(Unknown Source)
鑱借伣鑱� at org.apache.axis2.transport.jms.JMSOutTransportInfo.getConnectionFactory(JMSOutTransportInfo.java:85)
鑱借伣鑱� at org.apache.axis2.transport.jms.JMSOutTransportInfo.<init>(JMSOutTransportInfo.java:69)
鑱借伣鑱� at org.apache.axis2.transport.jms.JMSSender.invoke(JMSSender.java:66)
鑱借伣鑱� at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:670)
鑱借伣鑱� at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:365)
鑱借伣鑱� at org.apache.axis2.description.OutInAxisOperationClient$NonBlockingInvocationWorker.run(OutInAxisOperation.java:444)
鑱借伣鑱� at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
鑱借伣鑱� at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
鑱借伣鑱� at java.lang.Thread.run(Unknown Source)
2007-1-20 21:37:29 org.apache.axis2.jms2.JMSActiveEchoClient$1 onError
info: Cannot get JMS Connection factory with props : {java.naming.provider.url=tcp://localhost:61616, java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextFactory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/myQueueConnectionFactory}
2007-1-20 21:37:30 org.apache.axis2.deployment.DeploymentEngine doDeploy
info: Deploying module : addressing-1.1
C:\Axis2_1.1\axis2-1.1\samples\Axis2JmsWorkingSample2\client_repository
2007-1-20 21:37:30 org.apache.axis2.transport.jms.JMSOutTransportInfo handleException
error: Cannot get JMS Connection factory with props : {java.naming.provider.url=tcp://localhost:61616, java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextFactory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/myQueueConnectionFactory}
javax.naming.NamingException: scheme java not recognized
鑱借伣鑱� at org.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:198)
鑱借伣鑱� at javax.naming.InitialContext.lookup(Unknown Source)
鑱借伣鑱� at org.apache.axis2.transport.jms.JMSOutTransportInfo.getConnectionFactory(JMSOutTransportInfo.java:85)
鑱借伣鑱� at org.apache.axis2.transport.jms.JMSOutTransportInfo.<init>(JMSOutTransportInfo.java:69)
鑱借伣鑱� at org.apache.axis2.transport.jms.JMSSender.invoke(JMSSender.java:66)
鑱借伣鑱� at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:670)
鑱借伣鑱� at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:365)
鑱借伣鑱� at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:295)
鑱借伣鑱� at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:579)
鑱借伣鑱� at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
鑱借伣鑱� at org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:95)
鑱借伣鑱� at org.apache.axis2.jms2.JMSActiveEchoClient.test03EchoString(JMSActiveEchoClient.java:249)
鑱借伣鑱� at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
鑱借伣鑱� at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
鑱借伣鑱� at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
鑱借伣鑱� at java.lang.reflect.Method.invoke(Unknown Source)
鑱借伣鑱� at junit.framework.TestCase.runTest(TestCase.java:164)
鑱借伣鑱� at junit.framework.TestCase.runBare(TestCase.java:130)
鑱借伣鑱� at junit.framework.TestResult$1.protect(TestResult.java:110)
鑱借伣鑱� at junit.framework.TestResult.runProtected(TestResult.java:128)
鑱借伣鑱� at junit.framework.TestResult.run(TestResult.java:113)
鑱借伣鑱� at junit.framework.TestCase.run(TestCase.java:120)
鑱借伣鑱� at junit.framework.TestSuite.runTest(TestSuite.java:228)
鑱借伣鑱� at junit.framework.TestSuite.run(TestSuite.java:223)
鑱借伣鑱� at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
鑱借伣鑱� at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
鑱借伣鑱� at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
鑱借伣鑱� at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
鑱借伣鑱� at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
鑱借伣鑱� at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
鑱借伣鑱� at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

Lin Sun <li...@gmail.com> wrote閿涳�?  Hi there, you can look at the jms and mdb sample that comes w/ geronimo 1.1 doc - http://cwiki.apache.org/GMOxDOC11/jms-and-mdb-sample-application.html. Also I think the daytrader sample also uses the resource-ref and message-destination-ref you mentioned.

HTH, Lin
________________________________________
From: falom [mailto:falom2008@yahoo.com.cn] 
Sent: Friday, January 19, 2007 10:01 PM
To: user@geronimo.apache.org
Subject: [geronimo1.1.1] Re: Re: Axis2 war classloader ClassNotFoundException

Hi Lin,

Big thanks for the tip, it worked after a bit struggling with all the resource config in both geronimo and axis2. I will test now to see if axis2 client can call and get response from the server. BTW, do you know a good place to read more about all the ejb config parameters like following:


jms/myQueueConnectionFactory
javax.jms.QueueConnectionFactory
Container
Shareable



jms/myQueue
javax.jms.Queue
Produces
myQueue


falom

Lin Sun wrote閿涳�?
Hi there, I haven't tried to configure this myself but wonder if you can fix this by creating a Geronimo-web.xml for the axis2 war file. In the Geronimo-web.xml file, you can specify the activemq broker as the dependency of the axis2 war to request the classloder to make the activemq broker avail for the axis2 war.

HTH Lin 

________________________________________
From: falom [mailto:falom2008@yahoo.com.cn] 
Sent: Thursday, January 18, 2007 9:36 PM
To: user@geronimo.apache.org
Subject: [geronimo1.1.1] Axis2 war classloader ClassNotFoundException

Hi,

I installed axis2 war in both tomcat and geronimo.

First I managed to test axis2 jms transport in tomcat connecting to standalone activemq broker by deploying one service using servicelifecycle to start up the jmslistener. 

BUT when i deploy the same service in geronimo, while trying connect to the activemq broker within geronimo, i got following exception attached, seems like problem related to classloader, or something else which i am really stuck with. I also reconfigured axis2 listener to use org.activemq.jndi.ActiveMQInitialContextFactory instead of org.apache.activemq.jndi.ActiveMQInitialContextFactory, but same exception.
I really need some clue what i do wrong, or how to go around this classloading issue.

falom

22:46:30,709 INFO [JMSActiveEchoServiceLifeCycle] JMSActiveEchoServiceLifeCycle startUp called.
22:46:30,719 ERROR [JMSListener] Error connecting to JMS connection factory : TopicConnectionFactory
javax.naming.NoInitialContextException: Cannot instantiate class: org.apache.activemq.jndi.ActiveMQInitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.apache.activemq.jndi.ActiveMQInitialContextFactory in classloader default/axis211/1164548268298/war]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.(InitialContext.java:197)
at org.apache.axis2.transport.jms.JMSConnectionFactory.createInitialContext(JMSConnectionFactory.java:133)
at org.apache.axis2.transport.jms.JMSConnectionFactory.connect(JMSConnectionFactory.java:122)
at org.apache.axis2.transport.jms.JMSListener.initializeConnectionFactories(JMSListener.java:244)
at org.apache.axis2.transport.jms.JMSListener.init(JMSListener.java:104)
at org.apache.axis2.jms2.JMSActiveEchoServiceLifeCycle.startUp(JMSActiveEchoServiceLifeCycle.java:56)
at org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass(ServiceBuilder.java:354)
at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:136)
at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:91)
at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:133)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:528)
at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:196)
at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:227)
at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:174)
at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:88)
at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:252)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:72)
at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:373)
at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:317)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
at org.apache.geronimo.tomcat.GeronimoStandardContext.access$201(GeronimoStandardContext.java:67)
at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:337)
at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:31)
at org.apache.geronimo.tomcat.GeronimoStandardContext.start(GeronimoStandardContext.java:192)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.geronimo.tomcat.TomcatContainer.addContext(TomcatContainer.java:313)
at org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$$9370b073.invoke()
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
at org.apache.geronimo.tomcat.TomcatContainer$$EnhancerByCGLIB$$f3376869.addContext()
at org.apache.geronimo.tomcat.TomcatWebAppContext.doStart(TomcatWebAppContext.java:438)
at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:981)
at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:267)
at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124)
at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:540)
at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379)
at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:374)
at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187)
at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:527)
at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:508)
at org.apache.geronimo.kernel.config.SimpleConfigurationManager$$FastClassByCGLIB$$ce77a924.invoke()
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
at org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$d98215e2.startConfiguration()
at org.apache.geronimo.system.main.Daemon.doStartup(Daemon.java:297)
at org.apache.geronimo.system.main.Daemon.(Daemon.java:74)
at org.apache.geronimo.system.main.Daemon.main(Daemon.java:377)



  





  

 		
---------------------------------
 �Ż��������-3.5G������20M����

Re: [geronimo1.1.1] Re:Re: Re: Axis2 war classloader ClassNotFoundException

Posted by David Jencks <da...@yahoo.com>.
On Jan 20, 2007, at 7:42 PM, falom wrote:

> Hi David,
>
> The axis2 client code is standalone, the name being looked up is  
> java:comp/env/jms/myQueueConnectionFactory, it should return an  
> object of ConnectionFactory.
>
> I think if i use plain javax.jms.* api instead of axis2 jms api, i  
> can connect to the predefined jms resources in geronimo. So i'm  
> kind of confused, since axis2 jms api should be based on standards.  
> Maybe something else i'm missing here?

OK, I think I know what's going on but keep in mind I haven't tried  
any of this :-)

If your code is not running in a javaee container its extremely  
unlikely that you can look up anything under java:comp.  That context  
is "reserved" by the ee specs for stuff configured by ee descriptors  
or annotations specific to the ee component, and it provides a layer  
of indirection so you can change what your app gets without changing  
its code.

Since you're client is not running in an ee container you need to  
configure the activemq jndi using the amq specific properties file  
configuration outlined here:
http://incubator.apache.org/activemq/jndi-support.html

In particular your app is going to need to look up something like  
"myQueueConnectionFactory" rather than "java:comp/env/ 
myQueueConnectionFactory"

If you client was running in an ee app client container or ee server  
then it should be possible to configure jndi so java:comp/env/ 
myQueueConnectionFactory gets you what you want.

Hope this helps
david jencks

>
> falom
>
> David Jencks <da...@yahoo.com> wrote:
>
> On Jan 20, 2007, at 9:04 AM, falom wrote:
>
>> Hi David,
>>
>> I installed axis2 1.1 war in geronimo. Since Axis2 support soap  
>> over jms, so what i'm trying to do is:
>> - first start axis2 jmslistner to listen one queue on geronimo  
>> activemq which i managed to do with a delpoyed axis2 web service聽  
>> within geronimo server
>> - then i write a axis2 client to call the service, which involve  
>> first connecting to the聽 geronimo activemq broker to locate a  
>> predefined connectionfactory, where i got the following exception.
>
> Is the code that generates the stack trace running in geronimo or  
> standalone?
>
> What name is being looked up in jndi and what object do you expect  
> to get back?
>
> thanks
> david jencks
>
>>
>> falom
>>
>> David Jencks <da...@yahoo.com> wrote锛�
>> I don't understand what you are trying to do, but I will comment  
>> anyway.
>>
>> I suspect you are trying to use the wrong jndi tree.鑱� I would  
>> expect that in geronimo you would set up an amq rar deployment  
>> pointing to your remote amq broker and deploy an outbound  
>> connection factory and some admin objects/destinations/queues or  
>> topics.鑱� This would all be in geronimo.鑱借伣
>>
>> The next step would be to make it so axis is using the geronimo  
>> java:comp jndi context instead of the amq remote context.鑱� I  
>> suspect this is going to involve installing an interceptor into  
>> axis2 since from the stack trace it looks like the thread involved  
>> is coming from a thread pool controlled by axis and the jndi  
>> java:comp context relies on a ThreadLocal to hold the correct  
>> context.鑱� An axis2 expert is going to need to comment on how  
>> to do this :-)
>>
>> thanks
>> david jencks
>>
>> On Jan 20, 2007, at 5:48 AM, falom wrote:
>>
>>> Hi Lin,
>>>
>>> I setup jms resource in geronimo and have one axis2 client trying  
>>> to connection to it and call one axis2 service, but i got  
>>> javax.naming.NamingException: scheme java not recognized  
>>> exception. Does this mean incompatibility between geronimo's  
>>> activemq and current axis2 jms implementation? Or do you have any  
>>> idea how to go around this. I did manage to have the axis2 jms  
>>> listener up working within geronimo server.
>>>
>>> falom
>>>
>>> 2007-1-20 21:37:26  
>>> org.apache.axis2.transport.jms.JMSOutTransportInfo handleException
>>> error: Cannot get JMS Connection factory with props :  
>>> {java.naming.provider.url=tcp://localhost:61616,  
>>> java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContext 
>>> Factory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/ 
>>> jms/myQueueConnectionFactory}
>>> javax.naming.NamingException: scheme java not recognized
>>> 鑱借伣鑱� at org.activemq.jndi.ReadOnlyContext.lookup 
>>> (ReadOnlyContext.java:198)
>>> 鑱借伣鑱� at javax.naming.InitialContext.lookup(Unknown  
>>> Source)
>>> 鑱借伣鑱� at  
>>> org.apache.axis2.transport.jms.JMSOutTransportInfo.getConnectionFact 
>>> ory(JMSOutTransportInfo.java:85)
>>> 鑱借伣鑱� at  
>>> org.apache.axis2.transport.jms.JMSOutTransportInfo.<init> 
>>> (JMSOutTransportInfo.java:69)
>>> 鑱借伣鑱� at org.apache.axis2.transport.jms.JMSSender.invoke 
>>> (JMSSender.java:66)
>>> 鑱借伣鑱� at org.apache.axis2.engine.AxisEngine 
>>> $TransportNonBlockingInvocationWorker.run(AxisEngine.java:746)
>>> 鑱借伣鑱� at  
>>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
>>> $Worker.runTask(ThreadPoolExecutor.java:665)
>>> 鑱借伣鑱� at  
>>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
>>> $Worker.run(ThreadPoolExecutor.java:690)
>>> 鑱借伣鑱� at java.lang.Thread.run(Unknown Source)
>>> 2007-1-20 21:37:26 org.apache.axis2.engine.AxisEngine 
>>> $TransportNonBlockingInvocationWorker run
>>> info: Cannot get JMS Connection factory with props :  
>>> {java.naming.provider.url=tcp://localhost:61616,  
>>> java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContext 
>>> Factory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/ 
>>> jms/myQueueConnectionFactory}
>>> C:\Axis2_1.1\axis2-1.1\samples\Axis2JmsWorkingSample2 
>>> \client_repository
>>> 2007-1-20 21:37:29 org.apache.axis2.deployment.DeploymentEngine  
>>> doDeploy
>>> info: Deploying module : addressing-1.1
>>> 2007-1-20 21:37:29  
>>> org.apache.axis2.transport.jms.JMSOutTransportInfo handleException
>>> error: Cannot get JMS Connection factory with props :  
>>> {java.naming.provider.url=tcp://localhost:61616,  
>>> java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContext 
>>> Factory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/ 
>>> jms/myQueueConnectionFactory}
>>> javax.naming.NamingException: scheme java not recognized
>>> 鑱借伣鑱� at org.activemq.jndi.ReadOnlyContext.lookup 
>>> (ReadOnlyContext.java:198)
>>> 鑱借伣鑱� at javax.naming.InitialContext.lookup(Unknown  
>>> Source)
>>> 鑱借伣鑱� at  
>>> org.apache.axis2.transport.jms.JMSOutTransportInfo.getConnectionFact 
>>> ory(JMSOutTransportInfo.java:85)
>>> 鑱借伣鑱� at  
>>> org.apache.axis2.transport.jms.JMSOutTransportInfo.<init> 
>>> (JMSOutTransportInfo.java:69)
>>> 鑱借伣鑱� at org.apache.axis2.transport.jms.JMSSender.invoke 
>>> (JMSSender.java:66)
>>> 鑱借伣鑱� at org.apache.axis2.engine.AxisEngine.send 
>>> (AxisEngine.java:670)
>>> 鑱借伣鑱� at  
>>> org.apache.axis2.description.OutInAxisOperationClient.send 
>>> (OutInAxisOperation.java:365)
>>> 鑱借伣鑱� at  
>>> org.apache.axis2.description.OutInAxisOperationClient 
>>> $NonBlockingInvocationWorker.run(OutInAxisOperation.java:444)
>>> 鑱借伣鑱� at  
>>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
>>> $Worker.runTask(ThreadPoolExecutor.java:665)
>>> 鑱借伣鑱� at  
>>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
>>> $Worker.run(ThreadPoolExecutor.java:690)
>>> 鑱借伣鑱� at java.lang.Thread.run(Unknown Source)
>>> 2007-1-20 21:37:29 org.apache.axis2.jms2.JMSActiveEchoClient$1  
>>> onError
>>> info: Cannot get JMS Connection factory with props :  
>>> {java.naming.provider.url=tcp://localhost:61616,  
>>> java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContext 
>>> Factory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/ 
>>> jms/myQueueConnectionFactory}
>>> 2007-1-20 21:37:30 org.apache.axis2.deployment.DeploymentEngine  
>>> doDeploy
>>> info: Deploying module : addressing-1.1
>>> C:\Axis2_1.1\axis2-1.1\samples\Axis2JmsWorkingSample2 
>>> \client_repository
>>> 2007-1-20 21:37:30  
>>> org.apache.axis2.transport.jms.JMSOutTransportInfo handleException
>>> error: Cannot get JMS Connection factory with props :  
>>> {java.naming.provider.url=tcp://localhost:61616,  
>>> java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContext 
>>> Factory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/ 
>>> jms/myQueueConnectionFactory}
>>> javax.naming.NamingException: scheme java not recognized
>>> 鑱借伣鑱� at org.activemq.jndi.ReadOnlyContext.lookup 
>>> (ReadOnlyContext.java:198)
>>> 鑱借伣鑱� at javax.naming.InitialContext.lookup(Unknown  
>>> Source)
>>> 鑱借伣鑱� at  
>>> org.apache.axis2.transport.jms.JMSOutTransportInfo.getConnectionFact 
>>> ory(JMSOutTransportInfo.java:85)
>>> 鑱借伣鑱� at  
>>> org.apache.axis2.transport.jms.JMSOutTransportInfo.<init> 
>>> (JMSOutTransportInfo.java:69)
>>> 鑱借伣鑱� at org.apache.axis2.transport.jms.JMSSender.invoke 
>>> (JMSSender.java:66)
>>> 鑱借伣鑱� at org.apache.axis2.engine.AxisEngine.send 
>>> (AxisEngine.java:670)
>>> 鑱借伣鑱� at  
>>> org.apache.axis2.description.OutInAxisOperationClient.send 
>>> (OutInAxisOperation.java:365)
>>> 鑱借伣鑱� at  
>>> org.apache.axis2.description.OutInAxisOperationClient.execute 
>>> (OutInAxisOperation.java:295)
>>> 鑱借伣鑱� at  
>>> org.apache.axis2.client.ServiceClient.sendReceive 
>>> (ServiceClient.java:579)
>>> 鑱借伣鑱� at  
>>> org.apache.axis2.client.ServiceClient.sendReceive 
>>> (ServiceClient.java:508)
>>> 鑱借伣鑱� at  
>>> org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking 
>>> (RPCServiceClient.java:95)
>>> 鑱借伣鑱� at  
>>> org.apache.axis2.jms2.JMSActiveEchoClient.test03EchoString 
>>> (JMSActiveEchoClient.java:249)
>>> 鑱借伣鑱� at sun.reflect.NativeMethodAccessorImpl.invoke0 
>>> (Native Method)
>>> 鑱借伣鑱� at sun.reflect.NativeMethodAccessorImpl.invoke 
>>> (Unknown Source)
>>> 鑱借伣鑱� at sun.reflect.DelegatingMethodAccessorImpl.invoke 
>>> (Unknown Source)
>>> 鑱借伣鑱� at java.lang.reflect.Method.invoke(Unknown Source)
>>> 鑱借伣鑱� at junit.framework.TestCase.runTest(TestCase.java: 
>>> 164)
>>> 鑱借伣鑱� at junit.framework.TestCase.runBare(TestCase.java: 
>>> 130)
>>> 鑱借伣鑱� at junit.framework.TestResult$1.protect 
>>> (TestResult.java:110)
>>> 鑱借伣鑱� at junit.framework.TestResult.runProtected 
>>> (TestResult.java:128)
>>> 鑱借伣鑱� at junit.framework.TestResult.run(TestResult.java: 
>>> 113)
>>> 鑱借伣鑱� at junit.framework.TestCase.run(TestCase.java:120)
>>> 鑱借伣鑱� at junit.framework.TestSuite.runTest 
>>> (TestSuite.java:228)
>>> 鑱借伣鑱� at junit.framework.TestSuite.run(TestSuite.java: 
>>> 223)
>>> 鑱借伣鑱� at  
>>> org.junit.internal.runners.OldTestClassRunner.run 
>>> (OldTestClassRunner.java:35)
>>> 鑱借伣鑱� at  
>>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run 
>>> (JUnit4TestReference.java:38)
>>> 鑱借伣鑱� at  
>>> org.eclipse.jdt.internal.junit.runner.TestExecution.run 
>>> (TestExecution.java:38)
>>> 鑱借伣鑱� at  
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests 
>>> (RemoteTestRunner.java:460)
>>> 鑱借伣鑱� at  
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests 
>>> (RemoteTestRunner.java:673)
>>> 鑱借伣鑱� at  
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run 
>>> (RemoteTestRunner.java:386)
>>> 鑱借伣鑱� at  
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main 
>>> (RemoteTestRunner.java:196)
>>>
>>> Lin Sun <li...@gmail.com> wrote閿涳拷
>>> Hi there, you can look at the jms and mdb sample that comes w/  
>>> geronimo 1.1 doc - http://cwiki.apache.org/GMOxDOC11/jms-and-mdb- 
>>> sample-application.html. Also I think the daytrader sample also  
>>> uses the resource-ref and message-destination-ref you mentioned.
>>>
>>> HTH, Lin
>>> ________________________________________
>>> From: falom [mailto:falom2008@yahoo.com.cn]
>>> Sent: Friday, January 19, 2007 10:01 PM
>>> To: user@geronimo.apache.org
>>> Subject: [geronimo1.1.1] Re: Re: Axis2 war classloader  
>>> ClassNotFoundException
>>>
>>> Hi Lin,
>>>
>>> Big thanks for the tip, it worked after a bit struggling with all  
>>> the resource config in both geronimo and axis2. I will test now  
>>> to see if axis2 client can call and get response from the server.  
>>> BTW, do you know a good place to read more about all the ejb  
>>> config parameters like following:
>>>
>>>
>>> jms/myQueueConnectionFactory
>>> javax.jms.QueueConnectionFactory
>>> Container
>>> Shareable
>>>
>>>
>>>
>>> jms/myQueue
>>> javax.jms.Queue
>>> Produces
>>> myQueue
>>>
>>>
>>> falom
>>>
>>> Lin Sun wrote閿涳拷
>>> Hi there, I haven't tried to configure this myself but wonder if  
>>> you can fix this by creating a Geronimo-web.xml for the axis2 war  
>>> file. In the Geronimo-web.xml file, you can specify the activemq  
>>> broker as the dependency of the axis2 war to request the  
>>> classloder to make the activemq broker avail for the axis2 war.
>>>
>>> HTH Lin
>>>
>>> ________________________________________
>>> From: falom [mailto:falom2008@yahoo.com.cn]
>>> Sent: Thursday, January 18, 2007 9:36 PM
>>> To: user@geronimo.apache.org
>>> Subject: [geronimo1.1.1] Axis2 war classloader  
>>> ClassNotFoundException
>>>
>>> Hi,
>>>
>>> I installed axis2 war in both tomcat and geronimo.
>>>
>>> First I managed to test axis2 jms transport in tomcat connecting  
>>> to standalone activemq broker by deploying one service using  
>>> servicelifecycle to start up the jmslistener.
>>>
>>> BUT when i deploy the same service in geronimo, while trying  
>>> connect to the activemq broker within geronimo, i got following  
>>> exception attached, seems like problem related to classloader, or  
>>> something else which i am really stuck with. I also reconfigured  
>>> axis2 listener to use  
>>> org.activemq.jndi.ActiveMQInitialContextFactory instead of  
>>> org.apache.activemq.jndi.ActiveMQInitialContextFactory, but same  
>>> exception.
>>> I really need some clue what i do wrong, or how to go around this  
>>> classloading issue.
>>>
>>> falom
>>>
>>> 22:46:30,709 INFO [JMSActiveEchoServiceLifeCycle]  
>>> JMSActiveEchoServiceLifeCycle startUp called.
>>> 22:46:30,719 ERROR [JMSListener] Error connecting to JMS  
>>> connection factory : TopicConnectionFactory
>>> javax.naming.NoInitialContextException: Cannot instantiate class:  
>>> org.apache.activemq.jndi.ActiveMQInitialContextFactory [Root  
>>> exception is java.lang.ClassNotFoundException:  
>>> org.apache.activemq.jndi.ActiveMQInitialContextFactory in  
>>> classloader default/axis211/1164548268298/war]
>>> at javax.naming.spi.NamingManager.getInitialContext 
>>> (NamingManager.java:657)
>>> at javax.naming.InitialContext.getDefaultInitCtx 
>>> (InitialContext.java:247)
>>> at javax.naming.InitialContext.init(InitialContext.java:223)
>>> at javax.naming.InitialContext.(InitialContext.java:197)
>>> at  
>>> org.apache.axis2.transport.jms.JMSConnectionFactory.createInitialCon 
>>> text(JMSConnectionFactory.java:133)
>>> at org.apache.axis2.transport.jms.JMSConnectionFactory.connect 
>>> (JMSConnectionFactory.java:122)
>>> at  
>>> org.apache.axis2.transport.jms.JMSListener.initializeConnectionFacto 
>>> ries(JMSListener.java:244)
>>> at org.apache.axis2.transport.jms.JMSListener.init 
>>> (JMSListener.java:104)
>>> at org.apache.axis2.jms2.JMSActiveEchoServiceLifeCycle.startUp 
>>> (JMSActiveEchoServiceLifeCycle.java:56)
>>> at  
>>> org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass 
>>> (ServiceBuilder.java:354)
>>> at org.apache.axis2.deployment.ServiceBuilder.populateService 
>>> (ServiceBuilder.java:136)
>>> at  
>>> org.apache.axis2.deployment.repository.util.ArchiveReader.buildServi 
>>> ceGroup(ArchiveReader.java:91)
>>> at  
>>> org.apache.axis2.deployment.repository.util.ArchiveReader.processSer 
>>> viceGroup(ArchiveReader.java:133)
>>> at org.apache.axis2.deployment.DeploymentEngine.doDeploy 
>>> (DeploymentEngine.java:528)
>>> at org.apache.axis2.deployment.repository.util.WSInfoList.update 
>>> (WSInfoList.java:196)
>>> at org.apache.axis2.deployment.RepositoryListener.update 
>>> (RepositoryListener.java:227)
>>> at org.apache.axis2.deployment.RepositoryListener.checkServices 
>>> (RepositoryListener.java:174)
>>> at org.apache.axis2.deployment.DeploymentEngine.loadServices 
>>> (DeploymentEngine.java:88)
>>> at  
>>> org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices 
>>> (WarBasedAxisConfigurator.java:252)
>>> at  
>>> org.apache.axis2.context.ConfigurationContextFactory.createConfigura 
>>> tionContext(ConfigurationContextFactory.java:72)
>>> at org.apache.axis2.transport.http.AxisServlet.initConfigContext 
>>> (AxisServlet.java:373)
>>> at org.apache.axis2.transport.http.AxisServlet.init 
>>> (AxisServlet.java:317)
>>> at org.apache.catalina.core.StandardWrapper.loadServlet 
>>> (StandardWrapper.java:1105)
>>> at org.apache.catalina.core.StandardWrapper.load 
>>> (StandardWrapper.java:932)
>>> at org.apache.catalina.core.StandardContext.loadOnStartup 
>>> (StandardContext.java:3915)
>>> at org.apache.catalina.core.StandardContext.start 
>>> (StandardContext.java:4176)
>>> at org.apache.geronimo.tomcat.GeronimoStandardContext.access$201 
>>> (GeronimoStandardContext.java:67)
>>> at org.apache.geronimo.tomcat.GeronimoStandardContext 
>>> $SystemMethodValve.invoke(GeronimoStandardContext.java:337)
>>> at  
>>> org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke 
>>> (GeronimoBeforeAfterValve.java:31)
>>> at org.apache.geronimo.tomcat.GeronimoStandardContext.start 
>>> (GeronimoStandardContext.java:192)
>>> at org.apache.catalina.core.ContainerBase.addChildInternal 
>>> (ContainerBase.java:759)
>>> at org.apache.catalina.core.ContainerBase.addChild 
>>> (ContainerBase.java:739)
>>> at org.apache.catalina.core.StandardHost.addChild 
>>> (StandardHost.java:524)
>>> at org.apache.geronimo.tomcat.TomcatContainer.addContext 
>>> (TomcatContainer.java:313)
>>> at org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$ 
>>> $9370b073.invoke()
>>> at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>>> at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
>>> (FastMethodInvoker.java:38)
>>> at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
>>> (GBeanOperation.java:122)
>>> at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
>>> (GBeanInstance.java:817)
>>> at org.apache.geronimo.gbean.runtime.RawInvoker.invoke 
>>> (RawInvoker.java:57)
>>> at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke 
>>> (RawOperationInvoker.java:35)
>>> at  
>>> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept 
>>> (ProxyMethodInterceptor.java:96)
>>> at org.apache.geronimo.tomcat.TomcatContainer$$EnhancerByCGLIB$ 
>>> $f3376869.addContext()
>>> at org.apache.geronimo.tomcat.TomcatWebAppContext.doStart 
>>> (TomcatWebAppContext.java:438)
>>> at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance 
>>> (GBeanInstance.java:981)
>>> at  
>>> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStar 
>>> t(GBeanInstanceState.java:267)
>>> at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start 
>>> (GBeanInstanceState.java:102)
>>> at  
>>> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive( 
>>> GBeanInstanceState.java:124)
>>> at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive 
>>> (GBeanInstance.java:540)
>>> at  
>>> org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean 
>>> (BasicKernel.java:379)
>>> at  
>>> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurati 
>>> onGBeans(ConfigurationUtil.java:374)
>>> at  
>>> org.apache.geronimo.kernel.config.KernelConfigurationManager.start 
>>> (KernelConfigurationManager.java:187)
>>> at  
>>> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startCo 
>>> nfiguration(SimpleConfigurationManager.java:527)
>>> at  
>>> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startCo 
>>> nfiguration(SimpleConfigurationManager.java:508)
>>> at org.apache.geronimo.kernel.config.SimpleConfigurationManager$ 
>>> $FastClassByCGLIB$$ce77a924.invoke()
>>> at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>>> at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
>>> (FastMethodInvoker.java:38)
>>> at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
>>> (GBeanOperation.java:122)
>>> at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
>>> (GBeanInstance.java:817)
>>> at org.apache.geronimo.gbean.runtime.RawInvoker.invoke 
>>> (RawInvoker.java:57)
>>> at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke 
>>> (RawOperationInvoker.java:35)
>>> at  
>>> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept 
>>> (ProxyMethodInterceptor.java:96)
>>> at org.apache.geronimo.kernel.config.EditableConfigurationManager$ 
>>> $EnhancerByCGLIB$$d98215e2.startConfiguration()
>>> at org.apache.geronimo.system.main.Daemon.doStartup(Daemon.java:297)
>>> at org.apache.geronimo.system.main.Daemon.(Daemon.java:74)
>>> at org.apache.geronimo.system.main.Daemon.main(Daemon.java:377)
>>>
>>>
>>>
>>>
>
>
>
> 抢注雅虎免费邮箱-3.5G容量,20M附件!


Re: [geronimo1.1.1] Re:Re: Re: Axis2 war classloader ClassNotFoundException

Posted by falom <fa...@yahoo.com.cn>.
Hi David,

The axis2 client code is standalone, the name being looked up is java:comp/env/jms/myQueueConnectionFactory, it should return an object of ConnectionFactory. 

I think if i use plain javax.jms.* api instead of axis2 jms api, i can connect to the predefined jms resources in geronimo. So i'm kind of confused, since axis2 jms api should be based on standards. Maybe something else i'm missing here?

falom

David Jencks <da...@yahoo.com> wrote�� 
On Jan 20, 2007, at 9:04 AM, falom wrote:

Hi David,

I installed axis2 1.1 war in geronimo. Since Axis2 support soap over jms, so what i'm trying to do is:
- first start axis2 jmslistner to listen one queue on geronimo activemq which i managed to do with a delpoyed axis2 web service  within geronimo server
- then i write a axis2 client to call the service, which involve first connecting to the  geronimo activemq broker to locate a predefined connectionfactory, where i got the following exception.


Is the code that generates the stack trace running in geronimo or standalone?


What name is being looked up in jndi and what object do you expect to get back?


thanks
david jencks



falom

David Jencks <da...@yahoo.com> wrote! I don't understand what you are trying to do, but I will comment anyway.

I suspect you are trying to use the wrong jndi tree.聁 I would expect that in geronimo you would set up an amq rar deployment pointing to your remote amq broker and deploy an outbound connection factory and some admin objects/destinations/queues or topics.聁 This would all be in geronimo.聽聽


The next step would be to make it so axis is using the geronimo java:comp jndi context instead of the amq remote context.聁 I suspect this is going to involve installing an interceptor into axis2 since from the stack trace it looks like the thread involved is coming from a thread pool controlled by axis and the jndi java:comp context relies on a ThreadLocal to hold the correct context.聁 An axis2 expert is going to need to comment on how to do this :-)


thanks
david jencks

On Jan 20, 2007, at 5:48 AM, falom wrote:

Hi Lin,

I setup jms resource in geronimo and have one axis2 client trying to connection to it and call one axis2 service, but i got javax.naming.NamingException: scheme java not recognized exception. Does this mean incompatibility between geronimo's activemq and current axis2 jms implementation? Or do you have any idea how to go around this. I did manage to have the axis2 jms listener up working within geronimo server.

falom

2007-1-20 21:37:26 org.apache.axis2.transport.jms.JMSOutTransportInfo handleException
error: Cannot get JMS Connection factory with props : {java.naming.provider.url=tcp://localhost:61616, java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextFactory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/myQueueConnectionFactory}
javax.naming.NamingException: scheme java not recognized
聽聽聁 at org.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:198)
聽聽聁 at javax.naming.InitialContext.lookup(Unknown Source)
聽聽聁 at  org.apache.axis2.transport.jms.JMSOutTransportInfo.getConnectionFactory(JMSOutTransportInfo.java:85)
聽聽聁 at org.apache.axis2.transport.jms.JMSOutTransportInfo.<init>(JMSOutTransportInfo.java:69)
聽聽聁 at org.apache.axis2.transport.jms.JMSSender.invoke(JMSSender.java:66)
聽聽聁 at org.apache.axis2.engine.AxisEngine$TransportNonBlockingInvocationWorker.run(AxisEngine.java:746)
聽聽聁 at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
聽聽聁 at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
聽聽聁 at java.lang.Thread.run(Unknown Source)
2007-1-20 21:37:26 org.apache.axis2.engine.AxisEngine$TransportNonBlockingInvocationWorker run
info: Cannot get JMS Connection factory with props : {java.naming.provider.url=tcp://localhost:61616, java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextFactory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/myQueueConnectionFactory}
C:\Axis2_1.1\axis2-1.1\samples\Axis2JmsWorkingSample2\client_repository
2007-1-20 21:37:29 org.apache.axis2.deployment.DeploymentEngine doDeploy
info: Deploying module : addressing-1.1
2007-1-20 21:37:29 org.apache.axis2.transport.jms.JMSOutTransportInfo handleException
error: Cannot get JMS Connection factory with props : {java.naming.provider.url=tcp://localhost:61616, java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextFactory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/myQueueConnectionFactory}
javax.naming.NamingException: scheme java not recognized
聽聽聁 at org.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:198)
聽聽聁 at javax.naming.InitialContext.lookup(Unknown Source)
聽聽聁 at  org.apache.axis2.transport.jms.JMSOutTransportInfo.getConnectionFactory(JMSOutTransportInfo.java:85)
聽聽聁 at org.apache.axis2.transport.jms.JMSOutTransportInfo.<init>(JMSOutTransportInfo.java:69)
聽聽聁 at org.apache.axis2.transport.jms.JMSSender.invoke(JMSSender.java:66)
聽聽聁 at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:670)
聽聽聁 at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:365)
聽聽聁 at org.apache.axis2.description.OutInAxisOperationClient$NonBlockingInvocationWorker.run(OutInAxisOperation.java:444)
聽聽聁 at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
聽聽聁 at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
聽聽聁 at java.lang.Thread.run(Unknown  Source)
2007-1-20 21:37:29 org.apache.axis2.jms2.JMSActiveEchoClient$1 onError
info: Cannot get JMS Connection factory with props : {java.naming.provider.url=tcp://localhost:61616, java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextFactory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/myQueueConnectionFactory}
2007-1-20 21:37:30 org.apache.axis2.deployment.DeploymentEngine doDeploy
info: Deploying module : addressing-1.1
C:\Axis2_1.1\axis2-1.1\samples\Axis2JmsWorkingSample2\client_repository
2007-1-20 21:37:30 org.apache.axis2.transport.jms.JMSOutTransportInfo handleException
error: Cannot get JMS Connection factory with props : {java.naming.provider.url=tcp://localhost:61616, java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextFactory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/myQueueConnectionFactory}
javax.naming.NamingException: scheme java not recognized
聽聽聁 at  org.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:198)
聽聽聁 at javax.naming.InitialContext.lookup(Unknown Source)
聽聽聁 at org.apache.axis2.transport.jms.JMSOutTransportInfo.getConnectionFactory(JMSOutTransportInfo.java:85)
聽聽聁 at org.apache.axis2.transport.jms.JMSOutTransportInfo.<init>(JMSOutTransportInfo.java:69)
聽聽聁 at org.apache.axis2.transport.jms.JMSSender.invoke(JMSSender.java:66)
聽聽聁 at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:670)
聽聽聁 at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:365)
聽聽聁 at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:295)
聽聽聁 at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:579)
聽聽聁 at  org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
聽聽聁 at org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:95)
聽聽聁 at org.apache.axis2.jms2.JMSActiveEchoClient.test03EchoString(JMSActiveEchoClient.java:249)
聽聽聁 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
聽聽聁 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
聽聽聁 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
聽聽聁 at java.lang.reflect.Method.invoke(Unknown Source)
聽聽聁 at junit.framework.TestCase.runTest(TestCase.java:164)
聽聽聁 at junit.framework.TestCase.runBare(TestCase.java:130)
聽聽聁 at junit.framework.TestResult$1.protect(TestResult.java:110)
聽聽聁 at junit.framework.TestResult.runProtected(TestResult.java:128)
聽聽聁 at  junit.framework.TestResult.run(TestResult.java:113)
聽聽聁 at junit.framework.TestCase.run(TestCase.java:120)
聽聽聁 at junit.framework.TestSuite.runTest(TestSuite.java:228)
聽聽聁 at junit.framework.TestSuite.run(TestSuite.java:223)
聽聽聁 at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
聽聽聁 at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
聽聽聁 at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
聽聽聁 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
聽聽聁 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
聽聽聁 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
聽聽聁 at  org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

Lin Sun <li...@gmail.com> wrote锛� Hi there, you can look at the jms and mdb sample that comes w/ geronimo 1.1 doc - http://cwiki.apache.org/GMOxDOC11/jms-and-mdb-sample-application.html.  Also I think the daytrader sample also uses the resource-ref and message-destination-ref you mentioned.

HTH, Lin
________________________________________
From: falom [mailto:falom2008@yahoo.com.cn] 
Sent: Friday, January 19, 2007 10:01 PM
To: user@geronimo.apache.org
Subject: [geronimo1.1.1] Re: Re: Axis2 war classloader ClassNotFoundException

Hi Lin,

Big thanks for the tip, it worked after a bit struggling with all the resource config in both geronimo and axis2. I will test now to see if axis2 client can call and get response from the server. BTW, do you know a  good place to read more about all the ejb config parameters like following:

    
        jms/myQueueConnectionFactory
        javax.jms.QueueConnectionFactory
        Container
        Shareable
     
    
    
        jms/myQueue
        javax.jms.Queue
        Produces
        myQueue
    

falom

Lin Sun  wrote锛�
Hi there, I haven't tried to configure this myself but wonder if you can fix this by creating a Geronimo-web.xml for the axis2 war file. In the Geronimo-web.xml file, you can specify the activemq broker as the dependency of the axis2 war to request the classloder to make the activemq broker avail for the axis2 war.

HTH Lin 

________________________________________
From: falom [mailto:falom2008@yahoo.com.cn] 
Sent: Thursday, January 18, 2007 9:36 PM
To: user@geronimo.apache.org
Subject: [geronimo1.1.1] Axis2 war classloader ClassNotFoundException

Hi,

I installed axis2 war in both tomcat and geronimo.

First I managed to test axis2 jms transport in tomcat connecting to standalone activemq broker by deploying one service using servicelifecycle to start up the jmslistener. 

BUT when i deploy the same service in geronimo, while trying connect to the activemq broker within geronimo, i got following exception attached, seems like problem related to classloader, or something else which i am really stuck with. I also reconfigured axis2 listener to use org.activemq.jndi.ActiveMQInitialContextFactory instead of org.apache.activemq.jndi.ActiveMQInitialContextFactory, but same exception.
I really need some clue what i do wrong, or how to go around this classloading issue.

falom

22:46:30,709 INFO [JMSActiveEchoServiceLifeCycle] JMSActiveEchoServiceLifeCycle startUp called.
22:46:30,719 ERROR [JMSListener] Error connecting to JMS connection factory : TopicConnectionFactory
javax.naming.NoInitialContextException: Cannot instantiate class: org.apache.activemq.jndi.ActiveMQInitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.apache.activemq.jndi.ActiveMQInitialContextFactory in classloader default/axis211/1164548268298/war]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.(InitialContext.java:197)
at org.apache.axis2.transport.jms.JMSConnectionFactory.createInitialContext(JMSConnectionFactory.java:133)
at org.apache.axis2.transport.jms.JMSConnectionFactory.connect(JMSConnectionFactory.java:122)
at org.apache.axis2.transport.jms.JMSListener.initializeConnectionFactories(JMSListener.java:244)
at org.apache.axis2.transport.jms.JMSListener.init(JMSListener.java:104)
at org.apache.axis2.jms2.JMSActiveEchoServiceLifeCycle.startUp(JMSActiveEchoServiceLifeCycle.java:56)
at org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass(ServiceBuilder.java:354)
at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:136)
at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:91)
at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:133)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:528)
at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:196)
at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:227)
at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:174)
at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:88)
at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:252)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:72)
at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:373)
at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:317)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
at org.apache.geronimo.tomcat.GeronimoStandardContext.access$201(GeronimoStandardContext.java:67)
at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:337)
at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:31)
at org.apache.geronimo.tomcat.GeronimoStandardContext.start(GeronimoStandardContext.java:192)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.geronimo.tomcat.TomcatContainer.addContext(TomcatContainer.java:313)
at org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$$9370b073.invoke()
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
at org.apache.geronimo.tomcat.TomcatContainer$$EnhancerByCGLIB$$f3376869.addContext()
at org.apache.geronimo.tomcat.TomcatWebAppContext.doStart(TomcatWebAppContext.java:438)
at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:981)
at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:267)
at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124)
at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:540)
at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379)
at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:374)
at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187)
at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:527)
at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:508)
at org.apache.geronimo.kernel.config.SimpleConfigurationManager$$FastClassByCGLIB$$ce77a924.invoke()
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
at org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$d98215e2.startConfiguration()
at org.apache.geronimo.system.main.Daemon.doStartup(Daemon.java:297)
at org.apache.geronimo.system.main.Daemon.(Daemon.java:74)
at org.apache.geronimo.system.main.Daemon.main(Daemon.java:377)



  
  





 		
---------------------------------
��ע�Ż��������-3.5G������20M������ 

Re: [geronimo1.1.1] Re:Re: Re: Axis2 war classloader ClassNotFoundException

Posted by David Jencks <da...@yahoo.com>.
On Jan 20, 2007, at 9:04 AM, falom wrote:

> Hi David,
>
> I installed axis2 1.1 war in geronimo. Since Axis2 support soap  
> over jms, so what i'm trying to do is:
> - first start axis2 jmslistner to listen one queue on geronimo  
> activemq which i managed to do with a delpoyed axis2 web service   
> within geronimo server
> - then i write a axis2 client to call the service, which involve  
> first connecting to the  geronimo activemq broker to locate a  
> predefined connectionfactory, where i got the following exception.

Is the code that generates the stack trace running in geronimo or  
standalone?

What name is being looked up in jndi and what object do you expect to  
get back?

thanks
david jencks

>
> falom
>
> David Jencks <da...@yahoo.com> wrote:
> I don't understand what you are trying to do, but I will comment  
> anyway.
>
> I suspect you are trying to use the wrong jndi tree.聽 I would  
> expect that in geronimo you would set up an amq rar deployment  
> pointing to your remote amq broker and deploy an outbound  
> connection factory and some admin objects/destinations/queues or  
> topics.聽 This would all be in geronimo.聽聽
>
> The next step would be to make it so axis is using the geronimo  
> java:comp jndi context instead of the amq remote context.聽 I  
> suspect this is going to involve installing an interceptor into  
> axis2 since from the stack trace it looks like the thread involved  
> is coming from a thread pool controlled by axis and the jndi  
> java:comp context relies on a ThreadLocal to hold the correct  
> context.聽 An axis2 expert is going to need to comment on how to do  
> this :-)
>
> thanks
> david jencks
>
> On Jan 20, 2007, at 5:48 AM, falom wrote:
>
>> Hi Lin,
>>
>> I setup jms resource in geronimo and have one axis2 client trying  
>> to connection to it and call one axis2 service, but i got  
>> javax.naming.NamingException: scheme java not recognized  
>> exception. Does this mean incompatibility between geronimo's  
>> activemq and current axis2 jms implementation? Or do you have any  
>> idea how to go around this. I did manage to have the axis2 jms  
>> listener up working within geronimo server.
>>
>> falom
>>
>> 2007-1-20 21:37:26  
>> org.apache.axis2.transport.jms.JMSOutTransportInfo handleException
>> error: Cannot get JMS Connection factory with props :  
>> {java.naming.provider.url=tcp://localhost:61616,  
>> java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextF 
>> actory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/ 
>> myQueueConnectionFactory}
>> javax.naming.NamingException: scheme java not recognized
>> 聽聽聽 at org.activemq.jndi.ReadOnlyContext.lookup 
>> (ReadOnlyContext.java:198)
>> 聽聽聽 at javax.naming.InitialContext.lookup(Unknown Source)
>> 聽聽聽 at  
>> org.apache.axis2.transport.jms.JMSOutTransportInfo.getConnectionFacto 
>> ry(JMSOutTransportInfo.java:85)
>> 聽聽聽 at  
>> org.apache.axis2.transport.jms.JMSOutTransportInfo.<init> 
>> (JMSOutTransportInfo.java:69)
>> 聽聽聽 at org.apache.axis2.transport.jms.JMSSender.invoke 
>> (JMSSender.java:66)
>> 聽聽聽 at org.apache.axis2.engine.AxisEngine 
>> $TransportNonBlockingInvocationWorker.run(AxisEngine.java:746)
>> 聽聽聽 at  
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
>> $Worker.runTask(ThreadPoolExecutor.java:665)
>> 聽聽聽 at  
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
>> $Worker.run(ThreadPoolExecutor.java:690)
>> 聽聽聽 at java.lang.Thread.run(Unknown Source)
>> 2007-1-20 21:37:26 org.apache.axis2.engine.AxisEngine 
>> $TransportNonBlockingInvocationWorker run
>> info: Cannot get JMS Connection factory with props :  
>> {java.naming.provider.url=tcp://localhost:61616,  
>> java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextF 
>> actory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/ 
>> myQueueConnectionFactory}
>> C:\Axis2_1.1\axis2-1.1\samples\Axis2JmsWorkingSample2 
>> \client_repository
>> 2007-1-20 21:37:29 org.apache.axis2.deployment.DeploymentEngine  
>> doDeploy
>> info: Deploying module : addressing-1.1
>> 2007-1-20 21:37:29  
>> org.apache.axis2.transport.jms.JMSOutTransportInfo handleException
>> error: Cannot get JMS Connection factory with props :  
>> {java.naming.provider.url=tcp://localhost:61616,  
>> java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextF 
>> actory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/ 
>> myQueueConnectionFactory}
>> javax.naming.NamingException: scheme java not recognized
>> 聽聽聽 at org.activemq.jndi.ReadOnlyContext.lookup 
>> (ReadOnlyContext.java:198)
>> 聽聽聽 at javax.naming.InitialContext.lookup(Unknown Source)
>> 聽聽聽 at  
>> org.apache.axis2.transport.jms.JMSOutTransportInfo.getConnectionFacto 
>> ry(JMSOutTransportInfo.java:85)
>> 聽聽聽 at  
>> org.apache.axis2.transport.jms.JMSOutTransportInfo.<init> 
>> (JMSOutTransportInfo.java:69)
>> 聽聽聽 at org.apache.axis2.transport.jms.JMSSender.invoke 
>> (JMSSender.java:66)
>> 聽聽聽 at org.apache.axis2.engine.AxisEngine.send 
>> (AxisEngine.java:670)
>> 聽聽聽 at  
>> org.apache.axis2.description.OutInAxisOperationClient.send 
>> (OutInAxisOperation.java:365)
>> 聽聽聽 at org.apache.axis2.description.OutInAxisOperationClient 
>> $NonBlockingInvocationWorker.run(OutInAxisOperation.java:444)
>> 聽聽聽 at  
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
>> $Worker.runTask(ThreadPoolExecutor.java:665)
>> 聽聽聽 at  
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
>> $Worker.run(ThreadPoolExecutor.java:690)
>> 聽聽聽 at java.lang.Thread.run(Unknown Source)
>> 2007-1-20 21:37:29 org.apache.axis2.jms2.JMSActiveEchoClient$1  
>> onError
>> info: Cannot get JMS Connection factory with props :  
>> {java.naming.provider.url=tcp://localhost:61616,  
>> java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextF 
>> actory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/ 
>> myQueueConnectionFactory}
>> 2007-1-20 21:37:30 org.apache.axis2.deployment.DeploymentEngine  
>> doDeploy
>> info: Deploying module : addressing-1.1
>> C:\Axis2_1.1\axis2-1.1\samples\Axis2JmsWorkingSample2 
>> \client_repository
>> 2007-1-20 21:37:30  
>> org.apache.axis2.transport.jms.JMSOutTransportInfo handleException
>> error: Cannot get JMS Connection factory with props :  
>> {java.naming.provider.url=tcp://localhost:61616,  
>> java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextF 
>> actory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/ 
>> myQueueConnectionFactory}
>> javax.naming.NamingException: scheme java not recognized
>> 聽聽聽 at org.activemq.jndi.ReadOnlyContext.lookup 
>> (ReadOnlyContext.java:198)
>> 聽聽聽 at javax.naming.InitialContext.lookup(Unknown Source)
>> 聽聽聽 at  
>> org.apache.axis2.transport.jms.JMSOutTransportInfo.getConnectionFacto 
>> ry(JMSOutTransportInfo.java:85)
>> 聽聽聽 at  
>> org.apache.axis2.transport.jms.JMSOutTransportInfo.<init> 
>> (JMSOutTransportInfo.java:69)
>> 聽聽聽 at org.apache.axis2.transport.jms.JMSSender.invoke 
>> (JMSSender.java:66)
>> 聽聽聽 at org.apache.axis2.engine.AxisEngine.send 
>> (AxisEngine.java:670)
>> 聽聽聽 at  
>> org.apache.axis2.description.OutInAxisOperationClient.send 
>> (OutInAxisOperation.java:365)
>> 聽聽聽 at  
>> org.apache.axis2.description.OutInAxisOperationClient.execute 
>> (OutInAxisOperation.java:295)
>> 聽聽聽 at org.apache.axis2.client.ServiceClient.sendReceive 
>> (ServiceClient.java:579)
>> 聽聽聽 at org.apache.axis2.client.ServiceClient.sendReceive 
>> (ServiceClient.java:508)
>> 聽聽聽 at  
>> org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking 
>> (RPCServiceClient.java:95)
>> 聽聽聽 at  
>> org.apache.axis2.jms2.JMSActiveEchoClient.test03EchoString 
>> (JMSActiveEchoClient.java:249)
>> 聽聽聽 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native  
>> Method)
>> 聽聽聽 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown  
>> Source)
>> 聽聽聽 at sun.reflect.DelegatingMethodAccessorImpl.invoke 
>> (Unknown Source)
>> 聽聽聽 at java.lang.reflect.Method.invoke(Unknown Source)
>> 聽聽聽 at junit.framework.TestCase.runTest(TestCase.java:164)
>> 聽聽聽 at junit.framework.TestCase.runBare(TestCase.java:130)
>> 聽聽聽 at junit.framework.TestResult$1.protect(TestResult.java: 
>> 110)
>> 聽聽聽 at junit.framework.TestResult.runProtected 
>> (TestResult.java:128)
>> 聽聽聽 at junit.framework.TestResult.run(TestResult.java:113)
>> 聽聽聽 at junit.framework.TestCase.run(TestCase.java:120)
>> 聽聽聽 at junit.framework.TestSuite.runTest(TestSuite.java:228)
>> 聽聽聽 at junit.framework.TestSuite.run(TestSuite.java:223)
>> 聽聽聽 at org.junit.internal.runners.OldTestClassRunner.run 
>> (OldTestClassRunner.java:35)
>> 聽聽聽 at  
>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run 
>> (JUnit4TestReference.java:38)
>> 聽聽聽 at org.eclipse.jdt.internal.junit.runner.TestExecution.run 
>> (TestExecution.java:38)
>> 聽聽聽 at  
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests 
>> (RemoteTestRunner.java:460)
>> 聽聽聽 at  
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests 
>> (RemoteTestRunner.java:673)
>> 聽聽聽 at  
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run 
>> (RemoteTestRunner.java:386)
>> 聽聽聽 at  
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main 
>> (RemoteTestRunner.java:196)
>>
>> Lin Sun <li...@gmail.com> wrote锛�
>> Hi there, you can look at the jms and mdb sample that comes w/  
>> geronimo 1.1 doc - http://cwiki.apache.org/GMOxDOC11/jms-and-mdb- 
>> sample-application.html. Also I think the daytrader sample also  
>> uses the resource-ref and message-destination-ref you mentioned.
>>
>> HTH, Lin
>> ________________________________________
>> From: falom [mailto:falom2008@yahoo.com.cn]
>> Sent: Friday, January 19, 2007 10:01 PM
>> To: user@geronimo.apache.org
>> Subject: [geronimo1.1.1] Re: Re: Axis2 war classloader  
>> ClassNotFoundException
>>
>> Hi Lin,
>>
>> Big thanks for the tip, it worked after a bit struggling with all  
>> the resource config in both geronimo and axis2. I will test now to  
>> see if axis2 client can call and get response from the server.  
>> BTW, do you know a good place to read more about all the ejb  
>> config parameters like following:
>>
>>
>> jms/myQueueConnectionFactory
>> javax.jms.QueueConnectionFactory
>> Container
>> Shareable
>>
>>
>>
>> jms/myQueue
>> javax.jms.Queue
>> Produces
>> myQueue
>>
>>
>> falom
>>
>> Lin Sun wrote锛�
>> Hi there, I haven't tried to configure this myself but wonder if  
>> you can fix this by creating a Geronimo-web.xml for the axis2 war  
>> file. In the Geronimo-web.xml file, you can specify the activemq  
>> broker as the dependency of the axis2 war to request the  
>> classloder to make the activemq broker avail for the axis2 war.
>>
>> HTH Lin
>>
>> ________________________________________
>> From: falom [mailto:falom2008@yahoo.com.cn]
>> Sent: Thursday, January 18, 2007 9:36 PM
>> To: user@geronimo.apache.org
>> Subject: [geronimo1.1.1] Axis2 war classloader ClassNotFoundException
>>
>> Hi,
>>
>> I installed axis2 war in both tomcat and geronimo.
>>
>> First I managed to test axis2 jms transport in tomcat connecting  
>> to standalone activemq broker by deploying one service using  
>> servicelifecycle to start up the jmslistener.
>>
>> BUT when i deploy the same service in geronimo, while trying  
>> connect to the activemq broker within geronimo, i got following  
>> exception attached, seems like problem related to classloader, or  
>> something else which i am really stuck with. I also reconfigured  
>> axis2 listener to use  
>> org.activemq.jndi.ActiveMQInitialContextFactory instead of  
>> org.apache.activemq.jndi.ActiveMQInitialContextFactory, but same  
>> exception.
>> I really need some clue what i do wrong, or how to go around this  
>> classloading issue.
>>
>> falom
>>
>> 22:46:30,709 INFO [JMSActiveEchoServiceLifeCycle]  
>> JMSActiveEchoServiceLifeCycle startUp called.
>> 22:46:30,719 ERROR [JMSListener] Error connecting to JMS  
>> connection factory : TopicConnectionFactory
>> javax.naming.NoInitialContextException: Cannot instantiate class:  
>> org.apache.activemq.jndi.ActiveMQInitialContextFactory [Root  
>> exception is java.lang.ClassNotFoundException:  
>> org.apache.activemq.jndi.ActiveMQInitialContextFactory in  
>> classloader default/axis211/1164548268298/war]
>> at javax.naming.spi.NamingManager.getInitialContext 
>> (NamingManager.java:657)
>> at javax.naming.InitialContext.getDefaultInitCtx 
>> (InitialContext.java:247)
>> at javax.naming.InitialContext.init(InitialContext.java:223)
>> at javax.naming.InitialContext.(InitialContext.java:197)
>> at  
>> org.apache.axis2.transport.jms.JMSConnectionFactory.createInitialCont 
>> ext(JMSConnectionFactory.java:133)
>> at org.apache.axis2.transport.jms.JMSConnectionFactory.connect 
>> (JMSConnectionFactory.java:122)
>> at  
>> org.apache.axis2.transport.jms.JMSListener.initializeConnectionFactor 
>> ies(JMSListener.java:244)
>> at org.apache.axis2.transport.jms.JMSListener.init 
>> (JMSListener.java:104)
>> at org.apache.axis2.jms2.JMSActiveEchoServiceLifeCycle.startUp 
>> (JMSActiveEchoServiceLifeCycle.java:56)
>> at  
>> org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass( 
>> ServiceBuilder.java:354)
>> at org.apache.axis2.deployment.ServiceBuilder.populateService 
>> (ServiceBuilder.java:136)
>> at  
>> org.apache.axis2.deployment.repository.util.ArchiveReader.buildServic 
>> eGroup(ArchiveReader.java:91)
>> at  
>> org.apache.axis2.deployment.repository.util.ArchiveReader.processServ 
>> iceGroup(ArchiveReader.java:133)
>> at org.apache.axis2.deployment.DeploymentEngine.doDeploy 
>> (DeploymentEngine.java:528)
>> at org.apache.axis2.deployment.repository.util.WSInfoList.update 
>> (WSInfoList.java:196)
>> at org.apache.axis2.deployment.RepositoryListener.update 
>> (RepositoryListener.java:227)
>> at org.apache.axis2.deployment.RepositoryListener.checkServices 
>> (RepositoryListener.java:174)
>> at org.apache.axis2.deployment.DeploymentEngine.loadServices 
>> (DeploymentEngine.java:88)
>> at  
>> org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices 
>> (WarBasedAxisConfigurator.java:252)
>> at  
>> org.apache.axis2.context.ConfigurationContextFactory.createConfigurat 
>> ionContext(ConfigurationContextFactory.java:72)
>> at org.apache.axis2.transport.http.AxisServlet.initConfigContext 
>> (AxisServlet.java:373)
>> at org.apache.axis2.transport.http.AxisServlet.init 
>> (AxisServlet.java:317)
>> at org.apache.catalina.core.StandardWrapper.loadServlet 
>> (StandardWrapper.java:1105)
>> at org.apache.catalina.core.StandardWrapper.load 
>> (StandardWrapper.java:932)
>> at org.apache.catalina.core.StandardContext.loadOnStartup 
>> (StandardContext.java:3915)
>> at org.apache.catalina.core.StandardContext.start 
>> (StandardContext.java:4176)
>> at org.apache.geronimo.tomcat.GeronimoStandardContext.access$201 
>> (GeronimoStandardContext.java:67)
>> at org.apache.geronimo.tomcat.GeronimoStandardContext 
>> $SystemMethodValve.invoke(GeronimoStandardContext.java:337)
>> at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke 
>> (GeronimoBeforeAfterValve.java:31)
>> at org.apache.geronimo.tomcat.GeronimoStandardContext.start 
>> (GeronimoStandardContext.java:192)
>> at org.apache.catalina.core.ContainerBase.addChildInternal 
>> (ContainerBase.java:759)
>> at org.apache.catalina.core.ContainerBase.addChild 
>> (ContainerBase.java:739)
>> at org.apache.catalina.core.StandardHost.addChild 
>> (StandardHost.java:524)
>> at org.apache.geronimo.tomcat.TomcatContainer.addContext 
>> (TomcatContainer.java:313)
>> at org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$ 
>> $9370b073.invoke()
>> at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>> at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
>> (FastMethodInvoker.java:38)
>> at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
>> (GBeanOperation.java:122)
>> at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
>> (GBeanInstance.java:817)
>> at org.apache.geronimo.gbean.runtime.RawInvoker.invoke 
>> (RawInvoker.java:57)
>> at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke 
>> (RawOperationInvoker.java:35)
>> at  
>> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept 
>> (ProxyMethodInterceptor.java:96)
>> at org.apache.geronimo.tomcat.TomcatContainer$$EnhancerByCGLIB$ 
>> $f3376869.addContext()
>> at org.apache.geronimo.tomcat.TomcatWebAppContext.doStart 
>> (TomcatWebAppContext.java:438)
>> at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance 
>> (GBeanInstance.java:981)
>> at  
>> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart 
>> (GBeanInstanceState.java:267)
>> at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start 
>> (GBeanInstanceState.java:102)
>> at  
>> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive 
>> (GBeanInstanceState.java:124)
>> at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive 
>> (GBeanInstance.java:540)
>> at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean 
>> (BasicKernel.java:379)
>> at  
>> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfiguratio 
>> nGBeans(ConfigurationUtil.java:374)
>> at  
>> org.apache.geronimo.kernel.config.KernelConfigurationManager.start 
>> (KernelConfigurationManager.java:187)
>> at  
>> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startCon 
>> figuration(SimpleConfigurationManager.java:527)
>> at  
>> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startCon 
>> figuration(SimpleConfigurationManager.java:508)
>> at org.apache.geronimo.kernel.config.SimpleConfigurationManager$ 
>> $FastClassByCGLIB$$ce77a924.invoke()
>> at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>> at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
>> (FastMethodInvoker.java:38)
>> at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
>> (GBeanOperation.java:122)
>> at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
>> (GBeanInstance.java:817)
>> at org.apache.geronimo.gbean.runtime.RawInvoker.invoke 
>> (RawInvoker.java:57)
>> at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke 
>> (RawOperationInvoker.java:35)
>> at  
>> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept 
>> (ProxyMethodInterceptor.java:96)
>> at org.apache.geronimo.kernel.config.EditableConfigurationManager$ 
>> $EnhancerByCGLIB$$d98215e2.startConfiguration()
>> at org.apache.geronimo.system.main.Daemon.doStartup(Daemon.java:297)
>> at org.apache.geronimo.system.main.Daemon.(Daemon.java:74)
>> at org.apache.geronimo.system.main.Daemon.main(Daemon.java:377)
>>
>>
>>
>>
>>
>
>
>
> 雅虎免费邮箱-3.5G容量,20M附件


[geronimo1.1.1] Re:Re: Re: Axis2 war classloader ClassNotFoundException

Posted by falom <fa...@yahoo.com.cn>.
Hi David,

I installed axis2 1.1 war in geronimo. Since Axis2 support soap over jms, so what i'm trying to do is:
- first start axis2 jmslistner to listen one queue on geronimo activemq which i managed to do with a delpoyed axis2 web service  within geronimo server
- then i write a axis2 client to call the service, which involve first connecting to the  geronimo activemq broker to locate a predefined connectionfactory, where i got the following exception.

falom

David Jencks <da...@yahoo.com> wrote�� I don't understand what you are trying to do, but I will comment anyway.

I suspect you are trying to use the wrong jndi tree.  I would expect that in geronimo you would set up an amq rar deployment pointing to your remote amq broker and deploy an outbound connection factory and some admin objects/destinations/queues or topics.  This would all be in geronimo.  


The next step would be to make it so axis is using the geronimo java:comp jndi context instead of the amq remote context.  I suspect this is going to involve installing an interceptor into axis2 since from the stack trace it looks like the thread involved is coming from a thread pool controlled by axis and the jndi java:comp context relies on a ThreadLocal to hold the correct context.  An axis2 expert is going to need to comment on how to do this :-)


thanks
david jencks

On Jan 20, 2007, at 5:48 AM, falom wrote:

Hi Lin,

I setup jms resource in geronimo and have one axis2 client trying to connection to it and call one axis2 service, but i got javax.naming.NamingException: scheme java not recognized exception. Does this mean incompatibility between geronimo's activemq and current axis2 jms implementation? Or do you have any idea how to go around this. I did manage to have the axis2 jms listener up working within geronimo server.

falom

2007-1-20 21:37:26 org.apache.axis2.transport.jms.JMSOutTransportInfo handleException
error: Cannot get JMS Connection factory with props : {java.naming.provider.url=tcp://localhost:61616, java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextFactory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/myQueueConnectionFactory}
javax.naming.NamingException: scheme java not recognized
    at org.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:198)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at  org.apache.axis2.transport.jms.JMSOutTransportInfo.getConnectionFactory(JMSOutTransportInfo.java:85)
    at org.apache.axis2.transport.jms.JMSOutTransportInfo.<init>(JMSOutTransportInfo.java:69)
    at org.apache.axis2.transport.jms.JMSSender.invoke(JMSSender.java:66)
    at org.apache.axis2.engine.AxisEngine$TransportNonBlockingInvocationWorker.run(AxisEngine.java:746)
    at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
    at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
    at java.lang.Thread.run(Unknown Source)
2007-1-20 21:37:26 org.apache.axis2.engine.AxisEngine$TransportNonBlockingInvocationWorker run
info: Cannot get JMS Connection factory with props : {java.naming.provider.url=tcp://localhost:61616, java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextFactory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/myQueueConnectionFactory}
C:\Axis2_1.1\axis2-1.1\samples\Axis2JmsWorkingSample2\client_repository
2007-1-20 21:37:29 org.apache.axis2.deployment.DeploymentEngine doDeploy
info: Deploying module : addressing-1.1
2007-1-20 21:37:29 org.apache.axis2.transport.jms.JMSOutTransportInfo handleException
error: Cannot get JMS Connection factory with props : {java.naming.provider.url=tcp://localhost:61616, java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextFactory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/myQueueConnectionFactory}
javax.naming.NamingException: scheme java not recognized
    at org.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:198)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at  org.apache.axis2.transport.jms.JMSOutTransportInfo.getConnectionFactory(JMSOutTransportInfo.java:85)
    at org.apache.axis2.transport.jms.JMSOutTransportInfo.<init>(JMSOutTransportInfo.java:69)
    at org.apache.axis2.transport.jms.JMSSender.invoke(JMSSender.java:66)
    at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:670)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:365)
    at org.apache.axis2.description.OutInAxisOperationClient$NonBlockingInvocationWorker.run(OutInAxisOperation.java:444)
    at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
    at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
    at java.lang.Thread.run(Unknown  Source)
2007-1-20 21:37:29 org.apache.axis2.jms2.JMSActiveEchoClient$1 onError
info: Cannot get JMS Connection factory with props : {java.naming.provider.url=tcp://localhost:61616, java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextFactory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/myQueueConnectionFactory}
2007-1-20 21:37:30 org.apache.axis2.deployment.DeploymentEngine doDeploy
info: Deploying module : addressing-1.1
C:\Axis2_1.1\axis2-1.1\samples\Axis2JmsWorkingSample2\client_repository
2007-1-20 21:37:30 org.apache.axis2.transport.jms.JMSOutTransportInfo handleException
error: Cannot get JMS Connection factory with props : {java.naming.provider.url=tcp://localhost:61616, java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextFactory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/myQueueConnectionFactory}
javax.naming.NamingException: scheme java not recognized
    at  org.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:198)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at org.apache.axis2.transport.jms.JMSOutTransportInfo.getConnectionFactory(JMSOutTransportInfo.java:85)
    at org.apache.axis2.transport.jms.JMSOutTransportInfo.<init>(JMSOutTransportInfo.java:69)
    at org.apache.axis2.transport.jms.JMSSender.invoke(JMSSender.java:66)
    at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:670)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:365)
    at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:295)
    at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:579)
    at  org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
    at org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:95)
    at org.apache.axis2.jms2.JMSActiveEchoClient.test03EchoString(JMSActiveEchoClient.java:249)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at junit.framework.TestCase.runTest(TestCase.java:164)
    at junit.framework.TestCase.runBare(TestCase.java:130)
    at junit.framework.TestResult$1.protect(TestResult.java:110)
    at junit.framework.TestResult.runProtected(TestResult.java:128)
    at  junit.framework.TestResult.run(TestResult.java:113)
    at junit.framework.TestCase.run(TestCase.java:120)
    at junit.framework.TestSuite.runTest(TestSuite.java:228)
    at junit.framework.TestSuite.run(TestSuite.java:223)
    at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
    at  org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

Lin Sun <li...@gmail.com> wrote! Hi there, you can look at the jms and mdb sample that comes w/ geronimo 1.1 doc - http://cwiki.apache.org/GMOxDOC11/jms-and-mdb-sample-application.html.  Also I think the daytrader sample also uses the resource-ref and message-destination-ref you mentioned.

HTH, Lin
________________________________________
From: falom [mailto:falom2008@yahoo.com.cn] 
Sent: Friday, January 19, 2007 10:01 PM
To: user@geronimo.apache.org
Subject: [geronimo1.1.1] Re: Re: Axis2 war classloader ClassNotFoundException

Hi Lin,

Big thanks for the tip, it worked after a bit struggling with all the resource config in both geronimo and axis2. I will test now to see if axis2 client can call and get response from the server. BTW, do you know a  good place to read more about all the ejb config parameters like following:

    
        jms/myQueueConnectionFactory
        javax.jms.QueueConnectionFactory
        Container
        Shareable
     
    
    
        jms/myQueue
        javax.jms.Queue
        Produces
        myQueue
    

falom

Lin Sun  wrote!
Hi there, I haven't tried to configure this myself but wonder if you can fix this by creating a Geronimo-web.xml for the axis2 war file. In the Geronimo-web.xml file, you can specify the activemq broker as the dependency of the axis2 war to request the classloder to make the activemq broker avail for the axis2 war.

HTH Lin 

________________________________________
From: falom [mailto:falom2008@yahoo.com.cn] 
Sent: Thursday, January 18, 2007 9:36 PM
To: user@geronimo.apache.org
Subject: [geronimo1.1.1] Axis2 war classloader ClassNotFoundException

Hi,

I installed axis2 war in both tomcat and geronimo.

First I managed to test axis2 jms transport in tomcat connecting to standalone activemq broker by deploying one service using servicelifecycle to start up the jmslistener. 

BUT when i deploy the same service in geronimo, while trying connect to the activemq broker within geronimo, i got following exception attached, seems like problem related to classloader, or something else which i am really stuck with. I also reconfigured axis2 listener to use org.activemq.jndi.ActiveMQInitialContextFactory instead of org.apache.activemq.jndi.ActiveMQInitialContextFactory, but same exception.
I really need some clue what i do wrong, or how to go around this classloading issue.

falom

22:46:30,709 INFO [JMSActiveEchoServiceLifeCycle] JMSActiveEchoServiceLifeCycle startUp called.
22:46:30,719 ERROR [JMSListener] Error connecting to JMS connection factory : TopicConnectionFactory
javax.naming.NoInitialContextException: Cannot instantiate class: org.apache.activemq.jndi.ActiveMQInitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.apache.activemq.jndi.ActiveMQInitialContextFactory in classloader default/axis211/1164548268298/war]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.(InitialContext.java:197)
at org.apache.axis2.transport.jms.JMSConnectionFactory.createInitialContext(JMSConnectionFactory.java:133)
at org.apache.axis2.transport.jms.JMSConnectionFactory.connect(JMSConnectionFactory.java:122)
at org.apache.axis2.transport.jms.JMSListener.initializeConnectionFactories(JMSListener.java:244)
at org.apache.axis2.transport.jms.JMSListener.init(JMSListener.java:104)
at org.apache.axis2.jms2.JMSActiveEchoServiceLifeCycle.startUp(JMSActiveEchoServiceLifeCycle.java:56)
at org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass(ServiceBuilder.java:354)
at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:136)
at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:91)
at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:133)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:528)
at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:196)
at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:227)
at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:174)
at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:88)
at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:252)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:72)
at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:373)
at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:317)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
at org.apache.geronimo.tomcat.GeronimoStandardContext.access$201(GeronimoStandardContext.java:67)
at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:337)
at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:31)
at org.apache.geronimo.tomcat.GeronimoStandardContext.start(GeronimoStandardContext.java:192)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.geronimo.tomcat.TomcatContainer.addContext(TomcatContainer.java:313)
at org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$$9370b073.invoke()
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
at org.apache.geronimo.tomcat.TomcatContainer$$EnhancerByCGLIB$$f3376869.addContext()
at org.apache.geronimo.tomcat.TomcatWebAppContext.doStart(TomcatWebAppContext.java:438)
at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:981)
at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:267)
at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124)
at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:540)
at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379)
at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:374)
at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187)
at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:527)
at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:508)
at org.apache.geronimo.kernel.config.SimpleConfigurationManager$$FastClassByCGLIB$$ce77a924.invoke()
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
at org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$d98215e2.startConfiguration()
at org.apache.geronimo.system.main.Daemon.doStartup(Daemon.java:297)
at org.apache.geronimo.system.main.Daemon.(Daemon.java:74)
at org.apache.geronimo.system.main.Daemon.main(Daemon.java:377)



  

  




 		
---------------------------------
 �Ż��������-3.5G������20M����

Re: [geronimo1.1.1] Re:Re: Re: Axis2 war classloader ClassNotFoundException

Posted by David Jencks <da...@yahoo.com>.
I don't understand what you are trying to do, but I will comment anyway.

I suspect you are trying to use the wrong jndi tree.  I would expect  
that in geronimo you would set up an amq rar deployment pointing to  
your remote amq broker and deploy an outbound connection factory and  
some admin objects/destinations/queues or topics.  This would all be  
in geronimo.

The next step would be to make it so axis is using the geronimo  
java:comp jndi context instead of the amq remote context.  I suspect  
this is going to involve installing an interceptor into axis2 since  
from the stack trace it looks like the thread involved is coming from  
a thread pool controlled by axis and the jndi java:comp context  
relies on a ThreadLocal to hold the correct context.  An axis2 expert  
is going to need to comment on how to do this :-)

thanks
david jencks

On Jan 20, 2007, at 5:48 AM, falom wrote:

> Hi Lin,
>
> I setup jms resource in geronimo and have one axis2 client trying  
> to connection to it and call one axis2 service, but i got  
> javax.naming.NamingException: scheme java not recognized exception.  
> Does this mean incompatibility between geronimo's activemq and  
> current axis2 jms implementation? Or do you have any idea how to go  
> around this. I did manage to have the axis2 jms listener up working  
> within geronimo server.
>
> falom
>
> 2007-1-20 21:37:26  
> org.apache.axis2.transport.jms.JMSOutTransportInfo handleException
> error: Cannot get JMS Connection factory with props :  
> {java.naming.provider.url=tcp://localhost:61616,  
> java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextFa 
> ctory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/ 
> myQueueConnectionFactory}
> javax.naming.NamingException: scheme java not recognized
>     at org.activemq.jndi.ReadOnlyContext.lookup 
> (ReadOnlyContext.java:198)
>     at javax.naming.InitialContext.lookup(Unknown Source)
>     at  
> org.apache.axis2.transport.jms.JMSOutTransportInfo.getConnectionFactor 
> y(JMSOutTransportInfo.java:85)
>     at org.apache.axis2.transport.jms.JMSOutTransportInfo.<init> 
> (JMSOutTransportInfo.java:69)
>     at org.apache.axis2.transport.jms.JMSSender.invoke 
> (JMSSender.java:66)
>     at org.apache.axis2.engine.AxisEngine 
> $TransportNonBlockingInvocationWorker.run(AxisEngine.java:746)
>     at  
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
> $Worker.runTask(ThreadPoolExecutor.java:665)
>     at  
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
> $Worker.run(ThreadPoolExecutor.java:690)
>     at java.lang.Thread.run(Unknown Source)
> 2007-1-20 21:37:26 org.apache.axis2.engine.AxisEngine 
> $TransportNonBlockingInvocationWorker run
> info: Cannot get JMS Connection factory with props :  
> {java.naming.provider.url=tcp://localhost:61616,  
> java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextFa 
> ctory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/ 
> myQueueConnectionFactory}
> C:\Axis2_1.1\axis2-1.1\samples\Axis2JmsWorkingSample2 
> \client_repository
> 2007-1-20 21:37:29 org.apache.axis2.deployment.DeploymentEngine  
> doDeploy
> info: Deploying module : addressing-1.1
> 2007-1-20 21:37:29  
> org.apache.axis2.transport.jms.JMSOutTransportInfo handleException
> error: Cannot get JMS Connection factory with props :  
> {java.naming.provider.url=tcp://localhost:61616,  
> java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextFa 
> ctory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/ 
> myQueueConnectionFactory}
> javax.naming.NamingException: scheme java not recognized
>     at org.activemq.jndi.ReadOnlyContext.lookup 
> (ReadOnlyContext.java:198)
>     at javax.naming.InitialContext.lookup(Unknown Source)
>     at  
> org.apache.axis2.transport.jms.JMSOutTransportInfo.getConnectionFactor 
> y(JMSOutTransportInfo.java:85)
>     at org.apache.axis2.transport.jms.JMSOutTransportInfo.<init> 
> (JMSOutTransportInfo.java:69)
>     at org.apache.axis2.transport.jms.JMSSender.invoke 
> (JMSSender.java:66)
>     at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:670)
>     at org.apache.axis2.description.OutInAxisOperationClient.send 
> (OutInAxisOperation.java:365)
>     at org.apache.axis2.description.OutInAxisOperationClient 
> $NonBlockingInvocationWorker.run(OutInAxisOperation.java:444)
>     at  
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
> $Worker.runTask(ThreadPoolExecutor.java:665)
>     at  
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
> $Worker.run(ThreadPoolExecutor.java:690)
>     at java.lang.Thread.run(Unknown Source)
> 2007-1-20 21:37:29 org.apache.axis2.jms2.JMSActiveEchoClient$1 onError
> info: Cannot get JMS Connection factory with props :  
> {java.naming.provider.url=tcp://localhost:61616,  
> java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextFa 
> ctory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/ 
> myQueueConnectionFactory}
> 2007-1-20 21:37:30 org.apache.axis2.deployment.DeploymentEngine  
> doDeploy
> info: Deploying module : addressing-1.1
> C:\Axis2_1.1\axis2-1.1\samples\Axis2JmsWorkingSample2 
> \client_repository
> 2007-1-20 21:37:30  
> org.apache.axis2.transport.jms.JMSOutTransportInfo handleException
> error: Cannot get JMS Connection factory with props :  
> {java.naming.provider.url=tcp://localhost:61616,  
> java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextFa 
> ctory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/ 
> myQueueConnectionFactory}
> javax.naming.NamingException: scheme java not recognized
>     at org.activemq.jndi.ReadOnlyContext.lookup 
> (ReadOnlyContext.java:198)
>     at javax.naming.InitialContext.lookup(Unknown Source)
>     at  
> org.apache.axis2.transport.jms.JMSOutTransportInfo.getConnectionFactor 
> y(JMSOutTransportInfo.java:85)
>     at org.apache.axis2.transport.jms.JMSOutTransportInfo.<init> 
> (JMSOutTransportInfo.java:69)
>     at org.apache.axis2.transport.jms.JMSSender.invoke 
> (JMSSender.java:66)
>     at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:670)
>     at org.apache.axis2.description.OutInAxisOperationClient.send 
> (OutInAxisOperation.java:365)
>     at org.apache.axis2.description.OutInAxisOperationClient.execute 
> (OutInAxisOperation.java:295)
>     at org.apache.axis2.client.ServiceClient.sendReceive 
> (ServiceClient.java:579)
>     at org.apache.axis2.client.ServiceClient.sendReceive 
> (ServiceClient.java:508)
>     at org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking 
> (RPCServiceClient.java:95)
>     at org.apache.axis2.jms2.JMSActiveEchoClient.test03EchoString 
> (JMSActiveEchoClient.java:249)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>     at java.lang.reflect.Method.invoke(Unknown Source)
>     at junit.framework.TestCase.runTest(TestCase.java:164)
>     at junit.framework.TestCase.runBare(TestCase.java:130)
>     at junit.framework.TestResult$1.protect(TestResult.java:110)
>     at junit.framework.TestResult.runProtected(TestResult.java:128)
>     at junit.framework.TestResult.run(TestResult.java:113)
>     at junit.framework.TestCase.run(TestCase.java:120)
>     at junit.framework.TestSuite.runTest(TestSuite.java:228)
>     at junit.framework.TestSuite.run(TestSuite.java:223)
>     at org.junit.internal.runners.OldTestClassRunner.run 
> (OldTestClassRunner.java:35)
>     at  
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run 
> (JUnit4TestReference.java:38)
>     at org.eclipse.jdt.internal.junit.runner.TestExecution.run 
> (TestExecution.java:38)
>     at  
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests 
> (RemoteTestRunner.java:460)
>     at  
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests 
> (RemoteTestRunner.java:673)
>     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run 
> (RemoteTestRunner.java:386)
>     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main 
> (RemoteTestRunner.java:196)
>
> Lin Sun <li...@gmail.com> wrote:
> Hi there, you can look at the jms and mdb sample that comes w/  
> geronimo 1.1 doc - http://cwiki.apache.org/GMOxDOC11/jms-and-mdb- 
> sample-application.html. Also I think the daytrader sample also  
> uses the resource-ref and message-destination-ref you mentioned.
>
> HTH, Lin
> ________________________________________
> From: falom [mailto:falom2008@yahoo.com.cn]
> Sent: Friday, January 19, 2007 10:01 PM
> To: user@geronimo.apache.org
> Subject: [geronimo1.1.1] Re: Re: Axis2 war classloader  
> ClassNotFoundException
>
> Hi Lin,
>
> Big thanks for the tip, it worked after a bit struggling with all  
> the resource config in both geronimo and axis2. I will test now to  
> see if axis2 client can call and get response from the server. BTW,  
> do you know a good place to read more about all the ejb config  
> parameters like following:
>
>
> jms/myQueueConnectionFactory
> javax.jms.QueueConnectionFactory
> Container
> Shareable
>
>
>
> jms/myQueue
> javax.jms.Queue
> Produces
> myQueue
>
>
> falom
>
> Lin Sun wrote:
> Hi there, I haven't tried to configure this myself but wonder if  
> you can fix this by creating a Geronimo-web.xml for the axis2 war  
> file. In the Geronimo-web.xml file, you can specify the activemq  
> broker as the dependency of the axis2 war to request the classloder  
> to make the activemq broker avail for the axis2 war.
>
> HTH Lin
>
> ________________________________________
> From: falom [mailto:falom2008@yahoo.com.cn]
> Sent: Thursday, January 18, 2007 9:36 PM
> To: user@geronimo.apache.org
> Subject: [geronimo1.1.1] Axis2 war classloader ClassNotFoundException
>
> Hi,
>
> I installed axis2 war in both tomcat and geronimo.
>
> First I managed to test axis2 jms transport in tomcat connecting to  
> standalone activemq broker by deploying one service using  
> servicelifecycle to start up the jmslistener.
>
> BUT when i deploy the same service in geronimo, while trying  
> connect to the activemq broker within geronimo, i got following  
> exception attached, seems like problem related to classloader, or  
> something else which i am really stuck with. I also reconfigured  
> axis2 listener to use  
> org.activemq.jndi.ActiveMQInitialContextFactory instead of  
> org.apache.activemq.jndi.ActiveMQInitialContextFactory, but same  
> exception.
> I really need some clue what i do wrong, or how to go around this  
> classloading issue.
>
> falom
>
> 22:46:30,709 INFO [JMSActiveEchoServiceLifeCycle]  
> JMSActiveEchoServiceLifeCycle startUp called.
> 22:46:30,719 ERROR [JMSListener] Error connecting to JMS connection  
> factory : TopicConnectionFactory
> javax.naming.NoInitialContextException: Cannot instantiate class:  
> org.apache.activemq.jndi.ActiveMQInitialContextFactory [Root  
> exception is java.lang.ClassNotFoundException:  
> org.apache.activemq.jndi.ActiveMQInitialContextFactory in  
> classloader default/axis211/1164548268298/war]
> at javax.naming.spi.NamingManager.getInitialContext 
> (NamingManager.java:657)
> at javax.naming.InitialContext.getDefaultInitCtx 
> (InitialContext.java:247)
> at javax.naming.InitialContext.init(InitialContext.java:223)
> at javax.naming.InitialContext.(InitialContext.java:197)
> at  
> org.apache.axis2.transport.jms.JMSConnectionFactory.createInitialConte 
> xt(JMSConnectionFactory.java:133)
> at org.apache.axis2.transport.jms.JMSConnectionFactory.connect 
> (JMSConnectionFactory.java:122)
> at  
> org.apache.axis2.transport.jms.JMSListener.initializeConnectionFactori 
> es(JMSListener.java:244)
> at org.apache.axis2.transport.jms.JMSListener.init(JMSListener.java: 
> 104)
> at org.apache.axis2.jms2.JMSActiveEchoServiceLifeCycle.startUp 
> (JMSActiveEchoServiceLifeCycle.java:56)
> at  
> org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass 
> (ServiceBuilder.java:354)
> at org.apache.axis2.deployment.ServiceBuilder.populateService 
> (ServiceBuilder.java:136)
> at  
> org.apache.axis2.deployment.repository.util.ArchiveReader.buildService 
> Group(ArchiveReader.java:91)
> at  
> org.apache.axis2.deployment.repository.util.ArchiveReader.processServi 
> ceGroup(ArchiveReader.java:133)
> at org.apache.axis2.deployment.DeploymentEngine.doDeploy 
> (DeploymentEngine.java:528)
> at org.apache.axis2.deployment.repository.util.WSInfoList.update 
> (WSInfoList.java:196)
> at org.apache.axis2.deployment.RepositoryListener.update 
> (RepositoryListener.java:227)
> at org.apache.axis2.deployment.RepositoryListener.checkServices 
> (RepositoryListener.java:174)
> at org.apache.axis2.deployment.DeploymentEngine.loadServices 
> (DeploymentEngine.java:88)
> at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices 
> (WarBasedAxisConfigurator.java:252)
> at  
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurati 
> onContext(ConfigurationContextFactory.java:72)
> at org.apache.axis2.transport.http.AxisServlet.initConfigContext 
> (AxisServlet.java:373)
> at org.apache.axis2.transport.http.AxisServlet.init 
> (AxisServlet.java:317)
> at org.apache.catalina.core.StandardWrapper.loadServlet 
> (StandardWrapper.java:1105)
> at org.apache.catalina.core.StandardWrapper.load 
> (StandardWrapper.java:932)
> at org.apache.catalina.core.StandardContext.loadOnStartup 
> (StandardContext.java:3915)
> at org.apache.catalina.core.StandardContext.start 
> (StandardContext.java:4176)
> at org.apache.geronimo.tomcat.GeronimoStandardContext.access$201 
> (GeronimoStandardContext.java:67)
> at org.apache.geronimo.tomcat.GeronimoStandardContext 
> $SystemMethodValve.invoke(GeronimoStandardContext.java:337)
> at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke 
> (GeronimoBeforeAfterValve.java:31)
> at org.apache.geronimo.tomcat.GeronimoStandardContext.start 
> (GeronimoStandardContext.java:192)
> at org.apache.catalina.core.ContainerBase.addChildInternal 
> (ContainerBase.java:759)
> at org.apache.catalina.core.ContainerBase.addChild 
> (ContainerBase.java:739)
> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java: 
> 524)
> at org.apache.geronimo.tomcat.TomcatContainer.addContext 
> (TomcatContainer.java:313)
> at org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$ 
> $9370b073.invoke()
> at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
> at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
> (FastMethodInvoker.java:38)
> at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
> (GBeanOperation.java:122)
> at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
> (GBeanInstance.java:817)
> at org.apache.geronimo.gbean.runtime.RawInvoker.invoke 
> (RawInvoker.java:57)
> at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke 
> (RawOperationInvoker.java:35)
> at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept 
> (ProxyMethodInterceptor.java:96)
> at org.apache.geronimo.tomcat.TomcatContainer$$EnhancerByCGLIB$ 
> $f3376869.addContext()
> at org.apache.geronimo.tomcat.TomcatWebAppContext.doStart 
> (TomcatWebAppContext.java:438)
> at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance 
> (GBeanInstance.java:981)
> at  
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart( 
> GBeanInstanceState.java:267)
> at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start 
> (GBeanInstanceState.java:102)
> at  
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive 
> (GBeanInstanceState.java:124)
> at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive 
> (GBeanInstance.java:540)
> at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean 
> (BasicKernel.java:379)
> at  
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfiguration 
> GBeans(ConfigurationUtil.java:374)
> at  
> org.apache.geronimo.kernel.config.KernelConfigurationManager.start 
> (KernelConfigurationManager.java:187)
> at  
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConf 
> iguration(SimpleConfigurationManager.java:527)
> at  
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConf 
> iguration(SimpleConfigurationManager.java:508)
> at org.apache.geronimo.kernel.config.SimpleConfigurationManager$ 
> $FastClassByCGLIB$$ce77a924.invoke()
> at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
> at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
> (FastMethodInvoker.java:38)
> at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
> (GBeanOperation.java:122)
> at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
> (GBeanInstance.java:817)
> at org.apache.geronimo.gbean.runtime.RawInvoker.invoke 
> (RawInvoker.java:57)
> at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke 
> (RawOperationInvoker.java:35)
> at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept 
> (ProxyMethodInterceptor.java:96)
> at org.apache.geronimo.kernel.config.EditableConfigurationManager$ 
> $EnhancerByCGLIB$$d98215e2.startConfiguration()
> at org.apache.geronimo.system.main.Daemon.doStartup(Daemon.java:297)
> at org.apache.geronimo.system.main.Daemon.(Daemon.java:74)
> at org.apache.geronimo.system.main.Daemon.main(Daemon.java:377)
>
>
>
>
> ________________________________________
> 抢注雅虎免费邮箱-3.5G容量,20M附件!
>
>
>
> Mp3疯狂搜-新歌热歌高速下


[geronimo1.1.1] Re:Re: Re: Axis2 war classloader ClassNotFoundException

Posted by falom <fa...@yahoo.com.cn>.
Hi Lin,

I setup jms resource in geronimo and have one axis2 client trying to connection to it and call one axis2 service, but i got javax.naming.NamingException: scheme java not recognized exception. Does this mean incompatibility between geronimo's activemq and current axis2 jms implementation? Or do you have any idea how to go around this. I did manage to have the axis2 jms listener up working within geronimo server.

falom

2007-1-20 21:37:26 org.apache.axis2.transport.jms.JMSOutTransportInfo handleException
error: Cannot get JMS Connection factory with props : {java.naming.provider.url=tcp://localhost:61616, java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextFactory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/myQueueConnectionFactory}
javax.naming.NamingException: scheme java not recognized
    at org.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:198)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at  org.apache.axis2.transport.jms.JMSOutTransportInfo.getConnectionFactory(JMSOutTransportInfo.java:85)
    at org.apache.axis2.transport.jms.JMSOutTransportInfo.<init>(JMSOutTransportInfo.java:69)
    at org.apache.axis2.transport.jms.JMSSender.invoke(JMSSender.java:66)
    at org.apache.axis2.engine.AxisEngine$TransportNonBlockingInvocationWorker.run(AxisEngine.java:746)
    at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
    at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
    at java.lang.Thread.run(Unknown Source)
2007-1-20 21:37:26 org.apache.axis2.engine.AxisEngine$TransportNonBlockingInvocationWorker run
info: Cannot get JMS Connection factory with props : {java.naming.provider.url=tcp://localhost:61616, java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextFactory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/myQueueConnectionFactory}
C:\Axis2_1.1\axis2-1.1\samples\Axis2JmsWorkingSample2\client_repository
2007-1-20 21:37:29 org.apache.axis2.deployment.DeploymentEngine doDeploy
info: Deploying module : addressing-1.1
2007-1-20 21:37:29 org.apache.axis2.transport.jms.JMSOutTransportInfo handleException
error: Cannot get JMS Connection factory with props : {java.naming.provider.url=tcp://localhost:61616, java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextFactory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/myQueueConnectionFactory}
javax.naming.NamingException: scheme java not recognized
    at org.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:198)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at  org.apache.axis2.transport.jms.JMSOutTransportInfo.getConnectionFactory(JMSOutTransportInfo.java:85)
    at org.apache.axis2.transport.jms.JMSOutTransportInfo.<init>(JMSOutTransportInfo.java:69)
    at org.apache.axis2.transport.jms.JMSSender.invoke(JMSSender.java:66)
    at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:670)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:365)
    at org.apache.axis2.description.OutInAxisOperationClient$NonBlockingInvocationWorker.run(OutInAxisOperation.java:444)
    at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
    at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
    at java.lang.Thread.run(Unknown  Source)
2007-1-20 21:37:29 org.apache.axis2.jms2.JMSActiveEchoClient$1 onError
info: Cannot get JMS Connection factory with props : {java.naming.provider.url=tcp://localhost:61616, java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextFactory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/myQueueConnectionFactory}
2007-1-20 21:37:30 org.apache.axis2.deployment.DeploymentEngine doDeploy
info: Deploying module : addressing-1.1
C:\Axis2_1.1\axis2-1.1\samples\Axis2JmsWorkingSample2\client_repository
2007-1-20 21:37:30 org.apache.axis2.transport.jms.JMSOutTransportInfo handleException
error: Cannot get JMS Connection factory with props : {java.naming.provider.url=tcp://localhost:61616, java.naming.factory.initial=org.activemq.jndi.ActiveMQInitialContextFactory, transport.jms.ConnectionFactoryJNDIName=java:comp/env/jms/myQueueConnectionFactory}
javax.naming.NamingException: scheme java not recognized
    at  org.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:198)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at org.apache.axis2.transport.jms.JMSOutTransportInfo.getConnectionFactory(JMSOutTransportInfo.java:85)
    at org.apache.axis2.transport.jms.JMSOutTransportInfo.<init>(JMSOutTransportInfo.java:69)
    at org.apache.axis2.transport.jms.JMSSender.invoke(JMSSender.java:66)
    at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:670)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:365)
    at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:295)
    at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:579)
    at  org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
    at org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:95)
    at org.apache.axis2.jms2.JMSActiveEchoClient.test03EchoString(JMSActiveEchoClient.java:249)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at junit.framework.TestCase.runTest(TestCase.java:164)
    at junit.framework.TestCase.runBare(TestCase.java:130)
    at junit.framework.TestResult$1.protect(TestResult.java:110)
    at junit.framework.TestResult.runProtected(TestResult.java:128)
    at  junit.framework.TestResult.run(TestResult.java:113)
    at junit.framework.TestCase.run(TestCase.java:120)
    at junit.framework.TestSuite.runTest(TestSuite.java:228)
    at junit.framework.TestSuite.run(TestSuite.java:223)
    at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
    at  org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

Lin Sun <li...@gmail.com> wrote: Hi there, you can look at the jms and mdb sample that comes w/ geronimo 1.1 doc - http://cwiki.apache.org/GMOxDOC11/jms-and-mdb-sample-application.html.  Also I think the daytrader sample also uses the resource-ref and message-destination-ref you mentioned.

HTH, Lin
________________________________________
From: falom [mailto:falom2008@yahoo.com.cn] 
Sent: Friday, January 19, 2007 10:01 PM
To: user@geronimo.apache.org
Subject: [geronimo1.1.1] Re: Re: Axis2 war classloader ClassNotFoundException

Hi Lin,

Big thanks for the tip, it worked after a bit struggling with all the resource config in both geronimo and axis2. I will test now to see if axis2 client can call and get response from the server. BTW, do you know a  good place to read more about all the ejb config parameters like following:

    
        jms/myQueueConnectionFactory
        javax.jms.QueueConnectionFactory
        Container
        Shareable
     
    
    
        jms/myQueue
        javax.jms.Queue
        Produces
        myQueue
    

falom

Lin Sun 
 wrote:
Hi there, I haven't tried to configure this myself but wonder if you can fix this by creating a Geronimo-web.xml for the axis2 war file. In the Geronimo-web.xml file, you can specify the activemq broker as the dependency of the axis2 war to request the classloder to make the activemq broker avail for the axis2 war.

HTH Lin 

________________________________________
From: falom [mailto:falom2008@yahoo.com.cn] 
Sent: Thursday, January 18, 2007 9:36 PM
To: user@geronimo.apache.org
Subject: [geronimo1.1.1] Axis2 war classloader ClassNotFoundException

Hi,

I installed axis2 war in both tomcat and geronimo.

First I managed to test axis2 jms transport in tomcat connecting to standalone activemq broker by deploying one service using servicelifecycle to start up the jmslistener. 

BUT when i deploy the same service in geronimo, while trying connect to the activemq broker within geronimo, i got following exception attached, seems like problem related to classloader, or something else which i am really stuck with. I also reconfigured axis2 listener to use org.activemq.jndi.ActiveMQInitialContextFactory instead of org.apache.activemq.jndi.ActiveMQInitialContextFactory, but same exception.
I really need some clue what i do wrong, or how to go around this classloading issue.

falom

22:46:30,709 INFO [JMSActiveEchoServiceLifeCycle] JMSActiveEchoServiceLifeCycle startUp called.
22:46:30,719 ERROR [JMSListener] Error connecting to JMS connection factory : TopicConnectionFactory
javax.naming.NoInitialContextException: Cannot instantiate class: org.apache.activemq.jndi.ActiveMQInitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.apache.activemq.jndi.ActiveMQInitialContextFactory in classloader default/axis211/1164548268298/war]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.(InitialContext.java:197)
at org.apache.axis2.transport.jms.JMSConnectionFactory.createInitialContext(JMSConnectionFactory.java:133)
at org.apache.axis2.transport.jms.JMSConnectionFactory.connect(JMSConnectionFactory.java:122)
at org.apache.axis2.transport.jms.JMSListener.initializeConnectionFactories(JMSListener.java:244)
at org.apache.axis2.transport.jms.JMSListener.init(JMSListener.java:104)
at org.apache.axis2.jms2.JMSActiveEchoServiceLifeCycle.startUp(JMSActiveEchoServiceLifeCycle.java:56)
at org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass(ServiceBuilder.java:354)
at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:136)
at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:91)
at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:133)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:528)
at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:196)
at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:227)
at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:174)
at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:88)
at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:252)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:72)
at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:373)
at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:317)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
at org.apache.geronimo.tomcat.GeronimoStandardContext.access$201(GeronimoStandardContext.java:67)
at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:337)
at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:31)
at org.apache.geronimo.tomcat.GeronimoStandardContext.start(GeronimoStandardContext.java:192)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.geronimo.tomcat.TomcatContainer.addContext(TomcatContainer.java:313)
at org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$$9370b073.invoke()
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
at org.apache.geronimo.tomcat.TomcatContainer$$EnhancerByCGLIB$$f3376869.addContext()
at org.apache.geronimo.tomcat.TomcatWebAppContext.doStart(TomcatWebAppContext.java:438)
at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:981)
at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:267)
at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124)
at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:540)
at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379)
at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:374)
at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187)
at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:527)
at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:508)
at org.apache.geronimo.kernel.config.SimpleConfigurationManager$$FastClassByCGLIB$$ce77a924.invoke()
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
at org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$d98215e2.startConfiguration()
at org.apache.geronimo.system.main.Daemon.doStartup(Daemon.java:297)
at org.apache.geronimo.system.main.Daemon.(Daemon.java:74)
at org.apache.geronimo.system.main.Daemon.main(Daemon.java:377)



  
________________________________________
抢注雅虎免费邮箱-3.5G容量,20M附件! 



 		
---------------------------------
 Mp3疯狂搜-新歌热歌高速下   

RE: [geronimo1.1.1] Re: Re: Axis2 war classloader ClassNotFoundException

Posted by Lin Sun <li...@gmail.com>.
Hi there, you can look at the jms and mdb sample that comes w/ geronimo 1.1 doc - http://cwiki.apache.org/GMOxDOC11/jms-and-mdb-sample-application.html.  Also I think the daytrader sample also uses the resource-ref and message-destination-ref you mentioned.

HTH, Lin
________________________________________
From: falom [mailto:falom2008@yahoo.com.cn] 
Sent: Friday, January 19, 2007 10:01 PM
To: user@geronimo.apache.org
Subject: [geronimo1.1.1] Re: Re: Axis2 war classloader ClassNotFoundException

Hi Lin,

Big thanks for the tip, it worked after a bit struggling with all the resource config in both geronimo and axis2. I will test now to see if axis2 client can call and get response from the server. BTW, do you know a  good place to read more about all the ejb config parameters like following:

    <resource-ref>
        <res-ref-name>jms/myQueueConnectionFactory</res-ref-name>
        <res-type>javax.jms.QueueConnectionFactory</res-type>
        <res-auth>Container</res-auth>
        <res-sharing-scope>Shareable</res-sharing-scope>
     </resource-ref>
    
    <message-destination-ref>
        <message-destination-ref-name>jms/myQueue</message-destination-ref-name>
        <message-destination-type>javax.jms.Queue</message-destination-type>
        <message-destination-usage>Produces</message-destination-usage>
        <message-destination-link>myQueue</message-destination-link>
    </message-destination-ref>

falom

Lin Sun <li...@gmail.com> wrote:
Hi there, I haven't tried to configure this myself but wonder if you can fix this by creating a Geronimo-web.xml for the axis2 war file. In the Geronimo-web.xml file, you can specify the activemq broker as the dependency of the axis2 war to request the classloder to make the activemq broker avail for the axis2 war.

HTH Lin 

________________________________________
From: falom [mailto:falom2008@yahoo.com.cn] 
Sent: Thursday, January 18, 2007 9:36 PM
To: user@geronimo.apache.org
Subject: [geronimo1.1.1] Axis2 war classloader ClassNotFoundException

Hi,

I installed axis2 war in both tomcat and geronimo.

First I managed to test axis2 jms transport in tomcat connecting to standalone activemq broker by deploying one service using servicelifecycle to start up the jmslistener. 

BUT when i deploy the same service in geronimo, while trying connect to the activemq broker within geronimo, i got following exception attached, seems like problem related to classloader, or something else which i am really stuck with. I also reconfigured axis2 listener to use org.activemq.jndi.ActiveMQInitialContextFactory instead of org.apache.activemq.jndi.ActiveMQInitialContextFactory, but same exception.
I really need some clue what i do wrong, or how to go around this classloading issue.

falom

22:46:30,709 INFO [JMSActiveEchoServiceLifeCycle] JMSActiveEchoServiceLifeCycle startUp called.
22:46:30,719 ERROR [JMSListener] Error connecting to JMS connection factory : TopicConnectionFactory
javax.naming.NoInitialContextException: Cannot instantiate class: org.apache.activemq.jndi.ActiveMQInitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.apache.activemq.jndi.ActiveMQInitialContextFactory in classloader default/axis211/1164548268298/war]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.(InitialContext.java:197)
at org.apache.axis2.transport.jms.JMSConnectionFactory.createInitialContext(JMSConnectionFactory.java:133)
at org.apache.axis2.transport.jms.JMSConnectionFactory.connect(JMSConnectionFactory.java:122)
at org.apache.axis2.transport.jms.JMSListener.initializeConnectionFactories(JMSListener.java:244)
at org.apache.axis2.transport.jms.JMSListener.init(JMSListener.java:104)
at org.apache.axis2.jms2.JMSActiveEchoServiceLifeCycle.startUp(JMSActiveEchoServiceLifeCycle.java:56)
at org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass(ServiceBuilder.java:354)
at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:136)
at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:91)
at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:133)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:528)
at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:196)
at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:227)
at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:174)
at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:88)
at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:252)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:72)
at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:373)
at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:317)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
at org.apache.geronimo.tomcat.GeronimoStandardContext.access$201(GeronimoStandardContext.java:67)
at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:337)
at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:31)
at org.apache.geronimo.tomcat.GeronimoStandardContext.start(GeronimoStandardContext.java:192)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.geronimo.tomcat.TomcatContainer.addContext(TomcatContainer.java:313)
at org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$$9370b073.invoke()
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
at org.apache.geronimo.tomcat.TomcatContainer$$EnhancerByCGLIB$$f3376869.addContext()
at org.apache.geronimo.tomcat.TomcatWebAppContext.doStart(TomcatWebAppContext.java:438)
at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:981)
at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:267)
at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124)
at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:540)
at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379)
at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:374)
at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187)
at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:527)
at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:508)
at org.apache.geronimo.kernel.config.SimpleConfigurationManager$$FastClassByCGLIB$$ce77a924.invoke()
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
at org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$d98215e2.startConfiguration()
at org.apache.geronimo.system.main.Daemon.doStartup(Daemon.java:297)
at org.apache.geronimo.system.main.Daemon.(Daemon.java:74)
at org.apache.geronimo.system.main.Daemon.main(Daemon.java:377)



  
________________________________________
抢注雅虎免费邮箱-3.5G容量,20M附件! 


[geronimo1.1.1] Re: Re: Axis2 war classloader ClassNotFoundException

Posted by falom <fa...@yahoo.com.cn>.
Hi Lin,

Big thanks for the tip, it worked after a bit struggling with all the resource config in both geronimo and axis2. I will test now to see if axis2 client can call and get response from the server. BTW, do you know a  good place to read more about all the ejb config parameters like following:

    <resource-ref>
        <res-ref-name>jms/myQueueConnectionFactory</res-ref-name>
        <res-type>javax.jms.QueueConnectionFactory</res-type>
        <res-auth>Container</res-auth>
        <res-sharing-scope>Shareable</res-sharing-scope>
     </resource-ref>
    
    <message-destination-ref>
        <message-destination-ref-name>jms/myQueue</message-destination-ref-name>
        <message-destination-type>javax.jms.Queue</message-destination-type>
        <message-destination-usage>Produces</message-destination-usage>
        <message-destination-link>myQueue</message-destination-link>
    </message-destination-ref>

falom

Lin Sun <li...@gmail.com> wrote: Hi there, I haven't tried to configure this myself but wonder if you can fix this by creating a Geronimo-web.xml for the axis2 war file.  In the Geronimo-web.xml file, you can specify the activemq broker as the dependency of the axis2 war to request the classloder to make the activemq broker avail for the axis2 war.

HTH  Lin   

________________________________________
From: falom [mailto:falom2008@yahoo.com.cn] 
Sent: Thursday, January 18, 2007 9:36 PM
To: user@geronimo.apache.org
Subject: [geronimo1.1.1] Axis2 war classloader ClassNotFoundException

Hi,

I installed axis2 war in both tomcat and geronimo.

First I managed to test axis2 jms transport in tomcat connecting to standalone activemq broker by deploying one service using servicelifecycle to start up the jmslistener. 

BUT when i deploy the same service in geronimo, while trying connect to the activemq broker within geronimo, i got following exception attached, seems like problem related to classloader, or something else which i am really stuck with. I also reconfigured axis2 listener to use org.activemq.jndi.ActiveMQInitialContextFactory instead of org.apache.activemq.jndi.ActiveMQInitialContextFactory, but same exception.
I really need some clue what i do wrong, or how to go around this classloading issue.

falom

22:46:30,709 INFO  [JMSActiveEchoServiceLifeCycle] JMSActiveEchoServiceLifeCycle startUp called.
22:46:30,719 ERROR [JMSListener] Error connecting to JMS connection factory : TopicConnectionFactory
javax.naming.NoInitialContextException: Cannot instantiate class: org.apache.activemq.jndi.ActiveMQInitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.apache.activemq.jndi.ActiveMQInitialContextFactory in classloader default/axis211/1164548268298/war]
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.(InitialContext.java:197)
    at org.apache.axis2.transport.jms.JMSConnectionFactory.createInitialContext(JMSConnectionFactory.java:133)
    at org.apache.axis2.transport.jms.JMSConnectionFactory.connect(JMSConnectionFactory.java:122)
    at org.apache.axis2.transport.jms.JMSListener.initializeConnectionFactories(JMSListener.java:244)
    at org.apache.axis2.transport.jms.JMSListener.init(JMSListener.java:104)
    at org.apache.axis2.jms2.JMSActiveEchoServiceLifeCycle.startUp(JMSActiveEchoServiceLifeCycle.java:56)
    at org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass(ServiceBuilder.java:354)
    at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:136)
    at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:91)
    at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:133)
    at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:528)
    at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:196)
    at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:227)
    at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:174)
    at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:88)
    at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:252)
    at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:72)
    at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:373)
    at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:317)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
    at org.apache.geronimo.tomcat.GeronimoStandardContext.access$201(GeronimoStandardContext.java:67)
    at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:337)
    at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:31)
    at org.apache.geronimo.tomcat.GeronimoStandardContext.start(GeronimoStandardContext.java:192)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
    at org.apache.geronimo.tomcat.TomcatContainer.addContext(TomcatContainer.java:313)
    at org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$$9370b073.invoke()
    at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
    at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
    at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
    at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
    at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
    at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
    at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
    at org.apache.geronimo.tomcat.TomcatContainer$$EnhancerByCGLIB$$f3376869.addContext()
    at org.apache.geronimo.tomcat.TomcatWebAppContext.doStart(TomcatWebAppContext.java:438)
    at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:981)
    at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:267)
    at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
    at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124)
    at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:540)
    at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379)
    at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:374)
    at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187)
    at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:527)
    at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:508)
    at org.apache.geronimo.kernel.config.SimpleConfigurationManager$$FastClassByCGLIB$$ce77a924.invoke()
    at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
    at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
    at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
    at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
    at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
    at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
    at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
    at org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$d98215e2.startConfiguration()
    at org.apache.geronimo.system.main.Daemon.doStartup(Daemon.java:297)
    at org.apache.geronimo.system.main.Daemon.(Daemon.java:74)
    at org.apache.geronimo.system.main.Daemon.main(Daemon.java:377)
  


 		
---------------------------------
抢注雅虎免费邮箱-3.5G容量,20M附件! 

RE: [geronimo1.1.1] Axis2 war classloader ClassNotFoundException

Posted by Lin Sun <li...@gmail.com>.
Hi there, I haven't tried to configure this myself but wonder if you can fix this by creating a Geronimo-web.xml for the axis2 war file.  In the Geronimo-web.xml file, you can specify the activemq broker as the dependency of the axis2 war to request the classloder to make the activemq broker avail for the axis2 war.

HTH  Lin   

________________________________________
From: falom [mailto:falom2008@yahoo.com.cn] 
Sent: Thursday, January 18, 2007 9:36 PM
To: user@geronimo.apache.org
Subject: [geronimo1.1.1] Axis2 war classloader ClassNotFoundException

Hi,

I installed axis2 war in both tomcat and geronimo.

First I managed to test axis2 jms transport in tomcat connecting to standalone activemq broker by deploying one service using servicelifecycle to start up the jmslistener. 

BUT when i deploy the same service in geronimo, while trying connect to the activemq broker within geronimo, i got following exception attached, seems like problem related to classloader, or something else which i am really stuck with. I also reconfigured axis2 listener to use org.activemq.jndi.ActiveMQInitialContextFactory instead of org.apache.activemq.jndi.ActiveMQInitialContextFactory, but same exception.
I really need some clue what i do wrong, or how to go around this classloading issue.

falom

22:46:30,709 INFO  [JMSActiveEchoServiceLifeCycle] JMSActiveEchoServiceLifeCycle startUp called.
22:46:30,719 ERROR [JMSListener] Error connecting to JMS connection factory : TopicConnectionFactory
javax.naming.NoInitialContextException: Cannot instantiate class: org.apache.activemq.jndi.ActiveMQInitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.apache.activemq.jndi.ActiveMQInitialContextFactory in classloader default/axis211/1164548268298/war]
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.<init>(InitialContext.java:197)
    at org.apache.axis2.transport.jms.JMSConnectionFactory.createInitialContext(JMSConnectionFactory.java:133)
    at org.apache.axis2.transport.jms.JMSConnectionFactory.connect(JMSConnectionFactory.java:122)
    at org.apache.axis2.transport.jms.JMSListener.initializeConnectionFactories(JMSListener.java:244)
    at org.apache.axis2.transport.jms.JMSListener.init(JMSListener.java:104)
    at org.apache.axis2.jms2.JMSActiveEchoServiceLifeCycle.startUp(JMSActiveEchoServiceLifeCycle.java:56)
    at org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass(ServiceBuilder.java:354)
    at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:136)
    at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:91)
    at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:133)
    at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:528)
    at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:196)
    at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:227)
    at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:174)
    at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:88)
    at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:252)
    at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:72)
    at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:373)
    at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:317)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
    at org.apache.geronimo.tomcat.GeronimoStandardContext.access$201(GeronimoStandardContext.java:67)
    at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:337)
    at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:31)
    at org.apache.geronimo.tomcat.GeronimoStandardContext.start(GeronimoStandardContext.java:192)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
    at org.apache.geronimo.tomcat.TomcatContainer.addContext(TomcatContainer.java:313)
    at org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$$9370b073.invoke(<generated>)
    at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
    at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
    at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
    at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
    at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
    at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
    at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
    at org.apache.geronimo.tomcat.TomcatContainer$$EnhancerByCGLIB$$f3376869.addContext(<generated>)
    at org.apache.geronimo.tomcat.TomcatWebAppContext.doStart(TomcatWebAppContext.java:438)
    at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:981)
    at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:267)
    at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
    at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124)
    at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:540)
    at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379)
    at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:374)
    at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187)
    at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:527)
    at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:508)
    at org.apache.geronimo.kernel.config.SimpleConfigurationManager$$FastClassByCGLIB$$ce77a924.invoke(<generated>)
    at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
    at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
    at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
    at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
    at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
    at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
    at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
    at org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$d98215e2.startConfiguration(<generated>)
    at org.apache.geronimo.system.main.Daemon.doStartup(Daemon.java:297)
    at org.apache.geronimo.system.main.Daemon.<init>(Daemon.java:74)
    at org.apache.geronimo.system.main.Daemon.main(Daemon.java:377)
  
________________________________________
雅虎免费邮箱-3.5G容量,20M附件