Cross-posting to OpenJPA list... Hopefully, they'll have some insight...
--kevan
On Aug 1, 2008, at 6:05 PM, David Blevins wrote:
On Aug 1, 2008, at 12:18 PM, rbaumhof wrote:
Hello at Geronimo,
i have a fine working geronimo web application. All calls from
tomcat are
passed to the ejb container by local interfaces. Now i want to
create for
special users a second java swing application. This of course works
with
remote interfaces. Most calls towards the new remote interfaces
(which are
identical to the local interfaces) are working, but some of them
don't work
because the data objects returned from the ejb container have
java.util.date
properties. It seems that they can not be passed over the remote
interface.
Error message:
Exception on login:Unknown Container Exception:
java.rmi.RemoteException:
Cannot read the response from the server. The class for an object
being
returned is not located in this system:; nested exception is:
java.lang.ClassNotFoundException:
org.apache.openjpa.util.java$util$Date$proxy
If i omit the java.util.date objects the service call succeds. I am
surprised that this simple data type is not supported by the remote
interfaces. Can i do anything to make it work??
Looks like OpenJPA is subclassing the java.util.Date class so what's
passed is actually not the simple data type you're expecting but
rather an instance of org.apache.openjpa.util.java$util$Date$proxy,
whatever that is. It looks like a dynamically generated class,
which could be tricky.
Anyone from the OpenJPA crowd know which jars might have to be
included in the client classpath to deserialize a
org.apache.openjpa.util.java$util$Date$proxy?
Also, have you ever considered using a writeReplace method in the
org.apache.openjpa.util.java$util$Date$proxy class so that it can be
swapped out for a plain java.util.Date instance upon serialization?
-David