On 10/25/05, Warner Onstine <[EMAIL PROTECTED]> wrote:
> Hi all,
> This is my first project using OJB so forgive me if this is a simple
> question, however I can't find anything specific in the docs for this.
>
> Currently we have an object called Account which extends another object
> called BusinessObjectBase. We want to use proxying for any place where the
> Account class is referenced so we created an AccountProxy interface class
> that Account implements and then set the proxy="dynamic" for the class
> declaration.
>
> When we run the program we get the following error message:
> org.springframework.orm.ojb.OjbOperationException: OJB operation failed;
> nested exception is org.apache.ojb.broker.PersistenceBrokerException: Error
> invoking method toString
> org.apache.ojb.broker.PersistenceBrokerException: Error invoking method
> toString
> at org.apache.ojb.broker.core.proxy.IndirectionHandlerDefaultImpl.invoke(
> IndirectionHandlerDefaultImpl.java:334)
> at $Proxy31.toString(Unknown Source)
> at java.lang.String.valueOf(String.java:2131)
> at java.lang.StringBuffer.append(StringBuffer.java:370)
>
> There is a toString method, but this method is at the BusinessObjectBase
> level (not the Account level). Not sure exactly where we should be
> extracting the toString method, or what we need to do to fix this particular
> issue.
>
> We are using ojb-1.0.3 with Spring 1.1.5

If you have a specific proxy interface, then you should specify it
instead of the 'dynamic' value (which is reserved for when the type
that the class-descriptor references, is an interface itself, or if
you use CGLib-proxies). See here for details:

http://db.apache.org/ojb/docu/guides/basic-technique.html#Using+Proxy+Classes

Tom

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

Reply via email to