1 Reply Latest reply on Feb 25, 2005 1:04 PM by Adrian Brock

    ojdbc14.jar

    Shaun Appleton Newbie

      Whilst looking into a problem I have tried using the latest Oracle 9.2 driver (the 9.2.0.5 version of ojdbc14.jar).

      When running this it gave a java.sql.SQLException : invalid conversion.
      Doing a trace showed that a numeric type was being used instead of an integer.

      The solution to this was to re-instate the SMALLINT jdbc type in the standardjbosscmp-jdbc.xml i.e. change -

      <mapping>
       <java-type>java.lang.Short</java-type>
       <jdbc-type>NUMERIC</jdbc-type>
       <!-- <jdbc-type>SMALLINT</jdbc-type> this resulted in a ClassCastException -->
       <sql-type>NUMBER(5)</sql-type>
       </mapping>


      to

      <mapping>
       <java-type>java.lang.Short</java-type>
       <jdbc-type>SMALLINT</jdbc-type>
       <sql-type>NUMBER(5)</sql-type>
       </mapping>


      It appears that Oracle have improved the driver so that the ClassCastException no longer occur.

      Should the next version of JBoss include the above change and reccomend that ojdbc14.jar (written 1.4 jvms) is used instead of classes12.jar (wriiten for 1.2 and 1.3 jvms)? The current (3.2.7) standardjbosscmp-jdbc.xml states to use classes12.jar 'or you will suffer'

      Shaun