RE: [JBoss-user] Null pointer/Server exception when int column null in db

2001-04-30 Thread Schouten, Andreas
ED] > Subject: [JBoss-user] Null pointer/Server exception when int column > null in db > > I'm getting a NullPointerException (wrapped up in a > TransactionRolledbackException, in turn wrapped up in a > ServerException...) > when I try to read a column with null data i

Re: [JBoss-user] Null pointer/Server exception when int column null in db

2001-04-30 Thread Maris Orbidans
> At 12:52 PM 4/30/2001, you wrote: > >Hi, > >one way to solve this is by changing the getXX() method in your EJBean > >class for that field to: > > > >public int getXX(){ > > if (XX == null) > > XX = 0; > > return XX; > >} > > Thanks, but... this won't work (or compile): you can't comp

Re: SV: [JBoss-user] Null pointer/Server exception when int column null in db

2001-04-30 Thread Jim Cheesman
-- >From: Jim Cheesman <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Monday, April 30, 2001 11:41 AM >Subject: Re: [JBoss-user] Null pointer/Server exception when int column >null in db > > > > At 12:52 PM 4/30/2001, you wrote: > > >Hi, > > &g

SV: [JBoss-user] Null pointer/Server exception when int column null in db

2001-04-30 Thread Lennart Petersson
Don't use int but instead Integer as entity attribute. Pain in the ass but that's life sometimes... :-) /L - Original Message - From: Jim Cheesman <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 30, 2001 11:41 AM Subject: Re: [JBoss-user] Null po

Re: [JBoss-user] Null pointer/Server exception when int column null in db

2001-04-30 Thread Jim Cheesman
At 12:52 PM 4/30/2001, you wrote: >Hi, >one way to solve this is by changing the getXX() method in your EJBean >class for that field to: > >public int getXX(){ > if (XX == null) > XX = 0; > return XX; >} Thanks, but... this won't work (or compile): you can't compare an int to null. Any

Re: [JBoss-user] Null pointer/Server exception when int column null in db

2001-04-30 Thread Russell
Hi Jim , Use primitives wrapper class . for example if field is int , use Integer class. Thanks Jim Cheesman wrote: > > I'm getting a NullPointerException (wrapped up in a > TransactionRolledbackException, in turn wrapped up in a ServerException...) > when I try to read a column with null

Re: [JBoss-user] Null pointer/Server exception when int column null in db

2001-04-30 Thread Ramaekers Werner
Hi, one way to solve this is by changing the getXX() method in your EJBean class for that field to: public int getXX(){ if (XX == null) XX = 0; return XX; } Werner [EMAIL PROTECTED] wrote: >I'm getting a NullPointerException

[JBoss-user] Null pointer/Server exception when int column null in db

2001-04-30 Thread Jim Cheesman
I'm getting a NullPointerException (wrapped up in a TransactionRolledbackException, in turn wrapped up in a ServerException...) when I try to read a column with null data in an int field. Is there any work around for this with a CMP entity bean, or is BMP the only way forward? The db is DB2