I don't see anything wrong with your plans. For an example you could look at the daytrader plans in configs/daytrader-*/src/plan/plan.xml which contain some mdbs and they seem to work fine. I think your jms stuff is deployed fine, and you are seeing a classloading problem when the mdb tries to start. However I don't see the cause yet. You could try imitating the setup of daytrader, where the jms is deployed as an "external module" in the same configuration as the ear. Similarly you could construct a "synthetic ear" with both your ejbs and the jms stuff as external modules. If this worked it might indicate a problem with our classloading. However I think there are other examples of mdbs working with the jms deployed separately.

thanks
david jencks

On Feb 17, 2006, at 6:09 PM, Todd Mason wrote:

Hello all,

I'm getting a java.lang.ClassNotFoundException: org.activemq.ra.ActiveMQActivationSpec exception when I deploy my message driven bean. I'm using Geronimo 1.0 on XP. As near as I can tell my JMS resource plan deployed properly, from the console I can see the resources deployed JMS Factory and Queue, the "test connection" link also appears to work fine. Is there anything else I need to do to verify my JMS resources are deployed properly? Does anyone have a sample openejb-jar.xml file containing a message bean? Following is my stack trace from my geronimo.log file.

Thanks in advance.

Todd


19:52:59,281 DEBUG [GBeanSingleReference] Waiting to start geronimo.server:J2EEApplication=WorkJ2EE,J2EEServer=geronimo,j2eeType= WebModule,name=WorkJ2EEWeb.war because no targets are running for reference J2EEApplication matching the patterns geronimo.server:J2EEServer=geronimo,j2eeType=J2EEApplication,name=Work J2EE 19:52:59,296 ERROR [GBeanInstanceState] Error while starting; GBean is now in the FAILED state: objectName="geronimo.server:EJBModule=WorkJ2EEEJB.jar,J2EEApplication= WorkJ2EE,J2EEServer=geronimo,j2eeType=JCAActivationSpec,name=MDB1" java.lang.ClassNotFoundException: org.activemq.ra.ActiveMQActivationSpec
   at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass (MultiParentClassLoader.java:209)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at org.apache.geronimo.connector.ActivationSpecWrapper.<init> (ActivationSpecWrapper.java:65) at org.apache.geronimo.connector.ActivationSpecWrapperGBean.<init> (ActivationSpecWrapperGBean.java:42) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:27)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance (GBeanInstance.java:901) at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart( GBeanInstanceState.java:325) at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start (GBeanInstanceState.java:110) at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive (GBeanInstanceState.java:132) at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive (GBeanInstance.java:537) at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean (BasicKernel.java:208) at org.apache.geronimo.kernel.config.Configuration.startRecursiveGBeans (Configuration.java:315) at org.apache.geronimo.kernel.config.Configuration$ $FastClassByCGLIB$$7f4b4a9b.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:118) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke (GBeanInstance.java:835) at org.apache.geronimo.kernel.basic.BasicKernel.invoke (BasicKernel.java:178) at org.apache.geronimo.kernel.basic.BasicKernel.invoke (BasicKernel.java:173) at org.apache.geronimo.kernel.config.ConfigurationManagerImpl.start (ConfigurationManagerImpl.java:142) at org.apache.geronimo.kernel.config.ConfigurationManagerImpl$ $FastClassByCGLIB$$fbed85d2.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:118) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke (GBeanInstance.java:800) at org.apache.geronimo.gbean.runtime.RawInvoker.invoke (RawInvoker.java:57) at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke (RawOperationInvoker.java:36) at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept (ProxyMethodInterceptor.java:96) at org.apache.geronimo.kernel.config.ConfigurationManager$ $EnhancerByCGLIB$$aafd0674.start(<generated>) at org.apache.geronimo.console.configmanager.DeploymentPortlet.processAct ion(DeploymentPortlet.java:126) at org.apache.pluto.core.PortletServlet.dispatch (PortletServlet.java:229) at org.apache.pluto.core.PortletServlet.doPost (PortletServlet.java:163)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:615)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
