[jira] [Commented] (DERBY-7160) Why do we see test failure/regression cause ERROR 22003: The resulting value is outside the range for the data type DECIMAL/NUMERIC(30,15)

2024-03-18 Thread Richard N. Hillegas (Jira)


[ 
https://issues.apache.org/jira/browse/DERBY-7160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17828124#comment-17828124
 ] 

Richard N. Hillegas commented on DERBY-7160:


I don't know of any changes to Derby which would be responsible for this 
result. It is hard to make much headway on narrowing down the problem until we 
know what the suspect Float value is.

The variable naming in callStmtClient16.testSetObject177() suggests that the 
procedure might be trying to stuff a Float.MAX_VALUE into an input procedure 
argument of type DECIMAL(30,15).

I am attaching a program (DERBY_7160) which runs that experiment. I compiled 
the program with JDK 11. Since Float.MAX_VALUE is outside the range of 
DECIMAL(30,15), the program fails with the following error:

{noformat}
Exception in thread "main" java.sql.SQLDataException: The resulting value is 
outside the range for the data type DECIMAL/NUMERIC(30,15).
at 
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:84)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:230)
at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:431)
at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:360)
at 
org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2405)
at 
org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:88)
at 
org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1436)
at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java:1709)
at 
org.apache.derby.impl.jdbc.EmbedCallableStatement.executeStatement(EmbedCallableStatement.java:134)
at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(EmbedPreparedStatement.java:1394)
at DERBY_7160.main(DERBY_7160.java:23)
Caused by: ERROR 22003: The resulting value is outside the range for the data 
type DECIMAL/NUMERIC(30,15).
at 
org.apache.derby.shared.common.error.StandardException.newException(StandardException.java:300)
at 
org.apache.derby.shared.common.error.StandardException.newException(StandardException.java:295)
at org.apache.derby.iapi.types.SQLDecimal.setWidth(SQLDecimal.java:991)
at 
org.apache.derby.exe.ac3ea3c0fbx018ex53bfx4594x075b77200.g0(Unknown Source)
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at 
org.apache.derby.impl.services.reflect.ReflectMethod.invoke(ReflectMethod.java:46)
at 
org.apache.derby.impl.sql.execute.CallStatementResultSet.open(CallStatementResultSet.java:75)
at 
org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:472)
at 
org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:351)
at 
org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1344)
... 4 more
{noformat}

The experiment fails on the following platforms:

{noformat}

  JDKDERBY

  11 10.15.2.0
  17 10.15.2.0
  21 10.15.2.0
  21 10.17.1.0
{noformat}


