Hi Armin,
repository_external.xml was the cause of my problem indeed.
Thanks a lot!
Yuriy Zubarev
> Hi Yuriy,
>
> did you replaced the repository_internal.xml file?
>
> OJB now does check if the autoincrement attribute of
> the given object-field was set 'true'.
> So class descriptor for DListImpl need this entry.
>
> regards,
> Armin
>
> ----- Original Message -----
> From: "Yuriy Zubarev" <[EMAIL PROTECTED]>
> To: "OJB Users List" <[EMAIL PROTECTED]>
> Sent: Saturday, December 28, 2002 8:51 AM
> Subject: OJB 0.9.8 and DListImpl (and PrefetchedRelationship)
>
>
>> Hello everyone,
>>
>> I just upgraded to the latest-greatest and a simple
>> piece of code that has never caused any problems
>> stopped working:
>>
>> ...
>> tx.begin();
>> OQLQuery query = odmg.newOQLQuery();
>> query.create("select bel from " + Course.class.getName() + " where id
> = " +
>> courseID);
>> DList dlist = (DList) query.execute();
>> ...
>>
>> OJB complains on the last line with the following message:
>>
>> [DEFAULT] WARN: Could not found autoincrement attribute for class:
>> org.apache.ojb.odmg.collections.DListImpl
>> [org.apache.ojb.odmg.collections.DListImpl] ERROR: Generation of new
> id
>> failed
>> null
>> java.lang.NullPointerException
>> at
>>
> org.apache.ojb.broker.util.sequence.SequenceManagerHelper.buildSequenceN
> ame(
>> Unknown Source)
>> at
>>
> org.apache.ojb.broker.util.sequence.SequenceManagerHiLoImpl.getUniqueId(
> Unkn
>> own Source)
>> at
> org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getUniqueId(Unknown
>> Source)
>> at
>>
> org.apache.ojb.broker.singlevm.DelegatingPersistenceBroker.getUniqueId(U
> nkno
>> wn Source)
>> at org.apache.ojb.odmg.collections.DListImpl.generateNewId(Unknown
> Source)
>> at org.apache.ojb.odmg.collections.DListImpl.<init>(Unknown Source) at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>> at
>>
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
> cces
>> sorImpl.java:39)
>> at
>>
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
> truc
>> torAccessorImpl.java:27)
>> at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at
>> java.lang.Class.newInstance0(Class.java:306)
>> at java.lang.Class.newInstance(Class.java:259)
>> at
>>
> org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuer
> y(Un
>> known Source)
>> at
>>
> org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuer
> y(Un
>> known Source)
>> at
>>
> org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuer
> y(Un
>> known Source)
>> at
>>
> org.apache.ojb.broker.singlevm.DelegatingPersistenceBroker.getCollection
> ByQu
>> ery(Unknown Source)
>> at org.apache.ojb.odmg.oql.OQLQueryImpl.execute(Unknown Source)
>>
>> I have no clue why there is a need for the new id being generated...
>>
>> I also went to see OJB.properties and just for "fun" changed
>> OqlCollectionClass to
>> org.apache.ojb.broker.util.ManageableVector but OJB didn't see that
> change
>> (everything
>> was all right with deployment), the error message I got was still
> about
>> DListImpl.
>>
>> I would appreciate any help!
>>
>> PS: BTW the reason I've crossed over to 0.9.8 was because
>> Criteria.addPrefetchedRelationship
>> worked sort of at random in version 0.9.7 - it was always correct
> database
>> queries-wise but in many cases I got null
>> result in response. When I took addPrefetchedRelationship out, the
> number of
>> db queries jumped
>> significantly but at least it worked all the time. I don't know if
>> PrefetchedRelationship issue
>> is fixed in 0.9.8, so far it seems to work fine.
>>
>> Thanks,
>> Yuriy ZUbarev
>>
>>
>>
>> __________________________________________________
>>
>> Do you Yahoo!?
>>
>> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
>>
>> http://mailplus.yahoo.com
>>
>>
>> --
>> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
>> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>>
>>
>>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]> For additional
> commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
Yuriy Zubarev
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>