Subject | Re: Error converting to Long |
---|---|
Author | jivkoto |
Post date | 2005-02-02T15:15Z |
David, first, I would like to thank you for the interest of my problem.
DATA_TYPE 2
TYPE_NAME NUMERIC
COLUMN_SIZE 18
BUFFER_LENGTH 0
etc
As you see from the trace it is using FBIntegerField and because the
value is bigger then MAX_INT_VALUE it is throwing exception. I guess i
have to keep debugging :) (why smilling i should be angry face).
10x
I am open for suggestion
--- In Firebird-Java@yahoogroups.com, David Jencks <david_jencks@y...>
wrote:
DATA_TYPE 2
TYPE_NAME NUMERIC
COLUMN_SIZE 18
BUFFER_LENGTH 0
etc
As you see from the trace it is using FBIntegerField and because the
value is bigger then MAX_INT_VALUE it is throwing exception. I guess i
have to keep debugging :) (why smilling i should be angry face).
10x
I am open for suggestion
--- In Firebird-Java@yahoogroups.com, David Jencks <david_jencks@y...>
wrote:
> This is kind of a guess...String and
>
> What is the actual sql type of the database column? It it's an integer
> less than 18 digits I'd guess the problem is in jboss's mapping code.
> If it's really NUMERIC(18,0) it looks like jaybird has erroneously used
> an FBIntegerField.
>
> thanks
> david jencks
>
> On Feb 2, 2005, at 5:17 AM, jivkoto wrote:
>
> >
> >
> > 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
> > 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.setO
> > bject(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)
> >
> > <mapping>
> > <java-type>java.lang.Long</java-type>
> > <jdbc-type>BIGINT</jdbc-type>
> > <sql-type>NUMERIC(18,0) default 0</sql-type>
> > </mapping>
> >
> > I am wondering is it some jboss mapping problem or jaybird driver
> > problem?
> >
> >
> > If anyone could help I will be thankful.
> >
> >
> >
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> > To visit your group on the web, go to:
> > http://groups.yahoo.com/group/Firebird-Java/
> >
> > To unsubscribe from this group, send an email to:
> > Firebird-Java-unsubscribe@yahoogroups.com
> >
> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> > Service.
> >
> >