2 Replies Latest reply: Feb 6, 2013 2:59 AM by 589557 RSS

    java.sql.SQLException: Problems with loading native library/missing methods

    Surachart Opun
      env | grep CLASSPATH
      CLASSPATH=/oracle/product/TimesTen/tt70_MB/lib/classes15.jar:/oracle/product/TimesTen/tt70_MB/lib/timestenjmsxla.jar:/oracle/product/TimesTen/tt70_MB/3rdparty/jms1.1/lib/jms.jar:/oracle/product/TimesTen/tt70_MB/demo:/oracle/product/TimesTen/tt70_MB//demo/tutorial/java:.:/oracle/product/TimesTen/tt70_MB/lib/ttjdbc5.jar::/oracle/product/TimesTen/tt70_MB/lib/orai18n.jar

      -----------------------------------------------
      import java.sql.*;
      import java.io.*;
      import java.lang.ClassNotFoundException;
      import java.lang.Integer;


      public class test
      {
      public static void main(String[] args)
      {
      try
      {
      Class.forName("com.timesten.jdbc.TimesTenDriver");
      String URL = "jdbc:timesten:ttdemo2c";
      System.out.println(URL);
      Connection con = DriverManager.getConnection(URL);
      }
      catch (Exception e)
      {
      e.printStackTrace();
      }
      }
      }


      $/oracle/jdk1.6.0/bin/java test


      jdbc:timesten:ttdemo2c
      java.sql.SQLException: Problems with loading native library/missing methods: no ttJdbc in java.library.path
      at com.timesten.jdbc.JdbcOdbcConnection.connect(JdbcOdbcConnection.java:1711)
      at com.timesten.jdbc.TimesTenDriver.connect(TimesTenDriver.java:303)
      at com.timesten.jdbc.TimesTenDriver.connect(TimesTenDriver.java:159)
      at java.sql.DriverManager.getConnection(DriverManager.java:582)
      at java.sql.DriverManager.getConnection(DriverManager.java:207)
      at test.main(test.java:16)