at org.apache.pluto.core.PortletServlet.service (PortletServlet.java:153) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:173) at org.apache.catalina.core.ApplicationDispatcher.invoke (ApplicationDispatcher.java:672) at org.apache.catalina.core.ApplicationDispatcher.doInclude (ApplicationDispatcher.java:574) at org.apache.catalina.core.ApplicationDispatcher.include (ApplicationDispatcher.java:499) at org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke (PortletInvokerImpl.java:120) at org.apache.pluto.invoker.impl.PortletInvokerImpl.action (PortletInvokerImpl.java:68) at org.apache.pluto.PortletContainerImpl.processPortletAction (PortletContainerImpl.java:164) at org.apache.pluto.portalImpl.core.PortletContainerWrapperImpl.processPo rtletAction(PortletContainerWrapperImpl.java:82)
   at org.apache.pluto.portalImpl.Servlet.doGet(Servlet.java:227)
   at org.apache.pluto.portalImpl.Servlet.doPost(Servlet.java:267)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:615)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:178) at org.apache.catalina.authenticator.AuthenticatorBase.invoke (AuthenticatorBase.java:482) at org.apache.geronimo.tomcat.GeronimoStandardContext $SystemMethodValve.invoke(GeronimoStandardContext.java:272) at org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke (DefaultSubjectValve.java:46) at org.apache.geronimo.tomcat.valve.PolicyContextValve.invoke (PolicyContextValve.java:50) at org.apache.geronimo.tomcat.valve.TransactionContextValve.invoke (TransactionContextValve.java:53) at org.apache.geronimo.tomcat.valve.ComponentContextValve.invoke (ComponentContextValve.java:47) at org.apache.geronimo.tomcat.valve.InstanceContextValve.invoke (InstanceContextValve.java:60) at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:107) at org.apache.catalina.valves.AccessLogValve.invoke (AccessLogValve.java:526) at org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process (Http11Processor.java:856) at org.apache.coyote.http11.Http11Protocol $Http11ConnectionHandler.processConnection(Http11Protocol.java:744) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket (PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt (LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run (ThreadPool.java:684)
   at java.lang.Thread.run(Thread.java:534)
19:52:59,296 DEBUG [GBeanSingleReference] Waiting to start geronimo.server:J2EEApplication=WorkJ2EE,J2EEServer=geronimo,j2eeType= EJBModule,name=WorkJ2EEEJB.jar because no targets are running for reference J2EEApplication matching the patterns geronimo.server:J2EEServer=geronimo,j2eeType=J2EEApplication,name=Work J2EE 19:52:59,421 DEBUG [GBeanSingleReference] Waiting to start geronimo.server:EJBModule=WorkJ2EEEJB.jar,J2EEApplication=WorkJ2EE,J2E EServer=geronimo,j2eeType=MessageDrivenBean,name=MDB1 because no targets are running for reference ActivationSpecWrapper matching the patterns geronimo.server:EJBModule=WorkJ2EEEJB.jar,J2EEApplication=WorkJ2EE,J2E EServer=geronimo,j2eeType=JCAActivationSpec,name=MDB1

My openejb-jar.xml file

<openejb-jar
   xmlns="http://www.openejb.org/xml/ns/openejb-jar";
   xmlns:naming="http://geronimo.apache.org/xml/ns/naming";
   xmlns:security="http://geronimo.apache.org/xml/ns/security";
   xmlns:sys="http://geronimo.apache.org/xml/ns/deployment";
   configId="WORKJ2EE" parentId="com/silverglobe/SGJMSResources">
<enterprise-beans>
    <message-driven>
       <ejb-name>MDB1</ejb-name>
          <resource-adapter>
<target- name>geronimo.server:J2EEApplication=null,J2EEServer=geronimo,JCAResou rce=com/silverglobe/ SGJMSResources,j2eeType=JCAManagedConnectionFactory,name=jms/ SGQueueConnectionFactory</target-name>
        </resource-adapter>              <activation-config>
           <activation-config-property>
<activation-config-property-name>destination</ activation-config-property-name> <activation-config-property-value>SGQueue1</ activation-config-property-value> </ activation-config-property>
           <activation-config-property>
<activation-config-property-name>destinationType</ activation-config-property-name> <activation-config-property-value>javax.jms.Queue</ activation-config-property-value> </ activation-config-property>
       </activation-config>
  </message-driven>
</enterprise-beans>
</openejb-jar>

My jms-resource-plan.xml file

<connector
   xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.0";
   xmlns:naming="http://geronimo.apache.org/xml/ns/naming";
   configId="com/silverglobe/SGJMSResources"
   parentId="geronimo/activemq-broker/1.0/car"
   >

   <resourceadapter>
       <!-- how to connect to the JMS Server -->
       <resourceadapter-instance>
           <resourceadapter-name>SGJMSResources</resourceadapter-name>
<config-property-setting name="ServerUrl">tcp:// localhost:61616</config-property-setting> <config-property-setting name="UserName">not needed</ config-property-setting> <config-property-setting name="Password">not needed</ config-property-setting>
           <workmanager>
               <gbean-link>DefaultWorkManager</gbean-link>
           </workmanager>
       </resourceadapter-instance>
       <!-- defines a ConnectionFactory -->
       <outbound-resourceadapter>
           <connection-definition>
<connectionfactory- interface>javax.jms.ConnectionFactory</connectionfactory-interface>
               <connectiondefinition-instance>
                   <name>jms/SGQueueConnectionFactory</name>
<implemented- interface>javax.jms.QueueConnectionFactory</implemented-interface>
                   <connectionmanager>
                       <xa-transaction>
                           <transaction-caching />
                       </xa-transaction>
                       <single-pool>
                           <max-size>10</max-size>
                           <min-size>0</min-size>
<blocking-timeout-milliseconds>5000</ blocking-timeout-milliseconds> <idle-timeout-minutes>0</idle-timeout- minutes>
                           <match-one/>
                       </single-pool>
                   </connectionmanager>
               </connectiondefinition-instance>
           </connection-definition>
           <connection-definition>
<connectionfactory- interface>javax.jms.ConnectionFactory</connectionfactory-interface>
               <connectiondefinition-instance>
                   <name>jms/SGTopicConnectionFactory</name>
<implemented- interface>javax.jms.TopicConnectionFactory</implemented-interface>
                   <connectionmanager>
                       <xa-transaction>
                           <transaction-caching />
                       </xa-transaction>
                       <single-pool>
                           <max-size>10</max-size>
                           <min-size>0</min-size>
<blocking-timeout-milliseconds>5000</ blocking-timeout-milliseconds> <idle-timeout-minutes>0</idle-timeout- minutes>
                           <match-one/>
                       </single-pool>
                   </connectionmanager>
               </connectiondefinition-instance>
           </connection-definition>
       </outbound-resourceadapter>
   </resourceadapter>

   <adminobject>
       <adminobject-interface>javax.jms.Topic</adminobject-interface>
<adminobject- class>org.codehaus.activemq.message.ActiveMQTopic</adminobject-class>
       <adminobject-instance>
<message-destination-name>SGTopic1</message-destination- name> <config-property-setting name="PhysicalName">SGTopic1</ config-property-setting>
       </adminobject-instance>
   </adminobject>

   <adminobject>
       <adminobject-interface>javax.jms.Queue</adminobject-interface>
<adminobject- class>org.codehaus.activemq.message.ActiveMQQueue</adminobject-class>
       <adminobject-instance>
<message-destination-name>SGQueue1</message-destination- name> <config-property-setting name="PhysicalName">SGQueue1</ config-property-setting>
       </adminobject-instance>
   </adminobject>

</connector>


Reply via email to