Hi,
TimesTen JDBC driver is not a pure Java driver. It requires to load several native code libraries. We are running into native code libraries issues with Tomcat server.
Exception:
Caused by: java.sql.SQLException: Problems with loading native library/missing methods: C:\TimesTen\tt181_64\bin\ttJdbcCS181.dll: Can't find dependent libraries.
Validated the below:
i) Checked PATH for Java , whether it contains required dll and see that PATH has the correct config pointing to <TimesTen>/bin.
ii) Copied the .dll from bin folder to TimesTen lib folder.
iii) Added –Djava.library.path = <TimesTen>/bin folder and also added this in run configuration.
This resolved the initial issue : java.sql.SQLException: Problems with loading native library/missing methods: no ttJdbcCS in java.library.path
iv) Native library location – Updated this to point to bin.
v) On a Windows 64 bit and the dll is present in System32 folder and validated that it it picking from this location.
vi) Went through a couple of online forums but unable to see a definite solution for this.
<bean id="timesTenDB" class="com.timesten.jdbc.ObservableConnectionDS">
<property name="url" value="jdbc:timesten:client:TTC_Server=<>;TTC_Server_DSN=<>;TCP_PORT=<>" />
<property name="user" value="***" />
<property name="password" value="***" />
<property name="initialPoolSize" value="5"/>
<property name="maxPoolSize" value="10"/>
</bean>
<bean id="oracleSqlExecutor" class="com.service.technical.sql.impl.SqlExecutorImpl">
<constructor-arg ref="timesTenDB" />
<constructor-arg value="test-rest-webapp" />
<property name="enableDiagnosticLogging" value="true" />
</bean>
Custom SqlExecutorImpl:
SqlExecutorImpl(DataSource dataSource, String moduleName) {
this.jdbcTemplate = new NamedParameterJdbcTemplate(newJdbcTemplate(dataSource));
this.moduleName = moduleName;
}
As a standalone program I am able to connect to TimesTen but the issue is basically when I am trying to deploy the application WAR in a local tomcat instance.
When we deploy the application on linux I observed that the native lib is libttJdbcCS_all.so which needs to be generated using the ttmkLiteClient utility but wanted to know what is its equivalent for windows and how to generate the same?