Internal Error Overflow Exception Trying To Bind Nan
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Overflow while trying to bind NaN up vote 0 down vote favorite My Table schema is: desc TRNX_TXN_MAP_VALUES Name Null Type ------------------- -------- --------------- BASE_TRANSACTION_ID NOT NULL NUMBER(19) MAP_TYPE NOT NULL VARCHAR2(2) ENUM_TYPE NOT NULL VARCHAR2(30) DECIMALVALUE NUMBER(12,2) STRINGVALUE VARCHAR2(100) LONGVALUE NUMBER(19) BOOLEANVALUE NUMBER(1) DOUBLEVALUE NUMBER(38,2) CURRENCYCODE VARCHAR2(20) AMOUNT NUMBER(18,2) DOUBLEARRAY DOUBLE_VARRAY() While storing certain values I am getting following exception: It seems that some values have a very large precision and the column it gets mapped to does support it. Is this possible? I am using Oracle 11g as my Database and Spring JdbcTemple to persist things. TRACE StatementCreatorUtils - Setting SQL statement parameter value: column index 1, parameter value [1264684185], value class [java.lang.Long], SQL type -5 TRACE StatementCreatorUtils - Setting SQL statement parameter value: column index 2, parameter value [P], value class [java.lang.String], SQL type 12 TRACE StatementCreatorUtils - Setting SQL statement parameter value: column index 3, parameter value [MTM], value class [java.lang.String], SQL type 12 TRACE StatementCreatorUtils - Setting SQL statement parameter value: column index 4, parameter value [null], value class [null], SQL type 3 TRACE StatementCreatorUtils - Setting SQL statement parameter value: column index 5, parameter value [null], value class [null], SQL type 12 TRACE StatementCreatorUtils - Setting SQL statement parameter value: column index 6, parameter value [null], value class [null], SQL type -5 TRACE StatementCreatorUtils - Setting SQL statement parameter value: column index 7, parameter value [null], value class [null], SQL type 4 TRACE StatementCreatorUtils - Setting SQL statement parameter value: column index 8, parameter value [null], value class [null], SQL type 8 TRACE StatementCreatorUtils - Setting SQL statement parameter value: column index 9, parameter value [USD], value class [java.lang.String], SQL type 12 TRACE StatementCreatorUtils - Setting SQL statement par
Speaker BureauLog inRegisterSearchSearchCancelError: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly without it enabled. Please turn JavaScript back on and reload this page. Please enter a title. You can not post a blank message. Please type your message and try again. More discussions in Java Database Connectivity (JDBC) All PlacesJavaDatabase ConnectivityJava Database Connectivity (JDBC) This discussion is archived 2 Replies Latest reply on Jan 3, 2007 12:50 AM by Kmensah-Oracle Underflow Exception when trying to bind small double http://stackoverflow.com/questions/26070724/overflow-while-trying-to-bind-nan to BINARY_DOUBLE 529693 Dec 30, 2006 4:28 PM I get exception when trying to insert small double value (1.0E-131) into BINARY_DOUBLE column via jdbc. The exception I get: Exception in thread "main" java.sql.SQLException: Underflow Exception trying to bind 1.0000000000000001E-131 at oracle.jdbc.driver.DoubleBinder.bind(OraclePreparedStatement.java:13856) at oracle.jdbc.driver.OraclePreparedStatement.setupBindBuffers(OraclePreparedStatement.java:2866) at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:2151) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3280) at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3390) at dbAccess.main(dbAccess.java:18) According to oracle documentation the https://community.oracle.com/thread/460586 smallest positive number the BINARY_DOUBLE column can store is 2.22507485850720E-308. I'm using oracle 10g r2 and thin jdbc driver. Any ideas? 5633Views Tags: none (add) This content has been marked as final. Show 2 replies 1. Re: Underflow Exception when trying to bind small double to BINARY_DOUBLE Ashok Shivarudraiah Jan 3, 2007 12:46 AM (in response to 529693) That is expected since a double is converted to a Oracle NUMBER before passing it to the database and Oracle NUMBER does not support 1.0e-131, the range is 1E-130 .. 10E125. Look at the SQL output below, SQL> select to_char(to_number(1.0e-131)) from dual; T - 0 SQL> select to_char(to_number(1.0e-130)) from dual; TO_CHAR(TO_NUMBER(1.0E-130)) ---------------------------------------- 1.000000000000000000000000000000000E-130 == Use oracle.sql.BINARY_DOUBLE for numbers like this. eg: preparedStatement.setBINARY_DOUBLE(1, new oracle.sql.BINARY_DOUBLE(1.0e-131)); == hope this helps. Ashok Like Show 0 Likes(0) Actions 2. Re: Underflow Exception when trying to bind small double to BINARY_DOUBLE Kmensah-Oracle Jan 3, 2007 12:50 AM (in response to 529693) Which setXXX API have you used? setDouble? Rather use OraclePreparedStatement.set
OverrideLog In ExportXMLWordPrintable Details Type: Bug Status: Closed Priority: Major Resolution: Fixed Affects Version/s: 2.0.1 Fix Version/s: https://jira.sakaiproject.org/browse/SAK-2690 2.1.0 Component/s: Gradebook Labels: None Environment: Fedora Core 4 https://forum.hibernate.org/viewtopic.php?p=2480944 Linux, JDK 1.4.2_09, tomcat 5.5.9, Oracle 9i/10g Description I am getting overflow exceptions when trying to remove an already existing grade from the Grade Override box in the gradebook. I am able to delete assignments internal error without any problems, this exception occurs when trying to delete an existing grade value from the Grade Override box. I am getting this exception only when deleteing the Grade Override for certain courses but not for others. I have enclosed a copy of the internal error overflow error logs conatining the exception. There is no difference w.r.t the courses for which I am able to delete the Grade Overrides versus those for which this problem occurs. Both sets of courses had assignments that were successfully deleted and then Grade Overrides were applied using the Override feature available. In some courses we were able to modify the entered grade override values but othere gave a Nan overflow exception upon doing the same. ERROR MESSAGE ********************************* ERROR: Overflow Exception trying to bind NaN (2005-11-03 16:43:00,374 http-8080-Processor22_net.sf.hibernate.util.JDBCExceptionReporter) ERROR: Could not synchronize database state with session (2005-11-03 16:43:00,374 http-8080-Processor22_net.sf.hibernate.impl.SessionImpl) ERROR: Exception while invoking expression # {courseGradeDetailsBean.processUpdateGrades} (2005-11-03 16:43:00,396 http-8080-Processor22_org.apache.myfaces.el.MethodBindingImpl) org.springframework.jdbc.UncategorizedSQLException: (HibernateTemplate): encountered SQLException [Overflow Exception trying to bind NaN]; nested exception is java.sql.SQLException: Overflow Exception trying to bind NaN java.sql.SQLException: Overflo
| Next topic Author Message puzeyang Post subject: Persist BINARY_DOUBLEPosted: Tue Sep 09, 2014 5:25 pm Newbie Joined: Tue Sep 09, 2014 5:13 pmPosts: 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: 9999909 Sep 2014 16:36:58,687 ERROR SqlExceptionHelper []: Internal Error: Overflow Exception trying to bind NaNI 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 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 yearSort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] Board index » Hibernate & Java Persistence » Hibernate Users All times are UTC - 5 hours [ DST ] You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou 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.