I have a very strange behaviour with JOnAS 2.2.5 (RMI): I have a CMP Entity Bean that
encapsulates a table that has a
TIMESTAMP field. No special things, just a standard bean. When I try to read that
field with myBean.getThatTimestampField
(this method is signed as java.sql.Timestamp getThatTimestampField()), my client
crashes because the RMI stub gets no
java.sql.Timestamp but a driver-specific timestamp. It seems as if GenIC does not
create standard data types as wanted by the
signature of the function but does passthrough the special data type the driver
internally uses. This leads to the fact that
my client now needs to load the classes in the JDBC driver (even if my client does
nothing with the jdbc driver):
java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.lang.ClassNotFoundException: com.sybase.jdbc2.tds.SybTimestamp (no
security manager: RMI class loader disabled)
java.lang.ClassNotFoundException: com.sybase.jdbc2.tds.SybTimestamp (no security
manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:318)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:88)
at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:145)
at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:918)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:366)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1186)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at
de.quipsy.server.app.beans.JOnASTlRemote_Stub.getGeaendertAm(JOnASTlRemote_Stub.java:203)
at
de.quipsy.client.testclient.TestclientDialog.jPanelTl_componentShown(TestclientDialog.java:279)
at
de.quipsy.client.testclient.TestclientDialog$4.componentShown(TestclientDialog.java:178)
at java.awt.Component.processComponentEvent(Component.java:3606)
at java.awt.Component.processEvent(Component.java:3558)
at java.awt.Container.processEvent(Container.java:1164)
at java.awt.Component.dispatchEventImpl(Component.java:2595)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2499)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:319)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:103)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
This is very bad because I do not want my clients to load a JDBC driver at all. Does
anybody know what I can do? Why does the
GenIC created classes passthrough other types than given?