0 Replies Latest reply on Aug 26, 2005 6:16 PM by auricio lopez

    Error trying to get a BYTEA field from POSTGRES databace.

    auricio lopez Newbie

      Im trying to get a BYTEA field in postgres RDBMS using JBOSS 4.0.2, the problem is that when i try to get the values from the database i get this Exception :

      2005-08-26 16:37:14,804 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.FlujodetrabajoBean] Executing SQL: SELECT id, objeto, navegacion, nombre, descripcion FROM flujodetrabajo WHERE (id=?) OR (id=?)
      2005-08-26 16:37:14,874 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException in method: public abstract java.lang.String com.ig.nucleo.flujodetrabajo.beans.FlujodetrabajoLocalBusiness.getNombre(), 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:290)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil.convertToObject(JDBCUtil.java:239)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCResultSetReader$5.readResult(JDBCResultSetReader.java:136)

      this is the interest part of my jbosscmp-jdbc.xml file:

      <datasource-mapping> PostgreSQL 8.0</datasource-mapping>

      so, im using the PostgreSQL 8.0 datasource-mapping wich maps an BYTEA type to a java.lang.Object, correct??, now the real problem is that when i deploy the application (all entities and session beans deployed OK), and run it, the applicaction works great (i can create new values in the database, i can get the values from database etc.), but when i restart the server i can get the old values saved in the db, getting the same exception, over and over again. I think the problem has to be with JBoss since the application was OK
      running in SJSAS, the key must be anywhere in the configuration files.

      i would apreciatte any suggestion
      thanks in advance for your help.