0 Replies Latest reply on Nov 15, 2001 9:45 AM by Sergei Batiuk

    Problem accessing entity bean

    Sergei Batiuk Newbie

      Hello people,

      I have a problem invoking methods on an entity bean.

      I have a session bean 'PeopleManager' and an entity bean 'Person'.

      They are deployed in the same ejb-jar with the following descriptors:

      jaws.xml:

      jdbc/OracleDS
      <resource-managers />
      <enterprise-beans>

      <ejb-name>Person</ejb-name>
      <table-name>people</table-name>
      <remove-table>false</remove-table>

      </enterprise-beans>


      jboss.xml:
      <?xml version="1.0" encoding="Cp1251"?>

      false
      <container-configurations />
      <resource-managers />
      <enterprise-beans>

      <ejb-name>Person</ejb-name>
      <jndi-name>ejb/people/Person</jndi-name>


      <ejb-name>PeopleManager</ejb-name>
      <jndi-name>ejb/people/PeopleManager</jndi-name>


      </enterprise-beans>


      I have a DataSource set up in jboss.jcml (jdbc/OracleDS) that works fine with a session bean.

      But when I try invoking methods on the same DataSource from an entity bean, I receive the following message:

      [Person] TRANSACTION ROLLBACK EXCEPTION:Load failed; nested exception is:
      java.lang.NullPointerException; nested exception is:
      java.rmi.ServerException: Load failed; nested exception is:
      java.lang.NullPointerException
      [Person] java.rmi.ServerException: Load failed; nested exception is:
      [Person] java.lang.NullPointerException
      [Person] java.lang.NullPointerException
      [Person] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.getResultObject(J
      DBCCommand.java:504)
      [Person] at org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.loadOne
      Entity(JDBCLoadEntityCommand.java:219)
      [Person] at org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.handleR
      esult(JDBCLoadEntityCommand.java:176)
      [Person] at org.jboss.ejb.plugins.jaws.jdbc.JDBCQueryCommand.executeState
      mentAndHandleResult(JDBCQueryCommand.java:59)
      [Person] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCC
      ommand.java:160)
      [Person] at org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.execute
      (JDBCLoadEntityCommand.java:147)
      [Person] at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.loadEntity(
      JAWSPersistenceManager.java:156)
      [Person] at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPer
      sistenceManager.java:362)
      [Person] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke
      (EntitySynchronizationInterceptor.java:286)
      [Person] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(Entity
      InstanceInterceptor.java:208)
      [Person] at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLock
      Interceptor.java:136)
      [Person] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxIntercept
      orCMT.java:133)
      [Person] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(Tx
      InterceptorCMT.java:307)
      [Person] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCM
      T.java:99)
      [Person] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInte
      rceptor.java:128)
      [Person] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.ja
      va:195)
      [Person] at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:427
      )
      [Person] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke
      (JRMPContainerInvoker.java:395)
      [Person] at java.lang.reflect.Method.invoke(Native Method)
      [Person] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.jav
      a:241)
      [Person] at sun.rmi.transport.Transport$1.run(Transport.java:142)
      [Person] at java.security.AccessController.doPrivileged(Native Method)
      [Person] at sun.rmi.transport.Transport.serviceCall(Transport.java:139)
      [Person] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTranspor
      t.java:443)
      [Person] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPT
      ransport.java:643)
      [Person] at java.lang.Thread.run(Thread.java:484)

      Does any one have an idea, what is going on?