0 Replies Latest reply on Nov 11, 2003 3:27 AM by saschaw

    Problems calling methodes of entity bean

    saschaw Newbie

      Hello,

      I have some problem with using Entity Beans in my JBoss Application Server running with MySql.
      The problem is, that I get following Exception, every time I try to call a get- or set-methode of my bean.

      09:47:29,187 ERROR [LogInterceptor] TransactionRolledbackException, causedBy:
      java.rmi.ServerException: Load failed; nested exception is: java.lang.NullPointerException
      at org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:163)
      at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.loadEntity(JAWSPersistenceManager.java:283)
      at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:410)
      ...

      Creating the home- and remote-instance of the bean is no problem, but it seams, that jboss is not able to load the data from the database.

      I don't know, if the problem is in the configuration of the database or in my bean deployment.
      If anyone has the same problem solved or knows the error, it would be nice to post it here.

      My ejb-jar.xml:


      Diese Bean beschreibt ein Unternehmen.

      <ejb-name>Business</ejb-name>

      org.oasis.BusinessHome
      org.oasis.Business
      <ejb-class>org.oasis.BusinessBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <primkey-field>Id</primkey-field>
      <prim-key-class>java.lang.Integer</prim-key-class>
      false

      <cmp-field><field-name>Id</field-name></cmp-field>
      <cmp-field><field-name>Name</field-name></cmp-field>
      <cmp-field><field-name>Text</field-name></cmp-field>


      My jaws.xml:

      java:/DefaultDS
      <type-mapping>mySQL</type-mapping>
      true

      <default-entity>
      <create-table>false</create-table>
      <remove-table>false</remove-table>
      <tuned-updates>true</tuned-updates>
      <read-only>false</read-only>
      <time-out>300</time-out>
      <row-locking>false</row-locking>
      <read-ahead>false</read-ahead>
      </default-entity>

      <enterprise-beans>

      <ejb-name>Business</ejb-name>
      <table-name>BUSINESS</table-name>
      <cmp-field>
      <field-name>Id</field-name>
      <column-name>Id</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>Name</field-name>
      <column-name>Name</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>Text</field-name>
      <column-name>Text</column-name>
      </cmp-field>

      <enterprise-beans>
      ...

      Thanks in advance!

      Sascha