Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
10.1.2.1
-
None
-
OS/390 (zOS) with ibm 142 jvm ('classic' - 32 bit)
Description
On zOS, the tests callable.java and parameterMapping.java failed with networkserver and the derby client. The failure did not occur with the db2jcc.jar.
The stack trace was as follows:
org.apache.derby.client.am.SqlException:
^V^V^30^30^D^F^53^F^31^38^31 :
at
org.apache.derby.client.am.Statement.completeExecute(Statement.java:1139)
at
org.apache.derby.client.net.NetStatementReply.parseEXCSQLSTTreply(NetStatementReply.java:296)
at
org.apache.derby.client.net.NetStatementReply.readExecuteCall(NetStatementReply.java:97)
at
org.apache.derby.client.net.StatementReply.readExecuteCall(StatementReply.java:74)
at
org.apache.derby.client.net.NetStatement.readExecuteCall_(NetStatement.java:174)
at
org.apache.derby.client.am.Statement.readExecuteCall(Statement.java:1105)
at
org.apache.derby.client.am.PreparedStatement.flowExecute(PreparedStatement.java:1426)
at
org.apache.derby.client.am.CallableStatement.executeX(CallableStatement.java:124)
at
org.apache.derby.client.am.CallableStatement.execute(CallableStatement.java:114)
at
org.apache.derbyTesting.functionTests.tests.derbynet.callable.main(Unknown Source)
In callable.java, it's this part of the test that caused the failure:
------------------------------------------
System.out.println("return value is: " + cs.getInt(1));
cs.close();
// stmt.execute("DROP FUNCTION method4");
// different parameter types, also method overload
stmt.execute("CREATE PROCEDURE method4P(" +
"IN P1 SMALLINT, IN P2 INT, IN P3 BIGINT, IN P4 REAL, " +
"IN P5 DOUBLE, IN P6 DECIMAL(6,3), IN P7 DATE, IN P8 TIME, IN P9 TIMESTAMP, IN P10 VARCHAR(20) FOR BIT DATA, " +
"OUT O1 SMALLINT, OUT O2 INT, OUT O3 BIGINT, OUT O4 REAL, " +
"OUT O5 DOUBLE, OUT O6 DECIMAL(6,3), OUT O7 DATE, OUT O8 TIME, OUT O9 TIMESTAMP, OUT O10 VARCHAR(20) FOR BIT DATA" +
") " +
"EXTERNAL NAME 'org.apache.derbyTesting.functionTests.tests.derbynet.callable.method4'" +
" NO SQL LANGUAGE JAVA PARAMETER STYLE JAVA");
cs = conn.prepareCall("call method4P(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
cs.setShort(1, (short) 3);
cs.setInt(2, 4);
cs.setLong(3, 5);
cs.setFloat(4, (float) 6.0);
cs.setDouble(5, 7.0);
cs.setBigDecimal(6, new BigDecimal("88.88"));
cs.setDate(7, Date.valueOf("2002-05-12"));
cs.setTime(8, Time.valueOf("10:05:02"));
cs.setTimestamp(9, Timestamp.valueOf("2002-05-12 10:05:02.000000000"));
byte[] ba = new byte[2];
ba[0] = 1;
ba[1] = 2;
cs.setBytes(10, ba);
int n = 10;
cs.registerOutParameter (n+1, java.sql.Types.SMALLINT);
cs.registerOutParameter (n+2, java.sql.Types.INTEGER);
cs.registerOutParameter (n+3, java.sql.Types.BIGINT);
cs.registerOutParameter (n+4, java.sql.Types.REAL);
cs.registerOutParameter (n+5, java.sql.Types.DOUBLE);
cs.registerOutParameter (n+6, java.sql.Types.DECIMAL);
cs.registerOutParameter (n+7, java.sql.Types.DATE);
cs.registerOutParameter (n+8, java.sql.Types.TIME);
cs.registerOutParameter (n+9, java.sql.Types.TIMESTAMP);
cs.registerOutParameter (n+10, java.sql.Types.VARBINARY);
cs.execute();
------------------
I found in derby.log a reference to error 22007, (.S.181) - i.e. syntax error on parameter 3 of SYSIBM.SQLCAMESSAGE (yes, this is from last year):
-------------------------------
2005-09-10 01:56:17.009 GMT Thread[DRDAConnThread_2,5,main]
(XID = 110), (SESSIONID = 0), (DATABASE = wombat), (DRDAID = NF000001.G7C1-4327676640608975420
End compiling prepared statement: call method4P(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) :End prepared statement
2005-09-10 01:56:17.311 GMT Thread[DRDAConnThread_2,5,main]
(XID = 110), (SESSIONID = 0), (DATABASE = wombat), (DRDAID = NF000001.G7C1-4327676640608975420{2}
),
Begin compiling prepared statement: call
SYSIBM.SQLCAMESSAGE(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) :End prepared statement
2005-09-10 01:56:17.429 GMT Thread[DRDAConnThread_2,5,main]
(XID = 110), (SESSIONID = 0), (DATABASE = wombat), (DRDAID =
NF000001.G7C1-4327676640608975420
End compiling prepared statement: call SYSIBM.SQLCAMESSAGE(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) :End prepared statement
2005-09-10 01:56:17.831 GMT Thread[DRDAConnThread_2,5,main]
(XID = 110), (SESSIONID = 0), (DATABASE = wombat), (DRDAID =
NF000001.G7C1-4327676640608975420{2}
),
Executing prepared statement: call SYSIBM.SQLCAMESSAGE(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) :End prepared statement with 16 parameters begin
parameter #1: -1 :end p
arameter begin parameter #2: 11 :end parameter begin parameter
#3: ^V^V^30^30^D^
F^53^F^31^38^31 :end parameter begin parameter #4:
^43^53^53^31^30^30^31^31 :end
parameter begin parameter #5: 0 :end parameter begin parameter
#6: 0 :end param
eter begin parameter #7: 0 :end parameter begin parameter #8: 0
:end parameter begin parameter #9: 0 :end parameter begin parameter #10: 0 :end
parameter begin
parameter #11: ^20^20^20^20^20^20^20^20^20^20^20 :end parameter
begin parameter
#12: ^V^V^30^30^D :end parameter begin parameter #13: null :end
parameter begin
parameter #14: en :end parameter begin parameter #15: null :end
parameter begin
----------------------
Attachments
Attachments
Issue Links
- duplicates
-
DERBY-1226 test resultset.java fails with 10.2 derby client with zOS
- Closed