Java.exe crashed at using UDB JDBC Scrollable Cursor 
Author Message
 Java.exe crashed at using UDB JDBC Scrollable Cursor
Hello,
  I am using UDB V7 on WinNT, the following JDBC statement
"con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);"
will cause Java.exe (v 1.2.2) to crash with message "The instruction
at "0x00" referenced memory at "0x00"

  Did I do something wrong or DB2 JDBC Driver doesn't support
Scrollable Cursor?
  Thanks for the help.
Regards,
Mike.



Wed, 15 Sep 2004 07:48:59 GMT
 Java.exe crashed at using UDB JDBC Scrollable Cursor

TYPE_SCROLL_INSENSITIVE cursors are supported.

What JVM are you using? Try it with the one that ships with DB2
(SQLLIB\java\java12\jdk\bin).

If that doesn't work please post an example that crashes the JVM.

Dirk


Quote:
> Hello,
>   I am using UDB V7 on WinNT, the following JDBC statement

"con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ
_ONLY);"
Quote:
> will cause Java.exe (v 1.2.2) to crash with message "The instruction
> at "0x00" referenced memory at "0x00"

>   Did I do something wrong or DB2 JDBC Driver doesn't support
> Scrollable Cursor?
>   Thanks for the help.
> Regards,
> Mike.



Thu, 16 Sep 2004 02:03:27 GMT
 Java.exe crashed at using UDB JDBC Scrollable Cursor
Hello,
  Thanks for the reply.
  I have tried the JDK shipped with DB2. "java -version" prints out
the following.
java version "1.2.2"
Classic VM (J2RE 1.2.2 IBM build cn122-20001206a (JIT enabled: jitc))

  It doesn't crash this time, but it throws the following exception:
Exception in thread "main" java.lang.AbstractMethodError:
COM/ibm/db2/jdbc/app/D
B2Connection.createStatement
        at ScrollTest.main(ScrollTest.java:9)

  Attached is my sample code:

import java.sql.*;
class ScrollTest{
  public static void main(String [] args){
    String driver = "COM.ibm.db2.jdbc.app.DB2Driver";
    String url    = "jdbc:db2:mysample";              
    try{
      Class.forName(driver);
      Connection con = DriverManager.getConnection(url);
      Statement st =
con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY); // line # 9
    }catch (SQLException sqlEx){
      while(sqlEx != null){
        System.out.println("SQLERROR: \n" + sqlEx.getErrorCode() +
        ", SQLState: " + sqlEx.getSQLState() +
        ", Message: " + sqlEx.getMessage() +
        ", Vendor: " + sqlEx.getErrorCode() );
        sqlEx = sqlEx.getNextException();
      }
    }catch (Exception ex){
      ex.printStackTrace();
    }
  }

Quote:
}



Sun, 19 Sep 2004 09:51:23 GMT
 Java.exe crashed at using UDB JDBC Scrollable Cursor
Michael,

usually AbstractMethodError: come from using a JDBC2 method with a JDBC1
driver implementation. Please refer to this document or search
groups.google.com

http://www-4.ibm.com/cgi-bin/db2www/data/db2/udb/winos2unix/support/d...
.d2w/report?&fn=1008960

Dirk


Quote:
> Hello,
>   Thanks for the reply.
>   I have tried the JDK shipped with DB2. "java -version" prints out
> the following.
> java version "1.2.2"
> Classic VM (J2RE 1.2.2 IBM build cn122-20001206a (JIT enabled: jitc))

>   It doesn't crash this time, but it throws the following exception:
> Exception in thread "main" java.lang.AbstractMethodError:
> COM/ibm/db2/jdbc/app/D
> B2Connection.createStatement
>         at ScrollTest.main(ScrollTest.java:9)

>   Attached is my sample code:

> import java.sql.*;
> class ScrollTest{
>   public static void main(String [] args){
>     String driver = "COM.ibm.db2.jdbc.app.DB2Driver";
>     String url    = "jdbc:db2:mysample";
>     try{
>       Class.forName(driver);
>       Connection con = DriverManager.getConnection(url);
>       Statement st =
> con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
> ResultSet.CONCUR_READ_ONLY); // line # 9
>     }catch (SQLException sqlEx){
>       while(sqlEx != null){
>         System.out.println("SQLERROR: \n" + sqlEx.getErrorCode() +
>         ", SQLState: " + sqlEx.getSQLState() +
>         ", Message: " + sqlEx.getMessage() +
>         ", Vendor: " + sqlEx.getErrorCode() );
>         sqlEx = sqlEx.getNextException();
>       }
>     }catch (Exception ex){
>       ex.printStackTrace();
>     }
>   }
> }



Mon, 20 Sep 2004 01:50:31 GMT
 Java.exe crashed at using UDB JDBC Scrollable Cursor
