|
Hi, Our mail server went down for > 24 hours and I am not sure if this post went through (also I have not seen any messages since I posted it) so I am posting it again just to make sure. Sorry if it is now duplicated. -- DB2 drivers are throwing a NullPointerException when I retrieve meta data after a getProcedureColumns() call, but it works fine with the toolbox drivers. I turned on tracing and found that it throws the exception on the very first attempt to get any info from the first record in the resultset returned from getProcedureColumns(): as400: Connection Not Displayed open. as400: Connection Not Displayed: Auto commit = "false". as400: Connection Not Displayed: Read only = "true". as400: Connection Not Displayed: Transaction isolation = "2". getConnection returning driver[className=com.ibm.db2.jdbc.app.DB2Driver,context=null,DB2 for OS/400 JDBC Driver] as400: Callable statement Not Displayed open. as400: Callable statement Not Displayed: Escape processing = "true". as400: Callable statement Not Displayed: Fetch direction = "1000". as400: Callable statement Not Displayed: Fetch size = "0". as400: Callable statement Not Displayed: Max field size = "0". as400: Callable statement Not Displayed: Max rows = "0". as400: Callable statement Not Displayed: Query timeout = "0". as400: Callable statement Not Displayed: Result set conncurrency = "1007". as400: Callable statement Not Displayed: Result set type = "1003". SQLWarning: reason([IBM][JDBC Driver][12101] ResultSet type changed to scroll insensitive.) SQLstate([IBM][JDBC Driver][12101] ResultSet type changed to scroll insensitive.) vendor code(-99999) as400: Statement Not Displayed open. as400: Statement Not Displayed: Escape processing = "true". as400: Statement Not Displayed: Fetch direction = "1000". as400: Statement Not Displayed: Fetch size = "0". as400: Statement Not Displayed: Max field size = "0". as400: Statement Not Displayed: Max rows = "0". as400: Statement Not Displayed: Query timeout = "0". as400: Statement Not Displayed: Result set conncurrency = "1007". as400: Statement Not Displayed: Result set type = "1004". as400: Unknown Not Displayed: Re-using a result set object.. as400: Unknown Not Displayed: Conncurrency = "1007". as400: Unknown Not Displayed: Fetch direction = "1000". as400: Unknown Not Displayed: Fetch size = "0". as400: Unknown Not Displayed: Max rows = "0". as400: Unknown Not Displayed: Type = "1004". [600|14/02/2000 20:17:28] Got procedure columns meta data, examining... [600|14/02/2000 20:17:28] About to get getInt("DATA_TYPE") as400: Callable statement Not Displayed closed. [100|14/02/2000 20:17:28] encountered java.lang.NullPointerException: java.lang.NullPointerException com/ibm/db2/jdbc/app/DB2ResultSet.getInt(I)I+80 (DB2ResultSet.java:2968) com/ibm/db2/jdbc/app/DB2RSGetProcedureColumns.getInt(I)I+112 (DB2RSGetProcedureColumns.java:319) com/ibm/db2/jdbc/app/DB2ResultSet.getInt(Ljava/lang/String;)I+43 (DB2ResultSet.java:5412) com/hypere/ebiz/server/ProcedureExecuter.prepareCallableStatement(Lcom/hyper e/ebiz/edata/DataSet; Ljava/sql/CallableStatement;+52 (ProcedureExecuter.java:191) ... The code looks something like this: stmt = connection.prepareCall(userStatement); DatabaseMetaData dmd = connection.getMetaData(); ResultSet paramInfo = dmd.getProcedureColumns( connection.getCatalog(), schema, procedureName, "%"); Logger.log(Logger.DETAIL, "Got procedure columns meta data, examining..."); for (int idx = 1; paramInfo.next(); idx++ ) { Logger.log(Logger.DETAIL, "About to get getInt(\"DATA_TYPE\")"); int dataType = paramInfo.getInt("DATA_TYPE"); // exception thrown ... Maybe it is just a configuration error in my setup for the native drivers? The url is: jdbc:db2://localhost/DEMO1;naming=sql;translate binary=false;access=read call;transaction isolation=read committed;libraries=DEMO1;trace=true;do escape processing=true;blocking enabled=true;block size=128 Anyone have any ideas or should I open a PMR? luther.miller @ hypere.com +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner: joe@zappie.net +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.