JDBC connection for the cached database oracle timesten

advertisements

I am going to connect to Oracle timesten database inside java application. For this purpose I wrote a simple connection class. When I try to run this java class an error " Problems with loading native library/missing methods: no ttJdbcCS in java.library.path" appeared. I tried to set LD_LIBRARY_PATH and java.library.path separately but the problem still exists! Here is the source code of sample class:

import java.beans.Statement;
import java.sql.ResultSet;
import java.sql.SQLException;

import com.timesten.jdbc.TimesTenConnection;
import com.timesten.jdbc.TimesTenDataSource;

public class TTSimpleConnection {
    public static void main(String args[]) {
        try {
            TimesTenDataSource ttds = new TimesTenDataSource();
            ttds.setUrl("jdbc:timesten:client:dsn=temptsn;UID=*****;PWD=*****");
            TimesTenConnection ttcon = (TimesTenConnection) ttds
                    .getConnection();
            Statement stmt = (Statement) ttcon.createStatement();
            ResultSet rset = ((java.sql.Statement) stmt)
                    .executeQuery("select * from t");
            while (rset.next()) {
                System.out.println(rset.getInt(1));

            }
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
}


try this,

stackoverflow.com/questions/10459979

stackoverflow.com/questions/19949407

community.oracle.com/thread/1020859