Hi Dirk,
  Thanks for the reply. Does that mean UDB V7 JDBC Driver doesn't
support Scrollable Cursor?
  The getDriverVersion() method prints out "07.02.0001".
  Unfortunately, the link you supplied is dead. Can you direct me to
the  official UDB Web Site that has this information?
  Thanks!
Mike.


Quote:
> Michael,

> usually AbstractMethodError: come from using a JDBC2 method with a JDBC1
> driver implementation. Please refer to this document or search
> groups.google.com

> http://www-4.ibm.com/cgi-bin/db2www/data/db2/udb/winos2unix/support/d...
> .d2w/report?&fn=1008960

> Dirk



> > Hello,
> >   Thanks for the reply.
> >   I have tried the JDK shipped with DB2. "java -version" prints out
> > the following.
> > java version "1.2.2"
> > Classic VM (J2RE 1.2.2 IBM build cn122-20001206a (JIT enabled: jitc))

> >   It doesn't crash this time, but it throws the following exception:
> > Exception in thread "main" java.lang.AbstractMethodError:
> > COM/ibm/db2/jdbc/app/D
> > B2Connection.createStatement
> >         at ScrollTest.main(ScrollTest.java:9)

> >   Attached is my sample code:

> > import java.sql.*;
> > class ScrollTest{
> >   public static void main(String [] args){
> >     String driver = "COM.ibm.db2.jdbc.app.DB2Driver";
> >     String url    = "jdbc:db2:mysample";
> >     try{
> >       Class.forName(driver);
> >       Connection con = DriverManager.getConnection(url);
> >       Statement st =
> > con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
> > ResultSet.CONCUR_READ_ONLY); // line # 9
> >     }catch (SQLException sqlEx){
> >       while(sqlEx != null){
> >         System.out.println("SQLERROR: \n" + sqlEx.getErrorCode() +
> >         ", SQLState: " + sqlEx.getSQLState() +
> >         ", Message: " + sqlEx.getMessage() +
> >         ", Vendor: " + sqlEx.getErrorCode() );
> >         sqlEx = sqlEx.getNextException();
> >       }
> >     }catch (Exception ex){
> >       ex.printStackTrace();
> >     }
> >   }
> > }



Tue, 21 Sep 2004 02:08:25 GMT
 Java.exe crashed at using UDB JDBC Scrollable Cursor
Michael,

the JDBC2 JDBC driver implementation in  DB2 V7.2 (DB2 ships with a JDBC1
driver implementation and a JDBC2 driver implementation) supports all
Scrollable Cursor except updatable and scrollable ones.

The unsupported JDBC features in DB2 are described here:
http://www-1.ibm.com/support/manager.wss?rs=0&rt=0&org=SW&doc=1000797

and the switching between is described in that other docuement I refered to
earlier.

Dirk


Quote:
> Hi Dirk,
>   Thanks for the reply. Does that mean UDB V7 JDBC Driver doesn't
> support Scrollable Cursor?
>   The getDriverVersion() method prints out "07.02.0001".
>   Unfortunately, the link you supplied is dead. Can you direct me to
> the  official UDB Web Site that has this information?
>   Thanks!
> Mike.




Quote:
> > Michael,

> > usually AbstractMethodError: come from using a JDBC2 method with a JDBC1
> > driver implementation. Please refer to this document or search
> > groups.google.com

http://www-4.ibm.com/cgi-bin/db2www/data/db2/udb/winos2unix/support/d...
Quote:
> > .d2w/report?&fn=1008960

> > Dirk



> > > Hello,
> > >   Thanks for the reply.
> > >   I have tried the JDK shipped with DB2. "java -version" prints out
> > > the following.
> > > java version "1.2.2"
> > > Classic VM (J2RE 1.2.2 IBM build cn122-20001206a (JIT enabled: jitc))

> > >   It doesn't crash this time, but it throws the following exception:
> > > Exception in thread "main" java.lang.AbstractMethodError:
> > > COM/ibm/db2/jdbc/app/D
> > > B2Connection.createStatement
> > >         at ScrollTest.main(ScrollTest.java:9)

> > >   Attached is my sample code:

> > > import java.sql.*;
> > > class ScrollTest{
> > >   public static void main(String [] args){
> > >     String driver = "COM.ibm.db2.jdbc.app.DB2Driver";
> > >     String url    = "jdbc:db2:mysample";
> > >     try{
> > >       Class.forName(driver);
> > >       Connection con = DriverManager.getConnection(url);
> > >       Statement st =
> > > con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
> > > ResultSet.CONCUR_READ_ONLY); // line # 9
> > >     }catch (SQLException sqlEx){
> > >       while(sqlEx != null){
> > >         System.out.println("SQLERROR: \n" + sqlEx.getErrorCode() +
> > >         ", SQLState: " + sqlEx.getSQLState() +
> > >         ", Message: " + sqlEx.getMessage() +
> > >         ", Vendor: " + sqlEx.getErrorCode() );
> > >         sqlEx = sqlEx.getNextException();
> > >       }
> > >     }catch (Exception ex){
> > >       ex.printStackTrace();
> > >     }
> > >   }
> > > }



