Forum Stats

  • 3,728,127 Users
  • 2,245,554 Discussions
  • 7,853,348 Comments

Discussions

Problems with loading native library/missing methods: C:\TimesTen\tt181_64\bin\ttJdbcCS181.dll: Can'

4228428
4228428 Member Posts: 3

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?

4228428

Best Answer

  • ChrisJenkins-Oracle
    ChrisJenkins-Oracle Member Posts: 3,402 Employee
    edited May 2020 Accepted Answer

    Sorry for the delay in replying. ttmkLiteClient is only supported on Linux currently. It's not really feasible to do what it does manually (since the library code also needs to understand that it is running in 'lite' mode) so I'm afraid that your only option for deployment on Windows is to:

    1.    Install the TimesTen client software (you can use the -batch option to the installer to do this in automated fashion).

    2.    Setup the necessary registry entries for any DSNs etc. You can do this once then create a .reg file to use on other systems.

    3.    Make sure that the native library path is properly set in Tomcat (as you have already discovered).

    Not ideal I know but that is pretty much the only option at present. If you want the ttmkLiteClient functionality on Windows please contact Oracle Support and ask them to log an enhancement request.

    Chris

    42284284228428

Answers

  • ChrisJenkins-Oracle
    ChrisJenkins-Oracle Member Posts: 3,402 Employee
    edited May 2020 Accepted Answer

    Sorry for the delay in replying. ttmkLiteClient is only supported on Linux currently. It's not really feasible to do what it does manually (since the library code also needs to understand that it is running in 'lite' mode) so I'm afraid that your only option for deployment on Windows is to:

    1.    Install the TimesTen client software (you can use the -batch option to the installer to do this in automated fashion).

    2.    Setup the necessary registry entries for any DSNs etc. You can do this once then create a .reg file to use on other systems.

    3.    Make sure that the native library path is properly set in Tomcat (as you have already discovered).

    Not ideal I know but that is pretty much the only option at present. If you want the ttmkLiteClient functionality on Windows please contact Oracle Support and ask them to log an enhancement request.

    Chris

    42284284228428
Sign In or Register to comment.