RE: [ojb-users] NoSuchElementException
Brought to you by:
thma
From: Weaver, S. <Sw...@ri...> - 2002-04-24 17:26:23
|
Scratch that last post. The reason I was getting that exception was due = to corrupted data in a DECIMAL column in my DB not the constructor. = Sorry. =20 =20 Scott -----Original Message----- From: Weaver, Scott [mailto:Sw...@ri...] Sent: Wednesday, April 24, 2002 12:21 PM To: 'Stephane Felten'; obj...@li... Subject: RE: [ojb-users] NoSuchElementException Hi St=E9phane,=20 This may or may not have any connection to your issue. I noticed that = if I had a default constructor that was setting default values for some of = my object's properties, specifically ones marked as PK's in my = repository.xml, I received similar errors to yours. As soon as I removed the lines = that initialized those properties, everything worked fine. Example:=20 This caused the errors:=20 public TscWarehouse()=20 {=20 super();=20 _recordCode =3D "WN";=20 companyNumber=3D new BigDecimal(0); //PK property in repository.xml = applicationId =3D "IA"; //PK property in repository.xml=20 }=20 this fixed it:=20 public TscWarehouse()=20 {=20 super();=20 }=20 hth,=20 Scott=20 > -----Original Message-----=20 > From: Stephane Felten [ mailto:sf...@un... <mailto:sf...@un...> ]=20 > Sent: Wednesday, April 24, 2002 10:41 AM=20 > To: obj...@li...=20 > Subject: [ojb-users] NoSuchElementException=20 >=20 >=20 > hi,=20 > I am trying to use OJB; I make only simple query and I get in=20 > one case a =3D=20 > no suchElementException:=20 > java.util.NoSuchElementException at=20 > ojb.broker.accesslayer.RsIterator.next(=3D=20 > RsIterator.java:154) at=20 > ojb.broker.singlevm.PersistenceBrokerImpl.getCollec=3D=20 > tionByQuery(PersistenceBrokerImpl.java:900) at=3D20=20 >=20 > I do not receive this Exception when there are no elements on=20 > this table.=20 > I could not find why I receive this error; maybe it is a=20 > typical error can =3D=20 > you give me some hints to find my mistakes?=20 >=20 > St=E9phane FELTEN=20 >=20 >=20 >=20 > _______________________________________________=20 > Objectbridge-users mailing list=20 > Obj...@li...=20 > https://lists.sourceforge.net/lists/listinfo/objectbridge-users <https://lists.sourceforge.net/lists/listinfo/objectbridge-users> =20 >=20 |