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.



View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3857878#3857878

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3857878


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to