Tue, 21 Sep 2004 03:05:02 GMT
 Java.exe crashed at using UDB JDBC Scrollable Cursor
Hi Dirk,
  Thanks for the info. The UDB document does say Scrollable Cursor is
supported,
(but type ResultSet.TYPE_SCROLL_SENSITIVE is not supported.)
  I did  use the TYPE_SCROLL_INSENSITIVE in my test program, but it
still doesn't work. Do I need to indicate I intend to use the JDBC2
driver? Currently, I just include db2java.zip in my classpath.
Regards,
Mike.


Quote:
> Michael,

> the JDBC2 JDBC driver implementation in  DB2 V7.2 (DB2 ships with a JDBC1
> driver implementation and a JDBC2 driver implementation) supports all
> Scrollable Cursor except updatable and scrollable ones.

> The unsupported JDBC features in DB2 are described here:
> http://www-1.ibm.com/support/manager.wss?rs=0&rt=0&org=SW&doc=1000797

> and the switching between is described in that other docuement I refered to
> earlier.

> Dirk



> > Hi Dirk,
> >   Thanks for the reply. Does that mean UDB V7 JDBC Driver doesn't
> > support Scrollable Cursor?
> >   The getDriverVersion() method prints out "07.02.0001".
> >   Unfortunately, the link you supplied is dead. Can you direct me to
> > the  official UDB Web Site that has this information?
> >   Thanks!
> > Mike.



> > > Michael,

> > > usually AbstractMethodError: come from using a JDBC2 method with a JDBC1
> > > driver implementation. Please refer to this document or search
> > > groups.google.com

>  http://www-4.ibm.com/cgi-bin/db2www/data/db2/udb/winos2unix/support/d...
> > > .d2w/report?&fn=1008960

> > > Dirk



> > > > Hello,
> > > >   Thanks for the reply.
> > > >   I have tried the JDK shipped with DB2. "java -version" prints out
> > > > the following.
> > > > java version "1.2.2"
> > > > Classic VM (J2RE 1.2.2 IBM build cn122-20001206a (JIT enabled: jitc))

> > > >   It doesn't crash this time, but it throws the following exception:
> > > > Exception in thread "main" java.lang.AbstractMethodError:
> > > > COM/ibm/db2/jdbc/app/D
> > > > B2Connection.createStatement
> > > >         at ScrollTest.main(ScrollTest.java:9)

> > > >   Attached is my sample code:

> > > > import java.sql.*;
> > > > class ScrollTest{
> > > >   public static void main(String [] args){
> > > >     String driver = "COM.ibm.db2.jdbc.app.DB2Driver";
> > > >     String url    = "jdbc:db2:mysample";
> > > >     try{
> > > >       Class.forName(driver);
> > > >       Connection con = DriverManager.getConnection(url);
> > > >       Statement st =
> > > > con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
> > > > ResultSet.CONCUR_READ_ONLY); // line # 9
> > > >     }catch (SQLException sqlEx){
> > > >       while(sqlEx != null){
> > > >         System.out.println("SQLERROR: \n" + sqlEx.getErrorCode() +
> > > >         ", SQLState: " + sqlEx.getSQLState() +
> > > >         ", Message: " + sqlEx.getMessage() +
> > > >         ", Vendor: " + sqlEx.getErrorCode() );
> > > >         sqlEx = sqlEx.getNextException();
> > > >       }
> > > >     }catch (Exception ex){
> > > >       ex.printStackTrace();
> > > >     }
> > > >   }
> > > > }



Wed, 22 Sep 2004 10:04:25 GMT
 
 [ 7 post ] 

 Relevant Pages 

1. Need column names in JDBC Meta-Data for a UDB Stored Proc using cursor

2. Java Boolean Datatype on UDB using JDBC

3. Java executable crashes when using Access ODBC-JDBC

4. Does JDBC allow scrollable cursors?

5. Does JDBC allow scrollable cursors?

6. Performance of scrollable cursors in JDBC

7. Scrollable ResultSet using proc out cursor

8. Scrollable ResultSet using proc out cursor

9. Scrollable cursor type changes after doing a Select using DB2 CLI

10. ORA-00933 when using scrollable ResultSet in JDBC

11. UDB 5.2 JDBC timestamp format different from java.sql.timestamp

12. Error in Java Program, when it accesses DB2 UDB 7.2 from DB2 UDB 5.2 Client


 
Powered by phpBB® Forum Software