home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Neueste VersionenFixList
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Haben Sie Probleme? - Kontaktieren Sie uns.
Kostenlos registrieren anmeldung-x26
Kontaktformular kontakt-x26

DB2 - Problembeschreibung

Problem IC65851 Status: Geschlossen

RECEIVE JAVA.LANG.NULLPOINTEREXCEPTION WHEN ACCESSING VALUE OF CURSOR
TYPED OUTPUT PARAMETER RETURNED BY A SQL CALL STATEMENT

Produkt:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problembeschreibung:
You receive a java.lang.NullPointer exception from 
com.ibm.db2.jcc.am.vm.getObject when attempting to get the value 
of a cursor typed output parameter returned by an SQL Call 
statement, and literal values were used for at least one input 
 
parameter. 
 
Example Create Procedure DDL: 
CREATE PROCEDURE P1(IN V1 INTEGER, OUT CV1 CURSOR) 
BEGIN 
   SET CV1 = CURSOR FOR VALUES(V1); 
END 
 
Example Java Code: 
The example assumes that the conn variable represents an 
instance of the Connection class with an open connection to a 
database where the procedure P1 has been defined. 
 
CallableStatement cstmt = conn.prepareCall("CALL P1(42, ?"); 
cstmt.registerOutParameter(1, com.ibm.db2.jcc.DB2Types.CURSOR); 
cstmt.execute(); 
ResultSet rs = (ResultSet)cstmt.getObject(1); <-- Throws 
java.lang.NullPointerException 
 
Exception Call Stack: 
java.lang.NullPointerException 
        at com.ibm.db2.jcc.am.gc.a(gc.java:1822) 
        at com.ibm.db2.jcc.am.vm.A(vm.java:1039) 
        at com.ibm.db2.jcc.am.vm.getObject(vm.java:1017)
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* Java applications using JCC Type 4 Driver against DB2 forLUW * 
* 9.7 server.                                                  * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* You receive a java.lang.NullPointer exception                * 
* fromcom.ibm.db2.jcc.am.vm.getObject when attempting to get   * 
* thevalue of a cursor typed output parameter returned by an   * 
* SQLCall statement and literal values were used for at least  * 
* oneinput parameter.Example Create Procedure DDL:CREATE       * 
* PROCEDURE P1(IN V1 INTEGER, OUT CV1 CURSOR)BEGINSET CV1 =    * 
* CURSOR FOR VALUES(V1);ENDExample Java Code:The example       * 
* assumes that the conn variable represents aninstance of the  * 
* Connection class with an open connection toa database where  * 
* the procedure P1 has been defined.CallableStatement cstmt =  * 
* conn.prepareCall("CALL P1(42,                                * 
* ?");cstmt.registerOutParameter(1,com.ibm.db2.jcc.DB2Types.CURS 
* rs = (ResultSet)cstmt.getObject(1); <--                      * 
* Throwsjava.lang.NullPointerExceptionException Call           * 
* Stack:java.lang.NullPointerExceptionat                       * 
* com.ibm.db2.jcc.am.gc.a(gc.java:1822)at                      * 
* com.ibm.db2.jcc.am.vm.A(vm.java:1039)at                      * 
* com.ibm.db2.jcc.am.vm.getObject(vm.java:1017)                * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 for LUW version 9.7 Fix Pack 2.               * 
****************************************************************
Local-Fix:
verfügbare FixPacks:
DB2 Version 9.7 Fix Pack 2 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Lösung
Problem was first fixed in Version 9.7 Fix Pack 2.  This fix 
should be applied on the server. 
 
You will no longer receive a java.lang.NullPointer exception 
from com.ibm.db2.jcc.am.vm.getObject when retrieving the value 
of a Cursor typed output parameter from an SQL Call statement.
Workaround
keiner bekannt / siehe Local-Fix
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
26.01.2010
05.07.2010
05.07.2010
Problem behoben ab folgender Versionen (IBM BugInfos)
9.7.FP2
Problem behoben lt. FixList in der Version
9.7.0.2 FixList