Hi to everyone!
I´m developing a web dynamic web project in Eclipse IDE and I have a problem that i can´t fix... I´m using TimesTen in a Tomcat server and JDBC to connect with the database. When I connect throught the ttisql is successfully, but when I connect since Eclipse with de Jdbc i obtein the next error:
java.sql.SQLException: Problems with loading native library/missing methods: no ttJdbcCS in java.library.path
at com.timesten.jdbc.JdbcOdbcConnection.connect(JdbcOdbcConnection.java:1809)
at com.timesten.jdbc.TimesTenDataSource.getConnection(TimesTenDataSource.java:148)
at es.uc3m.tfgACO.Accion.Login.procesar(Login.java:57)
at es.uc3m.tfgACO.Controlador.MiServlet.doGet(MiServlet.java:85)
at es.uc3m.tfgACO.Controlador.MiServlet.doPost(MiServlet.java:106)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
The code is the following:
try {
Class.forName("com.timesten.jdbc.TimesTenClientDriver");
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
String url = "jdbc:timesten:client:dsn=sampledb_1122";
TimesTenDataSource ds = new TimesTenDataSource();
ds.setUrl(url);
ds.setUser("alfonso");
ds.setPassword("XXX"); // It is different
Connection con = ds.getConnection();
Statement sentencia = con.createStatement();
I have configured the build path adding the ttjdbc8.jar and putting Native Library Location with the path of the library of TimesTen (There is all the jdbc jars and the ttJdbcCS.so). Moreover, I have another problem with SQL Developer, where don´t appear the tab TimesTen. I executed the ttenv.sh but it not solve my problem...
With the ttenv I get this:
NOTE: unknown or unsupported java version, setting values for JDK 1.5
LD_LIBRARY_PATH set to /home/oracle/TimesTen/tt1122/lib:/home/oracle/TimesTen/tt1122/ttoracle_home/instantclient_11_2
ANT_HOME set to /home/oracle/TimesTen/tt1122/3rdparty/ant
PATH set to /home/oracle/TimesTen/tt1122/bin:/home/oracle/TimesTen/tt1122/quickstart/sample_code/oci:/home/oracle/TimesTen/tt1122/quickstart/sample_code/odbc:/home/oracle/TimesTen/tt1122/quickstart/sample_code/odbc/xla:/home/oracle/TimesTen/tt1122/quickstart/sample_code/jdbc:/home/oracle/TimesTen/tt1122/quickstart/sample_code/odbc_drivermgr:/home/oracle/TimesTen/tt1122/quickstart/sample_code/proc:/home/oracle/TimesTen/tt1122/quickstart/sample_code/ttclasses:/home/oracle/TimesTen/tt1122/quickstart/sample_code/ttclasses/xla:/home/oracle/TimesTen/tt1122/ttoracle_home/instantclient_11_2:/home/oracle/TimesTen/tt1122/ttoracle_home/instantclient_11_2/sdk:/home/oracle/TimesTen/tt1122/3rdparty/ant/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
CLASSPATH set to /home/oracle/TimesTen/tt1122/lib/ttjdbc5.jar:/home/oracle/TimesTen/tt1122/lib/orai18n.jar:/home/oracle/TimesTen/tt1122/lib/timestenjmsxla.jar:/home/oracle/TimesTen/tt1122/3rdparty/jms1.1/lib/jms.jar:.
Sorry if I put something bad or the format is incorrect, it is the first time that I write in this site.
Thanks,
Alfonso.