On January 27th, this site will be read-only as we migrate to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 30th, when you will be able to use this site as normal.

    Forum Stats

  • 3,889,585 Users
  • 2,269,760 Discussions
  • 7,916,785 Comments

Discussions

OSX 10.11.4 w/ 11.2.2.8.9 - missing libttJdbc.dylib?

user6236999
user6236999 Member Posts: 2 Red Ribbon
edited Apr 25, 2016 4:09AM in TimesTen In-Memory Database

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??

Answers

  • ChrisJenkins-Oracle
    ChrisJenkins-Oracle Senior Director, In-Memory Technology United KingdomMember Posts: 3,412 Employee
    edited Apr 25, 2016 4:07AM

    Your problem is with the URL; it is  incorrect. It should be:

    String URL = String.format("jdbc:timesten:client:TTC_Server=%s;TTC_Server_DSN=%s;TCP_PORT=%d;UID=%s;PWD=%s",

                        "db.server.net", "AppServer", 11203, "uid", "pwd");


    Regards,


    Chris


  • ChrisJenkins-Oracle
    ChrisJenkins-Oracle Senior Director, In-Memory Technology United KingdomMember Posts: 3,412 Employee
    edited Apr 25, 2016 4:09AM

    By default TimesTen tries to use the direct mode driver (libttJdbc.dylib) but that is not available on OS X; only the TimesTen client driver is provided and that is libttJdbcCS.dylib. Unless you include the correct URL prefix to tell the JDBC driver manager to load the client driver it will look for, and fail to find, the direct mode driver.

    Chris

This discussion has been closed.