0 Replies Latest reply on Dec 11, 2004 8:14 PM by George Berish

    Reconfigure To MySQL - hsqldb-jdbc-state-service.xml

    George Berish Novice

      Hi,
      I'd like to store files in he database (SQL-Server). The File data itself is stored in a array byte[]. The entity attribute is an Object. The database column type is image.
      I have no problem with storing the data. But when reading the entity data from the database I get the following exception

      2004-12-08 14:59:27,453 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException in method: public abstract java.lang.Integer de.netpioneer.jchms.entities.ChangeRequestComment.getChangeRequestCommentID(), causedBy:
      java.sql.SQLException: Unable to load to deserialize result: java.io.StreamCorruptedException: invalid stream header
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil.convertToObject(JDBCUtil.java:291)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil.access$500(JDBCUtil.java:53)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil$6.readResult(JDBCUtil.java:585)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil$AbstractResultSetReader.get(JDBCUtil.java:400)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.loadArgumentResults(JDBCAbstractCMPFieldBridge.java:424)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.loadInstanceResults(JDBCAbstractCMPFieldBridge.java:373)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:188)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:72)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:612)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:594)
      at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:381)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.loadEntity(CachedConnectionInterceptor.java:352)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:239)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
      at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:114)


      What JDBC_TYPE do I have to configure in jbosscmp_jdbc.xml for the column. I already tryed BLOB, but this type wasnt supported by the driver.