1 Reply Latest reply on May 10, 2003 6:29 AM by David Jencks

    DeploymentException - could not create entity - NullPtrExcep

    Ko Baryiames Newbie


      Deploying this EJB is becoming hazardous to my health!!!
      Has anyone seen a null ptr exception while deploying entity beans on 3.2.1?
      This is killing me since the bean is so simple... gotta be obvious...

      This is a pointbase db, configured with a -ds file. It is the default datasource
      having replaced hsql entirely. The db is working since I see the connection pool
      bring up the right number of connections, and JMS has configured itself properly
      with its table creation. I've tried adding resource manager configs to the
      xml files w/o success for the datasource.

      Thanks for the help
      - Ko


      <-------- The trace and gang of .xml files follow


      08:34:29,319 INFO [EntityContainer] Starting
      08:34:30,584 ERROR [EntityContainer] Starting failed
      org.jboss.deployment.DeploymentException: Couldn't create entity command: ; - ne
      sted throwable: (java.lang.NullPointerException)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createCreateEntityC
      ommand(JDBCCommandFactory.java:137)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDB
      CStoreManager.java:481)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManage
      r.java:410)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManag
      er.java:170)
      at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:339)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
      92)
      at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:966)
      at $Proxy11.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:392)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy22.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:329)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
      92)
      at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:966)
      at $Proxy11.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:392)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy20.start(Unknown Source)
      at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:540)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
      tScanner.java:302)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:476)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      doScan(AbstractDeploymentScanner.java:200)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
      bstractDeploymentScanner.java:273)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
      92)
      at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:966)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:392)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy5.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:640)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:597)
      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 org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy6.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:365)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:272)
      at org.jboss.Main.boot(Main.java:150)
      at org.jboss.Main$1.run(Main.java:388)
      at java.lang.Thread.run(Thread.java:536)
      Caused by: java.lang.NullPointerException
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createCreateEntityC
      ommand(JDBCCommandFactory.java:126)
      ... 86 more
      08:34:30,594 WARN [ServiceController] Problem starting service jboss.j2ee:jndiN
      ame=ejb/inventory/ManagedDevice,service=EJB
      org.jboss.deployment.DeploymentException: Couldn't create entity command: ; - ne
      sted throwable: (java.lang.NullPointerException)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createCreateEntityC
      ommand(JDBCCommandFactory.java:137)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDB
      CStoreManager.java:481)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManage
      r.java:410)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManag
      er.java:170)
      at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:339)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
      92)
      at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:966)
      at $Proxy11.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:392)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy22.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:329)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
      92)
      at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:966)
      at $Proxy11.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:392)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy20.start(Unknown Source)
      at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:540)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
      tScanner.java:302)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:476)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      doScan(AbstractDeploymentScanner.java:200)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
      bstractDeploymentScanner.java:273)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
      92)
      at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:966)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:392)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy5.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:640)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:597)
      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 org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy6.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:365)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:272)
      at org.jboss.Main.boot(Main.java:150)
      at org.jboss.Main$1.run(Main.java:388)
      at java.lang.Thread.run(Thread.java:536)
      Caused by: java.lang.NullPointerException
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createCreateEntityC
      ommand(JDBCCommandFactory.java:126)
      ... 86 more


      pointbase-ds.xml:

      <local-tx-datasource>
      <jndi-name>DefaultDS</jndi-name>
      <connection-url>jdbc:pointbase:server://127.0.0.1/foodb</connection-url>
      <driver-class>com.pointbase.jdbc.jdbcUniversalDriver</driver-class>
      <user-name>pbpublic</user-name>
      pbpublic
      <min-pool-size>5</min-pool-size>
      <max-pool-size>100</max-pool-size>
      <blocking-timeout-millis>5000</blocking-timeout-millis>
      <idle-timeout-minutes>15</idle-timeout-minutes>
      </local-tx-datasource>




      ejb-jar:
      <ejb-jar >

      No Description.
      <display-name>Generated by XDoclet</display-name>

      <enterprise-beans>

      <!-- Entity Beans -->

      <![CDATA[The Entity bean represents a ManagedDevice]]>
      <display-name>ManagedDevice working on projects to support clients</display-name>

      <ejb-name>ManagedDevice</ejb-name>

      enterasys.advrouting.interfaces.ManagedDeviceHome
      enterasys.advrouting.interfaces.ManagedDevice
      <local-home>enterasys.advrouting.interfaces.ManagedDeviceLocalHome</local-home>
      enterasys.advrouting.interfaces.ManagedDeviceLocal

      <ejb-class>enterasys.advrouting.entity.ManagedDeviceCMP</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>enterasys.advrouting.interfaces.ManagedDevicePK</prim-key-class>
      false
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>ManagedDevice</abstract-schema-name>
      <cmp-field >
      <![CDATA[Retrieve the ManagedDevice's id.]]>
      <field-name>deviceid</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[Retrieve the ManagedDevice's Name.]]>
      <field-name>deviceName</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[]]>
      <field-name>creationDate</field-name>
      </cmp-field>
      <cmp-field >
      <![CDATA[]]>
      <field-name>modificationDate</field-name>
      </cmp-field>

      <env-entry>
      <env-entry-name>SequenceName</env-entry-name>
      <env-entry-type>java.lang.String</env-entry-type>
      <env-entry-value>ManagedDevice</env-entry-value>
      </env-entry>


      <query-method>
      <method-name>findAnotherByName</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      <method-param>int</method-param>
      </method-params>
      </query-method>
      <result-type-mapping>Local</result-type-mapping>
      <ejb-ql><![CDATA[SELECT OBJECT(o) from ManagedDevice AS o WHERE o.deviceName = ?1 AND o.deviceid <> ?2]]></ejb-ql>




      </enterprise-beans>

      <!-- Relationships -->

      <!-- Assembly Descriptor -->
      <assembly-descriptor >

      <!-- finder permissions -->

      <!-- finder permissions -->

      <!-- transactions -->
      <container-transaction >

      <ejb-name>ManagedDevice</ejb-name>
      <method-name>*</method-name>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      <container-transaction >

      <ejb-name>SequenceGenerator</ejb-name>
      <method-intf>Remote</method-intf>
      <method-name>getNextNumber</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      </method-params>

      <trans-attribute>Mandatory</trans-attribute>
      </container-transaction>

      <!-- finder transactions -->
      </assembly-descriptor>

      </ejb-jar>



      jboss-jar:

      <enterprise-beans>

      <ejb-name>ManagedDevice</ejb-name>
      <jndi-name>ejb/inventory/ManagedDevice</jndi-name>
      <local-jndi-name>local/inventory/ManagedDevice</local-jndi-name>

      </enterprise-beans>



      jbosscmd-jdbc:
      <jbosscmp-jdbc>

      java:/DefaultDS
      <datasource-mapping>Pointbase</datasource-mapping>


      <enterprise-beans>


      <ejb-name>ManagedDevice</ejb-name>
      <create-table>true</create-table>
      <remove-table>true</remove-table>
      <table-name>MANAGEDDEVICE</table-name>

      <cmp-field>
      <field-name>creationDate</field-name>
      <column-name>creationdate</column-name>
      <jdbc-type>TIMESTAMP</jdbc-type>
      <sql-type>TIMESTAMP</sql-type>

      </cmp-field>
      <cmp-field>
      <field-name>deviceName</field-name>
      <column-name>devicename</column-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR</sql-type>

      </cmp-field>
      <cmp-field>
      <field-name>deviceid</field-name>
      <column-name>deviceid</column-name>
      <jdbc-type>INTEGER</jdbc-type>
      <sql-type>INTEGER</sql-type>

      </cmp-field>
      <cmp-field>
      <field-name>modificationDate</field-name>
      <column-name>modificationdate</column-name>
      <jdbc-type>TIMESTAMP</jdbc-type>
      <sql-type>TIMESTAMP</sql-type>

      </cmp-field>
      <!--
      To define load groups for this entity, write a file named
      jbosscmp-jdbc-load-ManagedDeviceBean.xml and put it in
      your mergedir. Write it according to the following DTD slice:
      <!ELEMENT load-groups (load-group+)>
      <!ELEMENT load-group (load-group-name, description?, field-name+)>
      <!ELEMENT load-group-name (#PCDATA)>
      <!ELEMENT description (#PCDATA)>
      <!ELEMENT field-name (#PCDATA)>
      <!ELEMENT eager-load-group (#PCDATA)>
      <!ELEMENT lazy-load-groups (load-group-name+)>
      -->



      </enterprise-beans>

      <dependent-value-classes>
      </dependent-value-classes>
      </jbosscmp-jdbc>