3 Replies Latest reply on Jun 25, 2004 2:13 PM by Ken Ingram

    CMP deployment error on JBOSS 3.2.4 using Eclipse

    ggilberto Newbie

      Hi there,
      I have been able to deploy all other types of beans except CMP beans. I
      I'm using the Hypersonic SQL datasource.
      Please let me know if you have any ideas. I am using JBoss 3.2.4.
      I get the following error when deploying a bean:
      17:50:47,828 WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=SupplierBean,service=EJB
      RuntimeErrorException: java.lang.NoSuchMethodError
      Cause: java.lang.NoSuchMethodError
      at org.jboss.mx.server.ReflectedDispatcher.handleInvocationExceptions(ReflectedDispatcher.java:99)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:64)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:837)
      at $Proxy17.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:367)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy88.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:367)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:837)
      at $Proxy17.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:367)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy14.start(Unknown Source)
      at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:570)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:836)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:645)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:304)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:460)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)

        • 1. Re: CMP deployment error on JBOSS 3.2.4 using Eclipse
          gorano Newbie

          If you have not succesfully deployed any CMPs yet, please provide more info on syntax and deployment descriptors.

          It is most likely your CMPs are not correct.

          /Goran

          • 2. Re: CMP deployment error on JBOSS 3.2.4 using Eclipse
            ggilberto Newbie

            Hello,

            This is the sample of the code from the CMP bean I have been trying to deploy on JBOSS 3.2.4. Do you think I am missing any jars in my build class path? I am assuming not, as I haven't had errors deploying all the other types of beans. Apparently, this example worked fine on JBOSS 3.2.1.
            Thanks in advance.


            package dot.com.tsc.cmp;

            import javax.ejb.EntityBean;
            import javax.ejb.EntityContext;


            /**
            * @ejb.bean name="Supplier"
            * jndi-name="SupplierBean"
            * type="CMP"
            * primkey-field="supplierID"
            * schema="MyStoreSupplier"
            * cmp-version="2.x"
            *
            * @ejb.persistence
            * table-name="Supplier"
            *
            * @ejb.finder
            * query="SELECT OBJECT(a) FROM MyStoreSupplier as a"
            * signature="java.util.Collection findAll()"
            *
            * @ejb.finder
            * query="SELECT OBJECT(b) FROM MyStoreSupplier as b where b.userID = ?1"
            * signature="au.com.tsc.cmp.SupplierLocal findUserID(java.lang.String userID)"
            *
            **/

            public abstract class SupplierBean implements EntityBean {
            /**
            * The ejbCreate method.
            *
            * @ejb.create-method
            */
            public java.lang.String ejbCreate(String supplierID, String userID, String firstName,
            String lastName, String address, String message, Float creditLimit ) throws javax.ejb.CreateException {
            // EJB 2.0 spec says return null for CMP ejbCreate methods.
            // TODO: YOU MUST INITIALIZE THE FIELDS FOR THE BEAN HERE.
            // setMyField("Something");
            setSupplierID(supplierID);
            setUserID(userID);
            setFirstName(firstName);
            setLastName(lastName);
            setAddress(address);
            setMessage(message);
            setCreditLimit(creditLimit);
            return null;
            }

            protected EntityContext eContext ;
            /**
            * Sets the entity context
            * @param javax.ejb.EntityContext the new eContext value
            * @ejb.method setEnityContext
            **/
            public void setEntityContext(EntityContext context) {
            eContext = context;
            }

            /**
            * Unsets the enity context
            * @param javax.ejb.EntityContext eContext value
            **/
            public void unsetEntityContext() {
            eContext = null;
            }
            .
            .
            .
            .
            .
            .
            .
            }

            • 3. Re: CMP deployment error on JBOSS 3.2.4 using Eclipse
              Ken Ingram Newbie

              I had the same problem. I solved it by using 3.2.3