Hi Robert,

Robert Giddings wrote:
Hi Armin,

Actually it doesn't seem to have anything to do with Proxies as setting
proxy to false while leaving auto-retrieve to true creates the same
problem.

As for code enhancements, there are none.

All my code is doing is reading out an object from the database which
has encrypted fields. I then run the decrypt method of that object to
produce a decrypted version. The collections aren't decrypted, but rather assigned to the new object, allowing for proxy collections. When their access method is called their member objects are decrypted.
Each collection member object has a parent reference to the owner object
of the collection and the decrypt method is run on this object when the
collection member object is decrypted. However instead of stopping in the loop because eventually the loop gets
to a null as is the case with all the other collections one of the
collections keeps on looping until a StackTraceOverflow.

For me it's difficult to figure this out without reading your sources. In OJB the class responsible to materialize query/collection objects is ...accesslayer.RsIterator.java. RsIterator use class MaterializationCache to avoid endless loops on cyclic object graph materialization.
Maybe this can help you to solve the problem.

I have looked at my code, but it is identical to the code for the
decrypting of the other collections, leading me to believe that this is
an error with OJB in regard to cyclic references.


It seems we reached an impasse ;-)
If OJB cause your problem it's mandatory for me to reproduce your problem - only this way I can fix it. So please could you send me an test to reproduce the problem (keep the test as simple as possible, remove all unneeded fields, classes... If OJB cause the problem you should be able to write an test without using your en/decrypt methods, only 'normal' objects with cyclic references).

regards,
Armin

Rob

-----Original Message-----
From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: 13 November 2007 11:28
To: OJB Users List
Subject: Re: Proxy collection and cyclic references

Hi Robert,

Robert Giddings wrote:
Hi Guys,

Has anyone had any trouble with a proxy collection and cyclic
references
before?

I keep getting StackTraceOverflow errors because of an infinite loop
where a collection of objects of one type has a reference to the
collection owner object.

However I can't see this as being a problem with my code, because I
have
looked all over the place for an error, but my code in the decrypt
method of the objects class is identical to other classes, and they
don't have any problem.

Could you reproduce this error if you remove your enhancements (if
exist)?
If yes, please open an issue
https://issues.apache.org/jira/browse/OJB
and describe detailed (e.g. with pseudo code) how to reproduce your
problem.

If possible please run your test against the latest version from SVN (OJB_1_0_RELEASE branch) - it's stable and will be the 1.0.5rc1. The OJB

test-suite run several tests with cyclic references and they all pass, so I would expect that this error (if it's one) already fixed in SVN.

regards,
Armin

Thanks,

Rob


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to