Hypersonic deserialization problem in Jboss 3.2.5
mzaidel Sep 29, 2004 3:00 AMMy EJB is attempting to pull a serialized class out of a database table. However, the Hypersonic database where the class is stored is throwing an exception. Specifically, the EJB is storing in a Hypersonic 'OBJECT' column a class instance which includes as a member an org.jboss.proxy.ejb.handle.StatefulHandleImpl instance. Serializing and inserting the outer class into the database table is no problem. However, when an EJB attempts to retrieve the data, I get a SQLException (see stacktrace below).
As far as I can determine from trawling the Hypersonic source, the Hypersonic ResultSet is attempting to deserialize the outer class and is failing (due to classpath issues?). Thus, the jdbcResultSet received by the appserver is missing the Object instance it expects and re-interprets an ArrayOutOfBoundsException as a SQLException.
So, my question is this: does Hypersonic really attempt to deserialize the object on the database server side? If so, given that this server is started from jboss, how do I fix the classpath of the Hypersonic server?
Configuration:
Jboss 3.2.5, using CMP, with the bundled Hypersonic database (v.1.7.1), connected via TCP.
Regards,
Martin
NB: in the following, the agent column is of type 'object'.
2004-09-29 16:47:42,678 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.nothing_e] Executing SQL: SELECT agent, agentName, agentPackage, deploymentId, agentHandle FROM AGENTSTATE WHERE (agentId=?) 2004-09-29 16:47:42,678 ERROR [org.jboss.ejb.plugins.LogInterceptor] EJBException, causedBy: java.sql.SQLException: Column not found: 0 at org.hsqldb.Trace.getError(Unknown Source) at org.hsqldb.Trace.error(Unknown Source) at org.hsqldb.jdbcResultSet.getColumnInType(Unknown Source) at org.hsqldb.jdbcResultSet.getBytes(Unknown Source) at org.jboss.resource.adapter.jdbc.WrappedResultSet.getBytes(WrappedResultSet.java:233) at org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil$5.readResult(JDBCUtil.java:569) at org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil$AbstractResultSetReader.get(JDBCUtil.java:402) at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.loadArgumentResults(JDBCAbstractCMPFieldBridge.java:430) at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.loadInstanceResults(JDBCAbstractCMPFieldBridge.java:379) at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:191) at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:72) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:620) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:602) at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:355)