1 Reply Latest reply on Apr 30, 2004 10:00 AM by pgianf

    Simple MDB deployment problem

    pgianf Newbie

      Hi
      I'm using JBorland to deploy a simple MDB into JBoss 3.2.3 and I've got this error:

      2004-04-29 15:16:35,748 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/C:/Programmi/jboss-3.2.3/server/myserver/deploy/EJBModule1.jar
      2004-04-29 15:16:35,818 DEBUG [org.jboss.ejb.EJBDeployer] looking for nested deployments in : file:/C:/Programmi/jboss-3.2.3/server/myserver/deploy/EJBModule1.jar
      2004-04-29 15:16:36,129 DEBUG [org.jboss.ejb.EJBDeployer] Verifying file:/C:/Programmi/jboss-3.2.3/server/myserver/deploy/EJBModule1.jar
      2004-04-29 15:16:36,189 DEBUG [org.jboss.ejb.EJBDeployer.verifier] Bean checked: SimpleMessage: Verified.
      2004-04-29 15:16:36,239 ERROR [org.jboss.deployment.MainDeployer] could not create deployment: file:/C:/Programmi/jboss-3.2.3/server/myserver/deploy/EJBModule1.jar
      org.jboss.deployment.DeploymentException: Error during create of EjbModule: file:/C:/Programmi/jboss-3.2.3/server/myserver/deploy/EJBModule1.jar; - nested throwable: (javax.management.MalformedObjectNameException: missing domain)
       at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:527)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:786)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
       at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
       at $Proxy6.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:274)
       at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
       at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:394)
       at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
       at $Proxy4.start(Unknown Source)
       at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
       at $Proxy5.deploy(Unknown Source)
       at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:384)
       at org.jboss.system.server.ServerImpl.start(ServerImpl.java:291)
       at org.jboss.Main.boot(Main.java:150)
       at org.jboss.Main$1.run(Main.java:395)
       at java.lang.Thread.run(Thread.java:536)
      Caused by: javax.management.MalformedObjectNameException: missing domain
       at org.jboss.mx.util.ObjectNameConverter.convert(ObjectNameConverter.java:71)
       at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:508)
       ... 48 more


      my jboss.xml is
      :
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.2//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd">
      <jboss>
       <jmx-name>SimpleMessage</jmx-name>
       <enterprise-beans>
       <message-driven>
       <ejb-name>SimpleMessage</ejb-name>
       <destination-jndi-name>topic/RicercaOperatore</destination-jndi-name>
       <configuration-name>Standard Message Driven Bean</configuration-name>
       </message-driven>
       </enterprise-beans>
      </jboss>


      the ejb-jar.xml is:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
      <ejb-jar>
       <display-name>EJBModule1</display-name>
       <enterprise-beans>
       <message-driven>
       <display-name>SimpleMessage</display-name>
       <ejb-name>SimpleMessage</ejb-name>
       <ejb-class>simplemdb.SimpleMessage</ejb-class>
       <transaction-type>Bean</transaction-type>
       <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
       <message-driven-destination>
       <destination-type>javax.jms.Topic</destination-type>
       <subscription-durability>NonDurable</subscription-durability>
       </message-driven-destination>
       </message-driven>
       </enterprise-beans>
      </ejb-jar>


      the MDB source code is :
      package simplemdb;
      
      import java.io.Serializable;
      import java.rmi.RemoteException;
      import javax.ejb.EJBException;
      import javax.ejb.MessageDrivenBean;
      import javax.ejb.MessageDrivenContext;
      import javax.ejb.CreateException;
      import javax.naming.*;
      import javax.jms.*;
      import java.util.logging.*;
      
      
      public class SimpleMessage implements MessageDrivenBean,
       MessageListener {
      
       private transient MessageDrivenContext mdc = null;
       private InitialContext context;
      
       static final Logger logger = Logger.getLogger("SimpleMessageBean");
      
       public SimpleMessage() {
       logger.info("In SimpleMessageBean.SimpleMessageBean()");
       }
      
       public void setMessageDrivenContext(MessageDrivenContext mdc) {
       logger.info("In SimpleMessageBean.setMessageDrivenContext()");
       this.mdc = mdc;
       }
      
       public void ejbCreate() {
       logger.info("In SimpleMessageBean.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) {
       e.printStackTrace();
       mdc.setRollbackOnly();
       } catch (Throwable te) {
       te.printStackTrace();
       }
       } // onMessage
      
       public void ejbRemove() {
       logger.info("In SimpleMessageBean.remove()");
       }
      
      } // class


      could you please help me
      thanks
      paolo