Hello,
Is there anything special I need to do to be able to 
return CMP fields with NULL value from the database?

I have a bean that works every time until I ask it to 
return a bean that has a field with a null value.  When it 
tries to return this bean I get the following exceptions:

[Batting] BattingBean:setEntityContext() called
[Batting] BattingBean:ejbActivate() called
[Batting] Activated bean Batting with id = MLB.Batting.ejb.interfaces.BattingPK@7b81b
e95
[Batting] 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
[Batting] java.rmi.ServerException: Load failed; nested exception is: 
[Batting]       java.lang.NullPointerException
[Batting] java.lang.NullPointerException
[Batting]       at java.lang.reflect.Field.set(Native Method)
[Batting]       at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.setCMPFieldValue(JDBCC
ommand.java:591)
[Batting]       at org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.handleResult
(JDBCLoadEntityCommand.java:112)
[Batting]       at org.jboss.ejb.plugins.jaws.jdbc.JDBCQueryCommand.executeStatementA
ndHandleResult(JDBCQueryCommand.java:59)
[Batting]       at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCComman
d.java:158)
[Batting]       at org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.execute(JDBC
LoadEntityCommand.java:77)
[Batting]       at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.loadEntity(JAWSP
ersistenceManager.java:150)
[Batting]       at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersiste
nceManager.java:277)
[Batting]       at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(Enti
tySynchronizationInterceptor.java:192)
[Batting]       at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInsta
nceInterceptor.java:187)
[Batting]       at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT
.java:133)
[Batting]       at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInter
ceptorCMT.java:263)
tting]       at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.jav
a:99)
[Batting]       at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityIntercept
or.java:144)
[Batting]       at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:19
[Batting]       at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:19
5)
[Batting]       at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:323)
[Batting]       at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMP
ContainerInvoker.java:367)
[Batting]       at java.lang.reflect.Method.invoke(Native Method)
[Batting]       at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241
)
[Batting]       at sun.rmi.transport.Transport$1.run(Transport.java:142)
[Batting]       at java.security.AccessController.doPrivileged(Native Method)
[Batting]       at sun.rmi.transport.Transport.serviceCall(Transport.java:139)
[Batting]       at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.jav
a:443)
[Batting]       at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransp
ort.java:643)
[Batting]       at java.lang.Thread.run(Thread.java:484)


I'm using JBoss-pre-2.1 from about 2 weeks ago with FreeBSD4.2-stable
and Sun's linux jdk 1.3.0beta_refresh-b09 and Oracle8i w/ classes12.zip
JDBC driver

Thanks for the help.




--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to