Hello Ojb-Users.

I have a Cocoon + OJB installation running. For performance reasons
there is a dynamic Proxy configured with class B.
For example let's have two classes A and B:

Class A: (has no proxy)
- uid
- link  -> points to uid of class B
- B (foreign key, holds the instance of B associated with link)

Class B: (has a proxy)
- uid
- data

Everything works fine without the proxy. But when proxy is turned on and
A points to an ID that has no B in the DB, it throws a NPE:

...
Caused by: org.apache.ojb.broker.PersistenceBrokerException: Error
invoking method getIndirectionHandler
        at
org.apache.ojb.broker.core.proxy.AbstractIndirectionHandler.invoke(AbstractIndirectionHandler.java:363)
        at $Proxy29.getIndirectionHandler(Unknown Source)
        ... 61 more
Caused by: java.lang.NullPointerException
        at
org.apache.ojb.broker.core.proxy.AbstractIndirectionHandler.invoke(AbstractIndirectionHandler.java:347)
        ... 62 more

Is there a way to catch this? I can load A so it has a proxy instance of
B associated with it. ATM there is no way for me to know if the proxy
will find a real object of B. When I access this reference, it crashes..

I really would appreciate help,

Martin



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

Reply via email to