Internal Error Underflow Exception Trying To Bind
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 when trying to bind double.max_value in Oracle up vote 1 down vote favorite I am trying to get our Hibernate app running on Oracle 11g, but we keep getting the following error when trying to persist a double.max_value: Caused by: java.sql.SQLException: Internal Error: Overflow Exception trying to bind 1.7976931348623157E308 at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70) at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:199) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:263) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:271) at oracle.jdbc.driver.DoubleBinder.bind(OraclePreparedStatement.java:15676) at oracle.jdbc.driver.OraclePreparedStatement.setupBindBuffers(OraclePreparedStatement.java:2948) at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:2202) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3382) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3468) at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWra
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, http://stackoverflow.com/questions/13145288/overflow-when-trying-to-bind-double-max-value-in-oracle 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) http://stackoverflow.com/questions/26070724/overflow-while-trying-to-bind-nan 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
Printing -XML -Clone This Bug -Last Comment First Last Prev Next This bug is not in your last search results. https://bugzilla.redhat.com/show_bug.cgi?id=574045 Bug574045 - numeric overflow preventing data compression Summary: numeric overflow preventing data compression Status: CLOSED CURRENTRELEASE Aliases: None Product: RHQ Project Classification: Other Component: Database (Show other bugs) Sub Component: http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/ --- Version: 1.3.1 Hardware: All Linux Priority high Severity high (vote) TargetMilestone: --- TargetRelease: --- Assigned To: Joseph Marques QA Contact: Heiko W. Rupp Docs Contact: URL: Whiteboard: Keywords: Depends internal error On: Blocks: 574133 jon-sprint11-bugs Show dependency tree /graph Reported: 2010-03-16 09:28 EDT by Simeon Pinder Modified: 2010-10-23 10:47 EDT (History) CC List: 1 user (show) jmarques See Also: Fixed In Version: 2.4 Doc Type: Bug Fix Doc Text: Story Points: --- Clone Of: Environment: Last Closed: 2010-08-12 12:55:00 EDT Type: --- Regression: --- Mount Type: --- Documentation: --- CRM: internal error underflow Verified Versions: Category: --- oVirt Team: --- RHEL 7.3 requirements from Atomic Host: Cloudforms Team: --- Attachments (Terms of Use) Add an attachment (proposed patch, testcase, etc.) Groups: None (edit) Description Simeon Pinder 2010-03-16 09:28:27 EDT Description of problem: Problematic metric values prevent data compression. Actual Value: Diskc Queue: Min .049, max .0491, last = infinity and using TO_CHAR and the default format yields '~' as the value. > using TO_CHAR(value, '99999999999.....999') just yields ###.....##### as the value. Resulting Exception: 2010-03-11 16:00:00,567 INFO [org.rhq.enterprise.server.measurement.Measurement CompressionManagerBean] Begin compression from [RHQ_MEAS_DATA_NUM_R04] to [RHQ_M EASUREMENT_DATA_NUM_1H] 2010-03-11 16:00:00,568 INFO [org.rhq.enterprise.server.measurement.Measurement CompressionManagerBean] Begin compressing data from table [RHQ_MEAS_DATA_NUM_R04 ] to table [RHQ_MEASUREMENT_DATA_NUM_1H] between [3/11/10 3:00:00 PM] and [3/11/ 10 4:00:00 PM] 2010-03-11 16:00:04,275 ERROR [org.rhq.enterprise.server.measurement.Measurement CompressionManagerBean] Unable to compress data from [RHQ_MEAS_DATA_NUM_R04] to [RHQ_MEASUREMENT_DATA_NUM_1H] at 3/11/10 3:00:00 PM: java.sql.SQLException:ORA-0 1426: numeric overflow [SQLException=ORA-01426: numeric overflow ] 2010-03-11 16:00:04,275 INFO [org.rhq.enterprise.server.measurement.Measurement CompressionManagerBean] Finished compression from [RHQ_MEAS_DATA_NUM_R04] to [RH Q_MEASUREMENT_DATA_NUM_1H], [0] compressed rows Version-Release number of selected component (if applicable): 1.3.1 How reproducible: Every time. Steps to Reproduce: 1. 2. 3. Actual results: Exceptions. Expected res
Preißer made an interesting discovery, after reading my article “PHP Hangs On Numeric Value 2.2250738585072011e-308”: Java -- both its runtime and compiler -- go into an infinite loop when converting the decimal number 2.2250738585072012e-308 to double-precision binary floating-point. This number is supposed to convert to 0x1p-1022, which is DBL_MIN; instead, Java gets stuck, oscillating between 0x1p-1022 and 0x0.fffffffffffffp-1022, the largest subnormal double-precision floating-point number. Send a Java Program Into An Infinite Loop Compile this program and run it; the program will hang (at least it does on a 32-bit system with the latest JRE/JDK): class runhang { public static void main(String[] args) { System.out.println("Test:"); double d = Double.parseDouble("2.2250738585072012e-308"); System.out.println("Value: " + d); } } Send the Java Compiler Into An Infinite Loop Try to compile this program; the compiler will hang: class compilehang { public static void main(String[] args) { double d = 2.2250738585072012e-308; System.out.println("Value: " + d); } } Where's the Problem? For the runtime case at least, Konstantin has narrowed the problem down to the “correction loop” in FloatingDecimal.java. See his comments on my PHP bug analysis article. Like PHP, Java gets stuck crossing the normalized/unnormalized border, but in the opposite direction: it starts with an estimate just below DBL_MIN -- 0x0.fffffffffffffp-1022 -- and is trying to get up to DBL_MIN. but with a twist: it starts with an estimate that is correct -- DBL_MIN -- and then adjusts it to 0x0.fffffffffffffp-1022. It then adjusts that back to DBL_MIN, and around it goes… Bug Report Konstantin reported this problem to Oracle three weeks ago, but is still waiting for a reply. (Update: as per Konstantin's comment below, the bug has been assigned “internal review ID of 1949967, which is NOT visible on the Sun Developer Network (SDN)”.) Update: Previous Bug Reports Describe the Same Problem Readers found two bug reports that describe the same problem (although not in terms of the magic number 2.2250738585072012e-308): bug number 100119 from 2009, and bug number 4421494 from 2001. (But don't bother clicking on that last one -- the link is now dead, as of 2/3/11.) Addendum As pointed out in the comments below, equivalent forms of the number cause the problem as well; examples: 0.0002225073