1 Reply Latest reply on Oct 30, 2003 1:22 PM by Julien Martin

    Desperately trying to deploy a cmp ejb

    Julien Martin Expert

      Hello,

      I am running into trouble trying to deploy a plain cmp ejb. There is a bug somewhere but I can't figure out where it is. (I have spent over a week trying to find it.) I get the following jboss exception:

      *********************
      20:53:50,531 WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=AccountEJBHome,service=EJB
      java.lang.NoSuchMethodError: org.apache.bcel.generic.InstructionFactory.createNewArray(Lorg/apache/bcel/generic/Type;S)Lorg/apache/bcel/generic/Instru
      ction;
      at org.jboss.proxy.compiler.ProxyImplementationFactory.createProxyMethod(ProxyImplementationFactory.java:319)
      at org.jboss.proxy.compiler.ProxyCompiler.getCode(ProxyCompiler.java:167)
      at org.jboss.proxy.compiler.Runtime.makeProxyType(Runtime.java:66)
      at org.jboss.proxy.compiler.ProxyCompiler.(ProxyCompiler.java:76)
      at org.jboss.proxy.compiler.Proxies$Impl.newTarget(Proxies.java:603)
      at org.jboss.proxy.compiler.Proxies.newTarget(Proxies.java:78)
      at org.jboss.proxy.compiler.Proxy.newProxyInstance(Proxy.java:49)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateBeanClassInstanceCommand.(JDBCCreateBeanClassInstanceCommand.java:62)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createCreateBeanClassInstanceCommand(JDBCCommandFactory.java:106)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:424)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:351)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:152)
      at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:343)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      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.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
      at $Proxy14.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:394)
      at sun.reflect.GeneratedMethodAccessor8.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 $Proxy30.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:331)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      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.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
      at $Proxy14.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:394)
      at sun.reflect.GeneratedMethodAccessor8.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 $Proxy12.start(Unknown Source)
      at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:544)
      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 sun.reflect.GeneratedMethodAccessor43.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$ScannerThread.loop(AbstractDeploymentScanner.java:212)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
      20:53:50,561 INFO [EjbModule] Started jboss.j2ee:module=account-ejb.jar,service=EjbModule
      20:53:50,571 INFO [EJBDeployer] Deployed: file:/D:/system/jboss-3.2.2/server/default/deploy/account-ejb.jar
      20:53:50,802 INFO [MainDeployer] Deployed package: file:/D:/system/jboss-3.2.2/server/default/deploy/account-ejb.jar
      20:53:50,802 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
      Cause: Incomplete Deployment listing:
      Packages waiting for a deployer:

      Incompletely deployed packages:

      MBeans waiting for classes:

      MBeans waiting for other MBeans:
      [ObjectName: jboss.j2ee:jndiName=AccountEJBHome,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: java.lang.NoSuchMethodError: org.apache.bcel.generic.InstructionFactory.createNewArray(Lorg/apache/bcel/generic/Type;S)Lorg/apache/bce
      l/generic/Instruction;]
      *********************

      Can anyone help please?

      Julien.

        • 1. Desperately trying to deploy a cmp ejb
          Julien Martin Expert

          Sorry I forgot to include the DDs.

          Here is the ejb-jar.xml
          ****************
          <?xml version="1.0" encoding="UTF-8"?>

          <!-- This is commented out because the dtd did not include the auto-increment
          element in the cmp-field content model as it should have.
          -->
          <!DOCTYPE jbosscmp-jdbc PUBLIC "-//JBoss//DTD JBOSSCMP-JDBC 3.2//EN" "http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_2.dtd">

          <jbosscmp-jdbc>

          java:/parispano-java
          <datasource-mapping>mySQL</datasource-mapping>
          <create-table>true</create-table>
          <remove-table>true</remove-table>


          <enterprise-beans>

          <ejb-name>AccountEJB</ejb-name>
          <table-name>account</table-name>
          <cmp-field>
          <field-name>login</field-name>
          <column-name>db_login</column-name>
          </cmp-field>
          <cmp-field>
          <field-name>password</field-name>
          <column-name>db_password</column-name>
          <not-null/>
          </cmp-field>
          <cmp-field>
          <field-name>surname</field-name>
          <column-name>db_surname</column-name>
          <not-null/>
          </cmp-field>
          <cmp-field>
          <field-name>firstName</field-name>
          <column-name>db_firstname</column-name>
          <not-null/>
          </cmp-field>
          <cmp-field>
          <field-name>addressOne</field-name>
          <column-name>db_addressone</column-name>
          <not-null/>
          </cmp-field>
          <cmp-field>
          <field-name>addressTwo</field-name>
          <column-name>db_addresstwo</column-name>
          <not-null/>
          </cmp-field>
          <cmp-field>
          <field-name>postcode</field-name>
          <column-name>db_postcode</column-name>
          <not-null/>
          </cmp-field>
          <cmp-field>
          <field-name>city</field-name>
          <column-name>db_city</column-name>
          <not-null/>
          </cmp-field>
          <cmp-field>
          <field-name>country</field-name>
          <column-name>db_country</column-name>
          <not-null/>
          </cmp-field>
          <cmp-field>
          <field-name>telephone</field-name>
          <column-name>db_telephone</column-name>
          <not-null/>
          </cmp-field>
          <cmp-field>
          <field-name>email</field-name>
          <column-name>db_email</column-name>
          <not-null/>
          </cmp-field>
          <cmp-field>
          <field-name>inscriptionDate</field-name>
          <column-name>db_inscriptiondate</column-name>
          <not-null/>
          </cmp-field>
          <cmp-field>
          <field-name>lastVisitDate</field-name>
          <column-name>db_lastvisitdate</column-name>
          <not-null/>
          </cmp-field>


          </enterprise-beans>
          </jbosscmp-jdbc>
          ****************

          Here is the jboscmp-jdbc.xml
          ****************

          <?xml version="1.0" encoding="UTF-8"?>

          <!-- This is commented out because the dtd did not include the auto-increment
          element in the cmp-field content model as it should have.
          -->
          <!DOCTYPE jbosscmp-jdbc PUBLIC "-//JBoss//DTD JBOSSCMP-JDBC 3.2//EN" "http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_2.dtd">

          <jbosscmp-jdbc>

          java:/parispano-java
          <datasource-mapping>mySQL</datasource-mapping>
          <create-table>true</create-table>
          <remove-table>true</remove-table>


          <enterprise-beans>

          <ejb-name>AccountEJB</ejb-name>
          <table-name>account</table-name>
          <cmp-field>
          <field-name>login</field-name>
          <column-name>db_login</column-name>
          </cmp-field>
          <cmp-field>
          <field-name>password</field-name>
          <column-name>db_password</column-name>
          <not-null/>
          </cmp-field>
          <cmp-field>
          <field-name>surname</field-name>
          <column-name>db_surname</column-name>
          <not-null/>
          </cmp-field>
          <cmp-field>
          <field-name>firstName</field-name>
          <column-name>db_firstname</column-name>
          <not-null/>
          </cmp-field>
          <cmp-field>
          <field-name>addressOne</field-name>
          <column-name>db_addressone</column-name>
          <not-null/>
          </cmp-field>
          <cmp-field>
          <field-name>addressTwo</field-name>
          <column-name>db_addresstwo</column-name>
          <not-null/>
          </cmp-field>
          <cmp-field>
          <field-name>postcode</field-name>
          <column-name>db_postcode</column-name>
          <not-null/>
          </cmp-field>
          <cmp-field>
          <field-name>city</field-name>
          <column-name>db_city</column-name>
          <not-null/>
          </cmp-field>
          <cmp-field>
          <field-name>country</field-name>
          <column-name>db_country</column-name>
          <not-null/>
          </cmp-field>
          <cmp-field>
          <field-name>telephone</field-name>
          <column-name>db_telephone</column-name>
          <not-null/>
          </cmp-field>
          <cmp-field>
          <field-name>email</field-name>
          <column-name>db_email</column-name>
          <not-null/>
          </cmp-field>
          <cmp-field>
          <field-name>inscriptionDate</field-name>
          <column-name>db_inscriptiondate</column-name>
          <not-null/>
          </cmp-field>
          <cmp-field>
          <field-name>lastVisitDate</field-name>
          <column-name>db_lastvisitdate</column-name>
          <not-null/>
          </cmp-field>


          </enterprise-beans>
          </jbosscmp-jdbc>

          ****************

          What I am getting wrong?

          Julien.