1 Reply Latest reply on May 1, 2002 12:40 PM by Benjamin Hille

    JAVA_OBJECT and NULL

    Benjamin Hille Newbie

      Hi,
      it seems like it is not possible to create a CMP EJB (JBoss 2.4.x) with a BLOB field with a null value.
      Everytime I try to create an entity I get a Invalid Column Type exception (cf trace).
      Someone has already mention the problem in 2000, but it has not been solved ( http://www.kpi.com.au/jbossarchive/0012/0022.html ). Is that the true story and should I send a bug ?
      Thanks,
      Benjamin

      JAWS] Create, id is com.notuskey.persistence.documents.OpDocPK@f683366a
      [OracleDS] Resource 'org.jboss.pool.jdbc.xa.wrapper.XAResourceImpl@21bc40' enlisted for 'org.jboss.pool.jdbc.xa.wrapper.XAConnectionImpl@7cec96'.
      [OracleDS] Pool OracleDS [1/1/Unlimited] gave out pooled object: org.jboss.pool.jdbc.xa.wrapper.XAConnectionImpl@7cec96
      [JAWS] Exists command executing: SELECT COUNT(*) FROM OpDoc WHERE ID_OpDoc=?
      [JAWS] Set parameter: idx=1, jdbcType=DECIMAL, value=698681372360630562982267543914628445
      [JAWS] Create command executing: INSERT INTO OpDoc (dateOfDoc,userIdentifier,effectiveFrom,weightedPts,GenericDoc,status,realWorldRef,modifiedDate,thirPartySrc,faceToFaceChk,scannedImg,dateExamined,OrgReg,ID_OpDoc,effectiveTo,indreg,createdDate) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
      [JAWS] Set parameter: idx=1, jdbcType=DATE, value=Tue Apr 30 12:06:50 BST 2002
      [JAWS] Set parameter: idx=2, jdbcType=VARCHAR, value=APPLI
      [JAWS] Set parameter: idx=3, jdbcType=DATE, value=Tue Apr 30 12:06:50 BST 2002
      [JAWS] Set parameter: idx=4, jdbcType=INTEGER, value=0
      [JAWS] Set parameter: idx=5, jdbcType=BIGINT, value=1
      [JAWS] Set parameter: idx=6, jdbcType=VARCHAR, value=ACTIVE
      [JAWS] Set parameter: idx=7, jdbcType=VARCHAR, value=the doc ref number
      [JAWS] Set parameter: idx=8, jdbcType=DATE, value=Tue Apr 30 12:06:50 BST 2002
      [JAWS] Set parameter: idx=9, jdbcType=VARCHAR, value=the doc issuer
      [JAWS] Set parameter: idx=10, jdbcType=BIT, value=true
      [JAWS] Set parameter: idx=11, jdbcType=JAVA_OBJECT, value=NULL
      [JAWS] java.sql.SQLException: Invalid column type
      [JAWS] at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
      [JAWS] at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
      [JAWS] at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:219)
      [JAWS] at oracle.jdbc.driver.OracleStatement.get_internal_type(OracleStatement.java:4027)
      [JAWS] at oracle.jdbc.driver.OraclePreparedStatement.setNull(OraclePreparedStatement.java:913)
      [JAWS] at com.p6spy.engine.spy.P6PreparedStatement.setNull(P6PreparedStatement.java:287)
      [JAWS] at org.jboss.pool.jdbc.PreparedStatementInPool.setNull(PreparedStatementInPool.java:92)
      [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.setParameter(JDBCCommand.java:280)
      [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCreateEntityCommand.setParameters(JDBCCreateEntityCommand.java:165)
      [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:159)
      [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:135)
      [JAWS] at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.createEntity(JAWSPersistenceManager.java:128)
      [JAWS] at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:231)
      [JAWS] at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:616)