I'm having issues getting my TimesTen client installation working on OS X. I've narrowed the issue down to an issue loading the native library.
I have java.library.path set to the TimesTen library directory.
java.library.path = /Users/jpuckett/TimesTen/tt1122/lib
/Users/jpuckett/TimesTen/tt1122/ttoracle_home/instantclient_11_2
And the lib directory is also in my classpath.
I created a simple test app.
import com.timesten.jdbc.TimesTenDataSource;
import com.timesten.jdbc.TimesTenConnection;
import java.sql.SQLException;
public class TTTest {
public static void main(String[] args) throws SQLException {
TimesTenDataSource dataSource = new TimesTenDataSource();
String URL = String.format("TTC_Server=%s;TTC_Server_DSN=%s;TCP_PORT=%d;UID=%s;PWD=%s",
"db.server.net", "AppServer", 11203, "uid", "pwd");
dataSource.setUrl(URL);
System.out.println(dataSource);
TimesTenConnection connection = (TimesTenConnection)dataSource.getConnection();
System.out.println(connection);
}
}
When it's run, I get the following exception.
Exception in thread "main" java.sql.SQLException: Problems with loading native library/missing methods: no ttJdbc in java.library.path
at com.timesten.jdbc.JdbcOdbcConnection.connect(JdbcOdbcConnection.java:1952)
at com.timesten.jdbc.TimesTenDataSource.getConnection(TimesTenDataSource.java:154)
at TTTest.main(TTTest.java:31)
I don't see the libttJdbc.dylib in the TimesTen lib directory.
-rwxr-x--- 1 jpuckett staff 1655734 Aug 24 2013 orai18n.jar
drwxr-xr-x 4 jpuckett staff 136 Oct 29 11:39 META-INF
-rwxr-x--- 1 jpuckett staff 506301 Oct 30 17:34 ucp.jar
-rw-r----- 3 jpuckett staff 281596 Oct 30 17:34 ttjdbc8.jar
-rw-r----- 3 jpuckett staff 281596 Oct 30 17:34 ttjdbc7.jar
-rw-r----- 3 jpuckett staff 281596 Oct 30 17:34 ttjdbc6.jar
lrwxr-xr-x 1 jpuckett staff 17 Oct 30 17:34 libttclient.so -> libttclient.dylib
-rwxr-x--- 1 jpuckett staff 253180 Oct 30 17:34 libttclassesCS.dylib
-rwxr-x--- 1 jpuckett staff 116940 Oct 30 17:34 libttJdbcCS.dylib
-rwxr-x--- 1 jpuckett staff 2447056 Apr 23 11:36 libttcoD.dylib
-rwxr-x--- 1 jpuckett staff 2389680 Apr 23 11:36 libttco.dylib
-rwxr-x--- 1 jpuckett staff 587296 Apr 23 11:36 libttclient.dylib
drwxrwx--- 13 jpuckett staff 442 Apr 23 12:32 ..
drwxr-x--- 14 jpuckett staff 476 Apr 23 12:32 .
I can see from the verbose JVM output that the correct jars are being loaded.
[Loaded com.timesten.jdbc.JdbcOdbcObject from file:/Users/jpuckett/TimesTen/tt1122/lib/ttjdbc6.jar]
[Loaded com.timesten.jdbc.TimesTenDriverBase from file:/Users/jpuckett/TimesTen/tt1122/lib/ttjdbc6.jar]
[Loaded com.timesten.jdbc.TimesTenDataSource from file:/Users/jpuckett/TimesTen/tt1122/lib/ttjdbc6.jar]
[Loaded com.timesten.jdbc.Logger from file:/Users/jpuckett/TimesTen/tt1122/lib/ttjdbc6.jar]
[Loaded com.timesten.jdbc.TimesTenDriver from file:/Users/jpuckett/TimesTen/tt1122/lib/ttjdbc6.jar]
[Loaded com.timesten.jdbc.TimesTenConnection from file:/Users/jpuckett/TimesTen/tt1122/lib/ttjdbc6.jar]
[Loaded com.timesten.jdbc.TimesTenConnectionInternal from file:/Users/jpuckett/TimesTen/tt1122/lib/ttjdbc6.jar]
[Loaded com.timesten.jdbc.JdbcOdbcConnection from file:/Users/jpuckett/TimesTen/tt1122/lib/ttjdbc6.jar]
[Loaded com.timesten.jdbc.PostFinalization from file:/Users/jpuckett/TimesTen/tt1122/lib/ttjdbc6.jar]
[Loaded com.timesten.jdbc.JdbcOdbc from file:/Users/jpuckett/TimesTen/tt1122/lib/ttjdbc6.jar]
[Loaded com.timesten.jdbc.JdbcOdbcClient from file:/Users/jpuckett/TimesTen/tt1122/lib/ttjdbc6.jar]
[Loaded com.timesten.jdbc.JdbcOdbcDirect from file:/Users/jpuckett/TimesTen/tt1122/lib/ttjdbc6.jar]
[Loaded com.timesten.jdbc.JdbcOdbcSQLWarning from file:/Users/jpuckett/TimesTen/tt1122/lib/ttjdbc6.jar]
[Loaded com.timesten.jdbc.TimesTenBlob from file:/Users/jpuckett/TimesTen/tt1122/lib/ttjdbc6.jar]
[Loaded com.timesten.jdbc.TimesTenClob from file:/Users/jpuckett/TimesTen/tt1122/lib/ttjdbc6.jar]
[Loaded com.timesten.jdbc.TimesTenStatement from file:/Users/jpuckett/TimesTen/tt1122/lib/ttjdbc6.jar]
[Loaded com.timesten.jdbc.JdbcOdbcStatement from file:/Users/jpuckett/TimesTen/tt1122/lib/ttjdbc6.jar]
[Loaded com.timesten.jdbc.TimesTenPreparedStatement from file:/Users/jpuckett/TimesTen/tt1122/lib/ttjdbc6.jar]
[Loaded com.timesten.jdbc.JdbcOdbcPreparedStatement from file:/Users/jpuckett/TimesTen/tt1122/lib/ttjdbc6.jar]
[Loaded com.timesten.jdbc.TimesTenCallableStatement from file:/Users/jpuckett/TimesTen/tt1122/lib/ttjdbc6.jar]
[Loaded com.timesten.jdbc.JdbcOdbcCallableStatement from file:/Users/jpuckett/TimesTen/tt1122/lib/ttjdbc6.jar]
[Loaded com.timesten.jdbc.ReferenceManager from file:/Users/jpuckett/TimesTen/tt1122/lib/ttjdbc6.jar]
Any suggestions on where I should go from here??