You probably need to use an Integer instead of an int, even though the jdbc spec seems to say getInt returns 0 for null values.. david jencks On 2001.07.04 09:33:14 -0400 [EMAIL PROTECTED] wrote: > Hello everyone: > > In a cmp entity bean, I made a map from Number(in Oracle) to INTEGER > (in Jdbc type) to int( in the entity bean) in the jaws.xml, as the > following: > <field-name>cityId</field-name> > <column-name>CITY_ID</column-name> > <sql-type>NUMBER(6)</sql-type> > <jdbc-type>INTEGER</jdbc-type> > > (DataBase: oracle8i) > > But When I call a finder to load a row whose City_ID field is null in > database, An Exception occurred.(as below). > If city_id is not null, It work well. > > How to make it work? why this happened? > > > java.rmi.ServerException: RemoteException occurred in server thread; > nested exception is: > java.rmi.ServerException: Load failed; nested exception is: > java.lang.NullPointerException > java.rmi.ServerException: Load failed; nested exception is: > java.lang.NullPointerException > java.lang.NullPointerException > at >sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245) > at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220) > at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122) > at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invoke(Unknown > Source) > at >org.jboss.ejb.plugins.jrmp.interfaces.EntityProxy.invoke(EntityProxy.java:182) > at $Proxy1.getId(Unknown Source) > at untitled6.NodeTestClient1.main(NodeTestClient1.java:106) > Exception in thread "main" > > > _____________________________________________ > [�㲻���� ��������] ����ר�úţ�95963���û���/���룺263 > ��ױƷ�����ػݣ����ۿ� http://shopping.263.net/category04.htm > > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > http://lists.sourceforge.net/lists/listinfo/jboss-user > _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
