Hi!

I think that the problem is the Message Driven Bean. Im trying to deploy a ear that has a MessageDrivenBean module. Is the Sun example of Jupiter and Earth. I got Deployed Ok, but Geronimo says the following when deploying. I have pasted the deployment descriptors, and the class file, so if anybody knows or has a guess what am i doing wrong, please, help!!!

Thanks a lot everybody!!!

10:44:59,187 INFO  [LocalConfigStore:config-store] Installed configuration tierr
a in location 60
10:44:59,234 INFO  [ConfigurationManagerImpl] Loaded Configuration geronimo.conf
ig:name="tierra"
10:44:59,265 INFO  [Configuration] Started configuration tierra
10:44:59,281 ERROR [GBeanInstanceState] Error while starting; GBean is now in th
e FAILED state: objectName="geronimo.server:EJBModule=mdb.jar,J2EEApplication=ti
erra,J2EEServer=geronimo,j2eeType=JCAActivationSpec,name=MessageBean"
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 java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at org.apache.geronimo.connector.ActivationSpecWrapper.<init>(Activation
SpecWrapper.java:72)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanI
nstance.java:806)
        at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart
(GBeanInstanceState.java:331)
        at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInsta
nceState.java:111)
        at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(G
BeanInstanceState.java:133)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanI
nstance.java:494)
        at org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:339
)
        at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(G
BeanInstanceState.java:141)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanI
nstance.java:494)
        at org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:339
)
        at org.apache.geronimo.kernel.Kernel.startConfiguration(Kernel.java:386)

        at org.apache.geronimo.kernel.KernelGBean.startConfiguration(KernelGBean
.java:89)
        at org.apache.geronimo.kernel.KernelGBean$$FastClassByCGLIB$$1cccefc9.in
voke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethod
Invoker.java:38)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperatio
n.java:118)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.
java:745)
        at org.apache.geronimo.kernel.Kernel.invoke(Kernel.java:299)
        at org.apache.geronimo.kernel.jmx.MBeanServerDelegate.invoke(MBeanServer
Delegate.java:117)
        at mx4j.remote.rmi.RMIConnectionInvoker.invoke(RMIConnectionInvoker.java
:219)
        at sun.reflect.GeneratedMethodAccessor120.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at mx4j.remote.rmi.RMIConnectionProxy.invoke(RMIConnectionProxy.java:34)

        at mx4j.remote.rmi.RMIConnectionSubjectInvoker.chain(RMIConnectionSubjec
tInvoker.java:99)
        at mx4j.remote.rmi.RMIConnectionSubjectInvoker.access$000(RMIConnectionS
ubjectInvoker.java:31)
        at mx4j.remote.rmi.RMIConnectionSubjectInvoker$1.run(RMIConnectionSubjec
tInvoker.java:90)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
        at mx4j.remote.MX4JRemoteUtils.subjectInvoke(MX4JRemoteUtils.java:163)
        at mx4j.remote.rmi.RMIConnectionSubjectInvoker.subjectInvoke(RMIConnecti
onSubjectInvoker.java:86)
        at mx4j.remote.rmi.RMIConnectionSubjectInvoker.invoke(RMIConnectionSubje
ctInvoker.java:80)
        at $Proxy0.invoke(Unknown Source)
        at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImp
l.java:221)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
        at sun.rmi.transport.Transport$1.run(Transport.java:148)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4
60)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
.java:701)
        at java.lang.Thread.run(Thread.java:534)

 

This is the open-ejb.jar.xml:

<?xml version="1.0"?>

<openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar"
configId="EarthMDBApp"
parentId="org/apache/geronimo/ActiveMQServer">

<enterprise-beans>

 <message-driven>
  <ejb-name>MessageBean</ejb-name>
         <resource-adapter>
  <resource-link>ActiveMQ RA</resource-link>
  </resource-adapter>
        </message-driven>

</enterprise-beans>

</openejb-jar>

This is the ejb-jar.xml

<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
  <display-name>TierraMDB</display-name>
  <enterprise-beans>
    <message-driven>
      <display-name>MessageBean</display-name>
      <ejb-name>MessageBean</ejb-name>
      <ejb-class>MessageBean</ejb-class>
      <messaging-type>javax.jms.MessageListener</messaging-type>
      <transaction-type>Container</transaction-type>
      <message-destination-type>javax.jms.Queue</message-destination-type>
      <message-destination-link>MDBTransferBeanOutQueue</message-destination-link>
    </message-driven>
  </enterprise-beans>
  <assembly-descriptor>
    <container-transaction>
      <method>
        <ejb-name>MessageBean</ejb-name>
        <method-name>onMessage</method-name>
        <method-params>
          <method-param>javax.jms.Message</method-param>
        </method-params>
      </method>
      <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <message-destination>
      <message-destination-name>MDBTransferBeanOutQueue</message-destination-name>
    </message-destination>
  </assembly-descriptor>
</ejb-jar>

And this is the application.xml:

<?xml version="1.0" encoding="UTF-8"?>
<application version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
  <description>Application description</description>
  <display-name>EarthMDBApp</display-name>
  <module>
    <ejb>mdb.jar</ejb>
  </module>
</application>

And this is the class file:

import javax.ejb.*;
import javax.naming.*;
import javax.jms.*;
import java.util.logging.*;


public class MessageBean implements MessageDrivenBean, MessageListener {
    static final Logger logger = Logger.getLogger("MessageBean");
    private transient MessageDrivenContext mdc = null;
    private Context context;

    public MessageBean() {
        logger.info("In MessageBean.MessageBean()");
    }

   
    public void setMessageDrivenContext(MessageDrivenContext mdc) {
        logger.info("In MessageBean.setMessageDrivenContext()");
        this.mdc = mdc;
    }

  
    public void ejbCreate() {
        logger.info("In MessageBean.ejbCreate()");
    }

  
    public void onMessage(Message inMessage) {
        TextMessage msg = null;

        try {
            if (inMessage instanceof TextMessage) {
                msg = (TextMessage) inMessage;
                logger.info("MESSAGE BEAN: Message received: " + msg.getText());
            } else {
                logger.warning("Message of wrong type: " +
                    inMessage.getClass().getName());
            }
        } catch (JMSException e) {
            logger.severe("MessageBean.onMessage: JMSException: " +
                e.toString());
            mdc.setRollbackOnly();
        } catch (Throwable te) {
            logger.severe("MessageBean.onMessage: Exception: " + te.toString());
        }
    }

  
    public void ejbRemove() {
        logger.info("In MessageBean.remove()");
    }
}



>From: "Katia Aresti Gonzalez" <kaaresti@hotmail.com>
>Reply-To: user@geronimo.apache.org
>To: user@geronimo.apache.org
>Subject: Re: JMS application problem when deploying into Geronimo
>Date: Sun, 01 May 2005 08:02:23 +0000
>


Acepta el reto MSN Premium: incluye Antivirus y Firewall de McAffee. Descárgalo y pruébalo 2 meses gratis.