Hi, > I get an exception on the line: Object o = > rs.getObject(1); > > that says: > org.h2.jdbc.JdbcSQLException: Deserialization failed, cause: > "java.lang.ClassNotFoundException: > com.test.types.MyRecord" [90027-127] > at org.h2.message.Message.getSQLException(Message.java:110) > at org.h2.util.ObjectUtils.deserialize(ObjectUtils.java:66) > at > org.h2.jdbc.JdbcConnection.convertToDefaultObject(JdbcConnection.java: > 1674) > at org.h2.jdbc.JdbcResultSet.getObject(JdbcResultSet.java:461)
Could you post the complete stack trace please? > not sure why > its trying to get it as the 'MyRecord' class rather than an Object > class. I don't understand what you mean here. Assigning an object of type "com.test.types.MyRecord" to an variable of type "java.lang.Object" doesn't change the class of the object. The same goes when serializing / deserializing an object. > the deserialization should be happening on the client side Yes, it does. But the class (com.test.types.MyRecord) needs to be in the classpath on the client side when you call ResultSet.getObject. I will change the ResultSet.getObject documentation: "Returns a column value as a Java object. The data is de-serialized into a Java object (on the client side)." Regards, Thomas -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
