NullPointerException while creating CMP Bean
slava8691 Oct 13, 2002 10:22 PMHi,
I have two entities packaged in one jar. Deployed it fine. Tables are created no problem. When I try to call create() on each of them, first one creates beans(records) - again no problem.
Calling create() on second bean I can see that request coming through my ejbCreate(...) and then container throws exception I don't know how to debug.
Here is exception's stack from server.log:
2002-10-13 18:56:26,497 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCreateEntityCommand] Create, id is 12
2002-10-13 18:56:26,497 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Exists command executing: SELECT COUNT(*) FROM GROUP_TBL WHERE GROUP_ID=?
2002-10-13 18:56:26,497 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Set parameter: idx=1, jdbcType=INTEGER, value=12
2002-10-13 18:56:26,497 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Create command executing: INSERT INTO GROUP_TBL (DESCRIPTION,GROUP_ID,GROUP_NAME) VALUES (?,?,?)
2002-10-13 18:56:26,507 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCreateEntityCommand] Exception
java.lang.NullPointerException
at org.jboss.ejb.plugins.jaws.metadata.CMPFieldMetaData.getValue(CMPFieldMetaData.java:431)
at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.getCMPFieldValue(JDBCCommand.java:660)
at org.jboss.ejb.plugins.jaws.jdbc.JDBCCreateEntityCommand.setParameters(JDBCCreateEntityCommand.java:173)
at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:175)
at org.jboss.ejb.plugins.jaws.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:143)
at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.createEntity(JAWSPersistenceManager.java:255)
at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:253)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:270)
at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:728)
at java.lang.reflect.Method.invoke(Native Method)
at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1116)
at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:209)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:88)
at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:111)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129)
at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
at org.jboss.ejb.Container.invoke(Container.java:738)
at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1055)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:370)
at java.lang.reflect.Method.invoke(Native Method)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:236)
at sun.rmi.transport.Transport$1.run(Transport.java:147)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:143)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:479)
Both my beans look very similar.
I use JBoss 3.0.2 and configure CMP with JAWS.
Can anybody show me where to look for possible solutions for this problem?
Thanks a lot.