-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Persist BINARY_DOUBLE
PostPosted: Tue Sep 09, 2014 5:25 pm 
Newbie

Joined: Tue Sep 09, 2014 5:13 pm
Posts: 1
Hi there,

I have been struggling with this for the day, and I wonder if I can get some help. Thanks very much in advance!

I have a table with a BINARY_DOUBLE column on an Oracle 11g. In my Java POJO, the corresponding field has java.lang.Double type. When I try to persist Double.NaN using Hibernate, I got the following error:

09 Sep 2014 16:36:58,687 WARN SqlExceptionHelper []: SQL Error: 17001, SQLState: 99999
09 Sep 2014 16:36:58,687 ERROR SqlExceptionHelper []: Internal Error: Overflow Exception trying to bind NaN

I am using Hibernate Commons Annotations {4.0.4.Final}, Hibernate Validator 4.3.1.Final.

The same operation works if I use OraclePreparedStatement in JDBC:

String sql2 = "insert into TEST2 values(13, 'JDBC NaN Double', ?)";
OraclePreparedStatement preparedStmt = (OraclePreparedStatement) conn.prepareStatement(sql2);
preparedStmt.setBinaryDouble(1, Double.NaN);
preparedStmt.executeUpdate();

I apologize if this question had been asked and answered many times before. Thanks in advance for any hint.

Puze Yang


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.