Hi Jakob
On Thu, 18 Nov 2004 21:17:04 +0100, Jakob Braeuchi <[EMAIL PROTECTED]> wrote:
>hi gerhard,
>
>i applied a small fix in addCollectionEdges()
>
>...
> else
> {
> if (col instanceof ManageableCollection)
> {
> Collection newCol = new ArrayList();
> CollectionUtils.addAll(newCol, ((ManageableCollection)
>col).ojbIterator());
>
> refObjects = newCol.toArray();
> }
> else if (col instanceof Collection)
> {
> refObjects = ((Collection) col).toArray();
>
> }
> else if (col instanceof Object[])
>...
>
>two of the reported problems were caused by the fact that ManageableCollection
>does not extend Collection.
>
Oops... Yep, that's something I overlooked. I should have got suspicious when I
copied that error message from BrokerHelp.getCollectionIterator ... :-)
Gerhard
>but i still have problems in org.apache.ojb.odmg.M2NTest.
>
>Tests run: 207, Failures: 2, Errors: 6
>
>jakob
>
>Jakob Braeuchi schrieb:
>
>> hi gerhard,
>>
>> thanks for your contribution. it looks really impressive !
>> i integrated your class into to current 1.0.x branch an ran all odmg
>> testcases without skipping known issues.
>> with the old reorder i get:
>>
>> Tests run: 207, Failures: 2, Errors: 8
>>
>> with your ordering i still have 6 errors:
>>
>> Tests run: 207, Failures: 2, Errors: 6
>>
>> ie this one:
>>
>> 3)
>> testStoreComplex(org.apache.ojb.odmg.M2NTest)org.apache.ojb.odmg.TransactionAbortedExceptionOJB
>>
>>
>> at
>> org.apache.ojb.odmg.ObjectEnvelopeTable.commit(ObjectEnvelopeTable.java:174)
>>
>> at
>> org.apache.ojb.odmg.TransactionImpl.doWriteObjects(TransactionImpl.java:324)
>>
>> at
>> org.apache.ojb.odmg.TransactionImpl.prepare(TransactionImpl.java:624)
>> at org.apache.ojb.odmg.TransactionImpl.commit(TransactionImpl.java:581)
>> at org.apache.ojb.odmg.M2NTest.doTestStoreComplex(M2NTest.java:157)
>> at org.apache.ojb.odmg.M2NTest.testStoreComplex(M2NTest.java:137)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>
>>
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>
>>
>> at org.apache.ojb.odmg.AllTests.main(AllTests.java:18)
>> Caused by: org.apache.ojb.broker.OJBRuntimeException: Given object
>> collection of type class
>> org.apache.ojb.odmg.M2NTest$MovieManageableCollection can not be managed
>> by OJB. Use Array, Collection or ManageableCollection instead!
>> at
>> org.apache.ojb.odmg.ObjectEnvelopeOrdering.addCollectionEdges(ObjectEnvelopeOrdering.java:312)
>>
>>
>> at
>> org.apache.ojb.odmg.ObjectEnvelopeOrdering.addEdgesForVertex(ObjectEnvelopeOrdering.java:241)
>>
>>
>> at
>> org.apache.ojb.odmg.ObjectEnvelopeOrdering.reorder(ObjectEnvelopeOrdering.java:133)
>>
>>
>> at
>> org.apache.ojb.odmg.ObjectEnvelopeTable.reorder(ObjectEnvelopeTable.java:588)
>>
>>
>> at
>> org.apache.ojb.odmg.ObjectEnvelopeTable.commit(ObjectEnvelopeTable.java:148)
>>
>>
>> jakob
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]