Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6275382

Rowset2.0: no db2 test run due to some classes under sun/io/ missing. needed a new jdbc driver

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • 6
    • core-libs
    • generic
    • generic

      Those classes were planned to remove from 1.6.0. (see 4948149 and 4454622) However, the jdbc driver seem to be dependent on them. We need a new drivers.

      =============================
      JDK - 1.6.0
      Database - DB2
      TestSuite - Rowset2.0


      =============================
      Tests:
        Most of tests in the testsuites failed. Using the driver from IBM.

      Output:
        [java] java.lang.NoClassDefFoundError: sun/io/ByteToCharConverter^M
           [java] at com.ibm.db2.jcc.c.r.a(r.java:159)^M
           [java] at com.ibm.db2.jcc.a.d.a(d.java:1009)^M
           [java] at com.ibm.db2.jcc.a.eb.a(eb.java:1723)^M
           [java] at com.ibm.db2.jcc.a.eb.a(eb.java:1651)^M
           [java] at com.ibm.db2.jcc.a.eb.n(eb.java:570)^M
           [java] at com.ibm.db2.jcc.a.eb.j(eb.java:257)^M
           [java] at com.ibm.db2.jcc.a.eb.c(eb.java:57)^M
           [java] at com.ibm.db2.jcc.a.r.c(r.java:42)^M
           [java] at com.ibm.db2.jcc.a.tb.h(tb.java:169)^M
           [java] at com.ibm.db2.jcc.c.zc.p(zc.java:1223)^M
           [java] at com.ibm.db2.jcc.c.ad.d(ad.java:2246)^M
           [java] at com.ibm.db2.jcc.c.ad.U(ad.java:489)^M
           [java] at com.ibm.db2.jcc.c.ad.executeQuery(ad.java:472)^M
           [java] at com.sun.rowset.internal.CachedRowSetReader.readData(CachedRowSetReader.java:168)^M
           [java] at com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:736)^M


      ###@###.### 2005-05-24 18:18:02 GMT

      Using the driver from Data Direct can not create the table. It is OK with 5.0u3.

      Error
      ======
       [java] Exception in thread "main" java.lang.NoClassDefFoundError: sun/io/MalformedInputException
           [java] at com.ddtek.util.UtilTransliterator.OptimizeNewTransliteratorUsingSunIO(Unknown Source)
           [java] at com.ddtek.util.UtilTransliterator.OptimizeNewTransliteratorUsingVM(Unknown Source)
           [java] at com.ddtek.util.UtilTransliterator.GetNewTransliterator(Unknown Source)
           [java] at com.ddtek.util.UtilTransliteratorPool.getTransliteratorForCodePage(Unknown Source)
           [java] at com.ddtek.jdbc.db2.drda.DRDACommunication.setClientSideTransliteration(Unknown Source)
           [java] at com.ddtek.jdbc.db2.DB2ImplConnection.open(Unknown Source)
           [java] at com.ddtek.jdbc.base.BaseConnection.connect(Unknown Source)
           [java] at com.ddtek.jdbc.base.BaseConnection.setupImplConnection(Unknown Source)
           [java] at com.ddtek.jdbc.base.BaseConnection.open(Unknown Source)
           [java] at com.ddtek.jdbc.base.BaseDriver.connect(Unknown Source)
           [java] at java.sql.DriverManager.getConnection(DriverManager.java:525)
           [java] at java.sql.DriverManager.getConnection(DriverManager.java:171)
           [java] at com.sun.jdbc.cts.util.InitDatabase.<init>(Unknown Source)
           [java] at com.sun.jdbc.cts.util.InitDatabase.main(Unknown Source)

      ###@###.### 2005-06-21 22:20:39 GMT
      Setup
      =====
      base.jar, util.jar, and db2.jar are the jdbc drivers from DataDirect.
      CLASSPATH=.:./base.jar:./util.jar:./db2.jar
      export CLASSPATH
      javac bug6275382.java
      java bug6275382

      Output
      ======
      java -version
      java version "1.5.0_03"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07)
      Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode, sharing)
      javac bug6275382.java
      java bug6275382
      /bin/java -version
      java version "1.6.0-ea"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b45)
      Java HotSpot(TM) Client VM (build 1.6.0-ea-b45, mixed mode)
      /bin/java bug6275382
      Exception in thread "main" java.lang.NoClassDefFoundError: sun/io/MalformedInputException
              at com.ddtek.util.UtilTransliterator.OptimizeNewTransliteratorUsingSunIO(Unknown Source)
              at com.ddtek.util.UtilTransliterator.OptimizeNewTransliteratorUsingVM(Unknown Source)
              at com.ddtek.util.UtilTransliterator.GetNewTransliterator(Unknown Source)
              at com.ddtek.util.UtilTransliteratorPool.getTransliteratorForCodePage(Unknown Source)
              at com.ddtek.jdbc.db2.drda.DRDACommunication.setClientSideTransliteration(Unknown Source)
              at com.ddtek.jdbc.db2.DB2ImplConnection.open(Unknown Source)
              at com.ddtek.jdbc.base.BaseConnection.connect(Unknown Source)
              at com.ddtek.jdbc.base.BaseConnection.setupImplConnection(Unknown Source)
              at com.ddtek.jdbc.base.BaseConnection.open(Unknown Source)
              at com.ddtek.jdbc.base.BaseDriver.connect(Unknown Source)
              at java.sql.DriverManager.getConnection(DriverManager.java:548)
              at java.sql.DriverManager.getConnection(DriverManager.java:180)
              at bug6275382.main(bug6275382.java:23)



      Sample program
      ================

      import java.sql.*;
      import javax.sql.*;
      import com.sun.rowset.*;
      import javax.sql.rowset.*;
      import javax.sql.rowset.spi.*;

      public class bug6275382
      {
         public static void main(String args[])
         {
           Connection con = null;
           Connection con2 = null;

           try
           {
             String driver ="com.ddtek.jdbc.db2.DB2Driver";
             String url = "jdbc:datadirect:db2://[you db ip]:50000;databaseName=user1";

             Class.forName(driver).newInstance();

             Statement s, s2, y;

             con = DriverManager.getConnection(url, "[your username]", "[your passwd]");
           }
           catch (Exception e)
          { System.out.println("Main");
            e.printStackTrace();
          }
         }
      }

            lancea Lance Andersen
            tacheung Tak Wing Cheung (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: