SPJ w result set failed with ERROR[11220], SQLCODE of -29261, SQLSTATE of HY000

Bug #1355042 reported by Chong Hsu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Trafodion
New
High
Weiqing Xu

Bug Description

Tested with Trafodion build, 20140801-0830.

Calling a SPJ that calls another SPJ with result set:

   public static void RS363()
     throws Exception
   {
     String str = "jdbc:default:connection";

     Connection localConnection = DriverManager.getConnection(str);
     Statement localStatement = localConnection.createStatement();

     CallableStatement localCallableStatement = localConnection.prepareCall("{call RS200()}");
     localCallableStatement.execute();
   }

   public static void RS200(ResultSet[] paramArrayOfResultSet)
   throws Exception
   {
     String str1 = "jdbc:default:connection";

     String str2 = "select * from t1";
     Connection localConnection = DriverManager.getConnection(str1);
     Statement localStatement = localConnection.createStatement();
     paramArrayOfResultSet[0] = localStatement.executeQuery(str2);
   }

it failed with ERROR:

*** ERROR[11220] A Java method completed with an uncaught java.sql.SQLException with invalid SQLSTATE. The uncaught exception had a SQLCODE of -29261 and SQLSTATE of HY000. Details: java.sql.SQLException: No error message in SQL/MX diagnostics area, but sqlcode is non-zero [2014-08-04 22:57:28]

The SPJ Jar file is attached. Here are the steps to produce the error:

set schema testspj;

create library spjrs file '/<Jar location>/Testrs.jar';

create procedure RS363()
       language java
       parameter style java
       external name 'Testrs.RS363'
       dynamic result sets 0
       library spjrs;

--- SQL operation complete.

create procedure RS200()
       language java
       parameter style java
       external name 'Testrs.RS200'
       dynamic result sets 1
       library spjrs;

create table T1
  (
    A INT DEFAULT NULL
  , B INT DEFAULT NULL
  ) no partitions;

Call RS363();

*** ERROR[11220] A Java method completed with an uncaught java.sql.SQLException with invalid SQLSTATE. The uncaught exception had a SQLCODE of -29261 and SQLSTATE of HY000. Details: java.sql.SQLException: No error message in SQL/MX diagnostics area, but sqlcode is non-zero [2014-08-04 22:57:28]

Tags: sql-exe
Revision history for this message
Chong Hsu (chong-hsu) wrote :
Changed in trafodion:
assignee: nobody → Pavani Puppala (pavani-puppala)
Changed in trafodion:
assignee: Pavani Puppala (pavani-puppala) → Justin Du (justin-du-2)
Revision history for this message
Justin Du (justin-du-2) wrote :

The problem happens with stored procedure calling another. We noticed that the procedure RS200 used result sets.

Can you try a test that the inner one without the result sets?

Revision history for this message
Justin Du (justin-du-2) wrote :

Chong tried the case that inner procedure without result sets and no java error was returned.

Our T2 drive may not handle the result set parameters properly.

Chong Hsu (chong-hsu)
Changed in trafodion:
milestone: none → r1.1
Chong Hsu (chong-hsu)
Changed in trafodion:
milestone: r1.1 → r1.2
Changed in trafodion:
assignee: Justin Du (justin-du-2) → Weiqing Xu (wei-qing-xu)
importance: Medium → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.