0

I have installed Oracle TimesTen client on my Mac and Oracle TimesTen Server on a RedHat machine which I can connect remotely from command line

connect "dsn=TT1122;UID=uid;PWD=pwd";

I got successful connection back.

Now I want to use JDBC to try and connect to the same ODBC. but I got this error back.

java.sql.SQLException: Problems with loading native library/missing methods: no ttJdbcCS in java.library.path
    at com.timesten.jdbc.JdbcOdbcConnection.connect(JdbcOdbcConnection.java:1757)
    at com.timesten.jdbc.TimesTenDataSource.getConnection(TimesTenDataSource.java:148)
    at TimesTen.main(TimesTen.java:17)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

I'm using OSX Lion and IntelliJ. I have run ttenv.sh to setup the environment already. But I cannot seem to get JDBC to work. I search all over the Internet and found nothing that solve my problem.

Thanks

toy
  • 11,711
  • 24
  • 93
  • 176

2 Answers2

1

I have not used TimesTen in Mac OSX but have you set up an ODBC/DSN in OSX? In windows after installing, you have to set up the ODBC connector separately from the times ten install. I found this for setting up an ODBC in OSX.

http://dev.mysql.com/doc/refman/5.0/en/connector-odbc-configuration-dsn-macosx.html

jlteksolutions
  • 403
  • 1
  • 4
  • 9
  • I did. And I got to the point where IntelliJ can load the library, but I got another exception saying my library is the wrong architecture. – toy Oct 11 '13 at 20:36
0

The Mac OS X client for TimesTen is a 32-bit library. You cannot invoke it from a 64-bit JVM. I believe the only 32-bit JVM for OS X is java 1.6.

Using the 32 bit 1.6 (I think you have to use the -d32 flag on the jvm), I was able to connect to TimesTen running on a linux server.

NOTE: as of the current TimesTen version 11.2.2.8.9, It seems that Oracle has added a 64-bit MacOSX client, so the scenario above should work fine now.

Nayan Hajratwala
  • 350
  • 1
  • 4
  • 11