0 Replies Latest reply on Nov 14, 2003 12:25 PM by gtm

    exception at JDBCFindEntitiesCommand

    gtm

      Hi

      I'm having a NullPointerException at the method JDBCFindEntitiesCommand.execute().
      I get this error when I call home.findByPrimaryKey(key) or home.findAll().

      Below are extracts of my deployment descriptors.

      I use MS SQL Server. I do not think that the problem comes from the datasource definitions, but since nothing works, i would not exclude it.

      I also get an error during deployment, and I think it is related (and maybe also the cause of the problem)
      do you think it is related?
      org.jboss.deployment.DeploymentException: Couldn't create entity command: ; - nested throwable: (java.lang.NullPointerException)
      Caused by: java.lang.NullPointerException

      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createCreateEntityCommand(JDBCCommandFactory.java:126)


      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createCreateEntityCommand(JDBCCommandFactory.java:136)

      And i also get this warning, which could also be related:
      9:15:55,108 WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=TObjectAttribute,service=EJB

      org.jboss.deployment.DeploymentException: Couldn't create entity command: ; - nested throwable: (java.lang.NullPointerException)

      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createCreateEntityCommand(JDBCCommandFactory.java:136)


      Thanks
      Marc

      ---------------> JBoss-cmp-jdbc
      <enterprise-beans>

      <ejb-name>TAttribute</ejb-name>
      <table-name>T_Attribute</table-name>
      java:/DefaultDS
      <datasource-mapping>MS SQLSERVER2000</datasource-mapping>
      <cmp-field>
      <field-name>attributeID</field-name>
      <column-name>AttributeID</column-name>
      </cmp-field>
      <!-- and other fields -->
      <cmp-field>
      <field-name>classID</field-name>
      <column-name>ClassID</column-name>
      </cmp-field>


      --------------> ejb-jar.xml

      <display-name>TAttribute</display-name>
      <ejb-name>TAttribute</ejb-name>
      <local-home>test1.TAttributeHome</local-home>
      test1.TAttribute
      <ejb-class>test1.TAttributeBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>test1.TAttributePK</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>TAttribute</abstract-schema-name>
      <!-- here are all the cmp fields -->

      <query-method>
      <method-name>findAll</method-name>
      <method-params />
      </query-method>
      <ejb-ql>SELECT OBJECT(o) FROM TAttribute o</ejb-ql>
      )