2 Replies Latest reply on Jun 26, 2003 11:32 PM by jamiewang

    Blob, byte array, and oracle 8.1.6 CMP problem

    kerryrward

      I'm having problem getting jboss 2.4.1 to work with CMP and byte arrays. I'm using oracle 8.1.6 and have declared two columns to be of type blob. I have two byte[] variables (privateKey and publicKey) that I want to persistify using CMP. I have tried adding the following to jaws.xml:

      <cmp-field>
      <field-name>privateKey</field-name>
      <column-name>PRIVATE_KEY</column-name>
      <jdbc-type>BLOB</jdbc-type>
      <sql-type>BLOB</sql-type>
      </cmp-field>

      I also tried it with

      <cmp-field>
      <field-name>privateKey</field-name>
      <column-name>PRIVATE_KEY</column-name>
      <jdbc-type>JAVA_OBJECT</jdbc-type>
      <sql-type>BLOB</sql-type>
      </cmp-field>

      but neither worked.

      I get the following exception:

      [DigitalCertificate] TRANSACTION ROLLBACK EXCEPTION:Load failed; nested exceptio
      n is:
      java.sql.SQLException: Unable to load a ResultSet column 9 into a variab
      le of type '[B': java.io.StreamCorruptedException: InputStream does not contain
      a serialized object; nested exception is:
      java.rmi.ServerException: Load failed; nested exception is:
      java.sql.SQLException: Unable to load a ResultSet column 9 into a variab
      le of type '[B': java.io.StreamCorruptedException: InputStream does not contain
      a serialized object
      [DigitalCertificate] java.rmi.ServerException: Load failed; nested exception is:

      [DigitalCertificate] java.sql.SQLException: Unable to load a ResultSet column
      9 into a variable of type '[B': java.io.StreamCorruptedException: InputStream d
      oes not contain a serialized object
      [DigitalCertificate] java.sql.SQLException: Unable to load a ResultSet column 9
      into a variable of type '[B': java.io.StreamCorruptedException: InputStream does
      not contain a serialized object
      [DigitalCertificate] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.getResult
      Object(JDBCCommand.java:488)
      ...


      Thanks for any suggestions.