hi,

hmm, haven't seen any error so far when using the toString() method of
objects of this class so far.
what the toString() method does is to get all private fields of the object
by introspection and fill a string buffer with the name of the field and the
value.

i will look deeper into this later today, but, as mentioned, haven't seen
any problems so far with this method outside ojb. so if you have any other
idea what could cause this problem, i would very much appreciate that.

kr,
guenther

--
Günther Wieser

creative-it
Guglgasse 6/1/11/1
A-1110 Wien
Austria
http://www.creative-it.com


-----Original Message-----
From: Armin Waibel [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 04, 2005 2:27 PM
To: OJB Users List
Subject: Re: problem with ojb when overwriting the toString() method

Hi Günther,

Günther Wieser wrote:
> hi,
> 
> this weekend ojb brought me a lot of "fun". i'd been searching for a 
> problem for over half a day until i found out that ojb didn't like the 
> way i overwrote the toString() method ob the objects that i wanted to 
> be persisted.
> 
> finally i found some debug output like "BAD toString() implementation 
> of class xxxxx", but couldn't find any further details.
> 
> anyone an idea how i can implement an ojb compatible toString() method 
> output, and what ojb does with the result of the toString() method?
> 

The "BAD toString()..." comment was cause by an exception thrown by the
#toString() method of your persistent objet.
When OJB is logging some times the persistent object itself was logged too.
In this case OJB checks if the #toString method of the object is valid to
use. If not (#toString throws an exception) the "BAD toString..." entry is
shown.

Could it be the case that the #toString method of your persistent object is
cause an exception?

regards,
Armin


> kr,
> guenther
> 
> 

---------------------------------------------------------------------
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