0 Replies Latest reply on Nov 18, 2002 9:57 AM by nioto

    Oracle and byte/short  type

    nioto

      Hi,

      I'm using Jboss 3.0.3 and an oracle8 database,

      in my CMP I have some fields with byte type, and I run with problems.

      I got an ClassCastException, this can be cause by th oracle driver that does not support call to
      PreparedStatement.setObject ( int i, Object o )
      with o instance og java.lang.Byte .

      I've got the same problem with hsql ( same exception ),

      So hsql team said to me that in the specification of jdbc
      we cannot do such call to setObject

      So in the spec :
      http://java.sun.com/j2se/1.3/docs/guide/jdbc/getstart/mapping.html

      # 8.9.3 JDBC Types Mapped to Java Object Types

      they said
      "tinyint" and "smallint" need to be mapped to Integer


      Does anybody has same problem ?


      NioTo