3 Replies Latest reply on Feb 10, 2003 7:00 PM by Stephen Coy

    Problem in handling CMP bean in jboss3.0.4 with BLOB field i

    karthikeyan Newbie

      hi,

      i am using jboss3.0.4 and oracle9i . And i am having a table with a field of BLOB type in which i have stored a xml file as an object (using getBinaryStream() and inputstream etc.. in a general java file)
      when i am trying to retrieve the file(object) stored in database through CMP bean, i am getting the following
      error in jboss server as follows.


      11:00:19,588 INFO [MainDeployer] Deployed package: file:/C:/jboss-3.0.4/server/
      default/deploy/BCTest.jar
      11:00:42,150 INFO [STDOUT] Begin of TestblobView
      11:00:42,230 ERROR [LogInterceptor] TransactionRolledbackLocalException, causedBy:
      java.sql.SQLException: Unable to load to deserialize result: java.io.StreamCorru
      ptedException: invalid stream header
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil.convertToObject(JDBCUtil.java
      :747)


      is there any way to solve the above problem?


      Note: 1) i have set the following tags in my jbosscmp-jdbc.xml file also.

      <cmp-field>
      <field-name>xml</field-name>
      <column-name>XML</column-name>
      <jdbc-type>BLOB</jdbc-type>
      <sql-type>BLOB</sql-type>
      </cmp-field>

      2) since i am storing file that is less than 3 kb in size, i am using oracle thin driver (classes12.jar)


      Thanks in advance
      karthikeyan