0 Replies Latest reply on Feb 2, 2005 8:23 AM by jivkoto

    Problem converting to long

    jivkoto Newbie

      Hi to all of you,
      I'm using Firebird 1.5.2 with Jaybird 1.5.5 and jboss 3.2.6.
      I have this strange problem. I have ejb with CMP 2.x it has finder method that I am trying to use. It has two input parameters String and long. The problem is that when this finder method is called exception is thrown saying for problem converting to long. Here is snippet of the exception that bothers me:

      org.firebirdsql.jdbc.field.TypeConvertionException: Error converting to long. 1107349695875
      at org.firebirdsql.jdbc.field.FBIntegerField.setLong(FBIntegerField.java
      :157)
      at org.firebirdsql.jdbc.field.FBField.setObject(FBField.java:727)
      at org.firebirdsql.jdbc.AbstractPreparedStatement.setObject(AbstractPrep
      aredStatement.java:218)

      As you see it seems to be some problem with setLong method.

      Here is snippet of my conf\standardjbosscmp-jdbc.xml configuration file that maps Long to jdbc type BIGINT ant to Firebird specific NUMERIC(18,0)


      <java-type>java.lang.Long</java-type>
      <jdbc-type>BIGINT</jdbc-type>
      <sql-type>NUMERIC(18,0) default 0</sql-type>


      I am wondering is it some jboss mapping problem or jaybird driver problem?


      If anyone could help I will be thankful.