> Why do we see test failure/regression cause ERROR 22003: The resulting value 
> is outside the range for the data type DECIMAL/NUMERIC(30,15)
> --
>
> Key: DERBY-7160
> URL: https://issues.apache.org/jira/browse/DERBY-7160
> Project: Derby
>  Issue Type: Bug
>Affects Versions: 10.17.1.0
>Reporter: Scott Marlow
>Priority: Major
> Fix For: 10.17.1.1
>
> Attachments: DERBY_7160.java
>
>
> This may be a regression or maybe a design change, not sure of which as the 
> same tests pass for us on Java SE 11/17 with 
> https://dlcdn.apache.org//db/derby/db-derby-10.15.2.0/db-derby-10.15.2.0-bin.zip.
> We are seeing a JDBC TCK test failure (Jakarta EE 10 TCK) when testing 
> against [https://db.apache.org/derby/releases/release-10_17_1_0.cgi] on java 
> 21 with the external project [https://github.com/wildfly/wildfly] that I 
> contribute to.
> I marked this issue as a bug but I really have no idea where the bug is.  The 
> JDBC test that is failing is 
> 

[jira] [Updated] (DERBY-7160) Why do we see test failure/regression cause ERROR 22003: The resulting value is outside the range for the data type DECIMAL/NUMERIC(30,15)

2024-03-18 Thread Richard N. Hillegas (Jira)


 [ 
https://issues.apache.org/jira/browse/DERBY-7160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Richard N. Hillegas updated DERBY-7160:
---
Attachment: DERBY_7160.java

> Why do we see test failure/regression cause ERROR 22003: The resulting value 
> is outside the range for the data type DECIMAL/NUMERIC(30,15)
> --
>
> Key: DERBY-7160
> URL: https://issues.apache.org/jira/browse/DERBY-7160
> Project: Derby
>  Issue Type: Bug
>Affects Versions: 10.17.1.0
>Reporter: Scott Marlow
>Priority: Major
> Fix For: 10.17.1.1
>
> Attachments: DERBY_7160.java
>
>
> This may be a regression or maybe a design change, not sure of which as the 
> same tests pass for us on Java SE 11/17 with 
> https://dlcdn.apache.org//db/derby/db-derby-10.15.2.0/db-derby-10.15.2.0-bin.zip.
> We are seeing a JDBC TCK test failure (Jakarta EE 10 TCK) when testing 
> against [https://db.apache.org/derby/releases/release-10_17_1_0.cgi] on java 
> 21 with the external project [https://github.com/wildfly/wildfly] that I 
> contribute to.
> I marked this issue as a bug but I really have no idea where the bug is.  The 
> JDBC test that is failing is 
> [https://github.com/jakartaee/platform-tck/blob/10.0.x/src/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmtClient16.java#L968]
>  when run on Java 21 with 10.17.1.0.
> The failure is:
> {quote}
> Caused by: ERROR 22003: The resulting value is outside the range for the data 
> type DECIMAL/NUMERIC(30,15).
> \u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
> org.apache.derby.client//org.apache.derby.client.am.ClientStatement.completeExecute(ClientStatement.java:1868)
> \u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
> org.apache.derby.client//org.apache.derby.client.net.NetStatementReply.parseEXCSQLSTTreply(NetStatementReply.java:323)
> \u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
> org.apache.derby.client//org.apache.derby.client.net.NetStatementReply.readExecuteCall(NetStatementReply.java:107)
> \u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
> org.apache.derby.client//org.apache.derby.client.net.StatementReply.readExecuteCall(StatementReply.java:84)
> \u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
> org.apache.derby.client//org.apache.derby.client.net.NetStatement.readExecuteCall_(NetStatement.java:193)
> \u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
> org.apache.derby.client//org.apache.derby.client.am.ClientStatement.readExecuteCall(ClientStatement.java:1831)
> \u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
> org.apache.derby.client//org.apache.derby.client.am.ClientPreparedStatement.flowExecute(ClientPreparedStatement.java:2180)
> \u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
> org.apache.derby.client//org.apache.derby.client.am.ClientPreparedStatement.executeUpdateX(ClientPreparedStatement.java:410)
> \u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
> org.apache.derby.client//org.apache.derby.client.am.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:396)
> \u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) ... 16 more
> {quote}
>  
> The called stored procedure source is at 
> https://github.com/jakartaee/platform-tck/blob/10.0.x/sql/derby/derby.ddl.sprocs.sql#L224
>  which contains:
> {quote}
> create procedure Decimal_In_Max (in MAX_PARAM DECIMAL(30,15)) language java 
> external name 'com.sun.ts.lib.tests.jdbc.CS_Procs.Decimal_In_Max' parameter 
> style java;
> {quote}
> The referenced com.sun.ts.lib.tests.jdbc.CS_Procs.Decimal_In_Max contains:
> {code}
> Connection con = DriverManager.getConnection("jdbc:default:connection");
> PreparedStatement ps = con
> .prepareStatement("update Decimal_Tab set MAX_VAL=?");
> ps.setBigDecimal(1, max_param);
> ps.executeUpdate();
> ps.close();
> ps = null;
> con.close();
> con = null;
>   }
> {code}
> More details are being added soon ...



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (DERBY-7160) Why do we see test failure/regression cause ERROR 22003: The resulting value is outside the range for the data type DECIMAL/NUMERIC(30,15)

2024-03-18 Thread Scott Marlow (Jira)


 [ 
https://issues.apache.org/jira/browse/DERBY-7160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Scott Marlow updated DERBY-7160:

Description: 
This may be a regression or maybe a design change, not sure of which as the 
same tests pass for us on Java SE 11/17 with 
https://dlcdn.apache.org//db/derby/db-derby-10.15.2.0/db-derby-10.15.2.0-bin.zip.

We are seeing a JDBC TCK test failure (Jakarta EE 10 TCK) when testing against 
[https://db.apache.org/derby/releases/release-10_17_1_0.cgi] on java 21 with 
the external project [https://github.com/wildfly/wildfly] that I contribute to.

I marked this issue as a bug but I really have no idea where the bug is.  The 
JDBC test that is failing is 
[https://github.com/jakartaee/platform-tck/blob/10.0.x/src/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmtClient16.java#L968]
 when run on Java 21 with 10.17.1.0.

The failure is:

{quote}

Caused by: ERROR 22003: The resulting value is outside the range for the data 
type DECIMAL/NUMERIC(30,15).
\u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
org.apache.derby.client//org.apache.derby.client.am.ClientStatement.completeExecute(ClientStatement.java:1868)
\u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
org.apache.derby.client//org.apache.derby.client.net.NetStatementReply.parseEXCSQLSTTreply(NetStatementReply.java:323)
\u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
org.apache.derby.client//org.apache.derby.client.net.NetStatementReply.readExecuteCall(NetStatementReply.java:107)
\u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
org.apache.derby.client//org.apache.derby.client.net.StatementReply.readExecuteCall(StatementReply.java:84)
\u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
org.apache.derby.client//org.apache.derby.client.net.NetStatement.readExecuteCall_(NetStatement.java:193)
\u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
org.apache.derby.client//org.apache.derby.client.am.ClientStatement.readExecuteCall(ClientStatement.java:1831)
\u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
org.apache.derby.client//org.apache.derby.client.am.ClientPreparedStatement.flowExecute(ClientPreparedStatement.java:2180)
\u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
org.apache.derby.client//org.apache.derby.client.am.ClientPreparedStatement.executeUpdateX(ClientPreparedStatement.java:410)
\u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
org.apache.derby.client//org.apache.derby.client.am.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:396)
\u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) ... 16 more

{quote}

 

The called stored procedure source is at 
https://github.com/jakartaee/platform-tck/blob/10.0.x/sql/derby/derby.ddl.sprocs.sql#L224
 which contains:

{quote}
create procedure Decimal_In_Max (in MAX_PARAM DECIMAL(30,15)) language java 
external name 'com.sun.ts.lib.tests.jdbc.CS_Procs.Decimal_In_Max' parameter 
style java;
{quote}

The referenced com.sun.ts.lib.tests.jdbc.CS_Procs.Decimal_In_Max contains:
{code}

Connection con = DriverManager.getConnection("jdbc:default:connection");
PreparedStatement ps = con
.prepareStatement("update Decimal_Tab set MAX_VAL=?");

ps.setBigDecimal(1, max_param);
ps.executeUpdate();

ps.close();
ps = null;
con.close();
con = null;
  }
{code}

More details are being added soon ...

  was:
We are seeing a JDBC TCK test failure (Jakarta EE 10 TCK) when testing against 
[https://db.apache.org/derby/releases/release-10_17_1_0.cgi] on java 21 with 
the external project [https://github.com/wildfly/wildfly] that I contribute to.

I marked this issue as a bug but I really have no idea where the bug is.  The 
JDBC test that is failing is 
[https://github.com/jakartaee/platform-tck/blob/10.0.x/src/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmtClient16.java#L968]
 when run on Java 21 with 10.17.1.0.

The failure is:

{quote}

Caused by: ERROR 22003: The resulting value is outside the range for the data 
type DECIMAL/NUMERIC(30,15).
\u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
org.apache.derby.client//org.apache.derby.client.am.ClientStatement.completeExecute(ClientStatement.java:1868)
\u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
org.apache.derby.client//org.apache.derby.client.net.NetStatementReply.parseEXCSQLSTTreply(NetStatementReply.java:323)
\u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
org.apache.derby.client//org.apache.derby.client.net.NetStatementReply.readExecuteCall(NetStatementReply.java:107)
\u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
org.apache.derby.client//org.apache.derby.client.net.StatementReply.readExecuteCall(StatementReply.java:84)
\u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 

[jira] [Created] (DERBY-7160) Why do we see test failure/regression cause ERROR 22003: The resulting value is outside the range for the data type DECIMAL/NUMERIC(30,15)

2024-03-18 Thread Scott Marlow (Jira)
Scott Marlow created DERBY-7160:
---

 Summary: Why do we see test failure/regression cause ERROR 22003: 
The resulting value is outside the range for the data type 
DECIMAL/NUMERIC(30,15)
 Key: DERBY-7160
 URL: https://issues.apache.org/jira/browse/DERBY-7160
 Project: Derby
  Issue Type: Bug
Affects Versions: 10.17.1.0
Reporter: Scott Marlow
 Fix For: 10.17.1.1


We are seeing a JDBC TCK test failure (Jakarta EE 10 TCK) when testing against 
[https://db.apache.org/derby/releases/release-10_17_1_0.cgi] on java 21 with 
the external project [https://github.com/wildfly/wildfly] that I contribute to.

I marked this issue as a bug but I really have no idea where the bug is.  The 
JDBC test that is failing is 
[https://github.com/jakartaee/platform-tck/blob/10.0.x/src/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmtClient16.java#L968]
 when run on Java 21 with 10.17.1.0.

The failure is:

{quote}

Caused by: ERROR 22003: The resulting value is outside the range for the data 
type DECIMAL/NUMERIC(30,15).
\u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
org.apache.derby.client//org.apache.derby.client.am.ClientStatement.completeExecute(ClientStatement.java:1868)
\u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
org.apache.derby.client//org.apache.derby.client.net.NetStatementReply.parseEXCSQLSTTreply(NetStatementReply.java:323)
\u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
org.apache.derby.client//org.apache.derby.client.net.NetStatementReply.readExecuteCall(NetStatementReply.java:107)
\u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
org.apache.derby.client//org.apache.derby.client.net.StatementReply.readExecuteCall(StatementReply.java:84)
\u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
org.apache.derby.client//org.apache.derby.client.net.NetStatement.readExecuteCall_(NetStatement.java:193)
\u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
org.apache.derby.client//org.apache.derby.client.am.ClientStatement.readExecuteCall(ClientStatement.java:1831)
\u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
org.apache.derby.client//org.apache.derby.client.am.ClientPreparedStatement.flowExecute(ClientPreparedStatement.java:2180)
\u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
org.apache.derby.client//org.apache.derby.client.am.ClientPreparedStatement.executeUpdateX(ClientPreparedStatement.java:410)
\u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at 
org.apache.derby.client//org.apache.derby.client.am.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:396)
\u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) ... 16 more

{quote}

 

The called stored procedure source is at 
https://github.com/jakartaee/platform-tck/blob/10.0.x/sql/derby/derby.ddl.sprocs.sql#L224
 which contains:

{quote}
create procedure Decimal_In_Max (in MAX_PARAM DECIMAL(30,15)) language java 
external name 'com.sun.ts.lib.tests.jdbc.CS_Procs.Decimal_In_Max' parameter 
style java;
{quote}

The referenced Java code contains:
{code}

Connection con = DriverManager.getConnection("jdbc:default:connection");
PreparedStatement ps = con
.prepareStatement("update Decimal_Tab set MAX_VAL=?");

ps.setBigDecimal(1, max_param);
ps.executeUpdate();

ps.close();
ps = null;
con.close();
con = null;
  }
{code}

This may be a regression or maybe a design change, not sure of which.

More details are being added soon ...



--
This message was sent by Atlassian Jira
(v8.20.10#820010)