Four Stars

Issue with general JDBC and sybase sqlanywhere 16

Hello,
I created a db connection with general JDBC and sybase sql anywhere 16 on my system : windows 2012R2.

I connect to the database only once and after I receive the following error message:
Echec de la connexion Vous devez modifier les paramètres de la base de données.
  java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: Native Library C:\Program Files\SQL Anywhere 16\Bin64\dbjdbc16.dll already loaded in another classloader
      at org.talend.core.model.metadata.builder.database.JDBCDriverLoader.getConnection(JDBCDriverLoader.java:164)
      at org.talend.core.model.metadata.builder.database.ExtractMetaDataUtils.connect(ExtractMetaDataUtils.java:1033)
      at org.talend.core.model.metadata.builder.database.ExtractMetaDataFromDataBase.testConnection(ExtractMetaDataFromDataBase.java:314)
      at org.talend.metadata.managment.repository.ManagerConnection.check(ManagerConnection.java:272)
      at org.talend.repository.ui.wizards.metadata.connection.database.DatabaseForm$31.runWithCancel(DatabaseForm.java:2648)
      at org.talend.repository.ui.wizards.metadata.connection.database.DatabaseForm$31.runWithCancel(DatabaseForm.java:1)
      at org.talend.repository.ui.dialog.AProgressMonitorDialogWithCancel$1.runnableWithCancel(AProgressMonitorDialogWithCancel.java:77)
      at org.talend.repository.ui.dialog.AProgressMonitorDialogWithCancel$ARunnableWithProgressCancel$1.call(AProgressMonitorDialogWithCancel.java:161)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
  Caused by: java.lang.UnsatisfiedLinkError: Native Library C:\Program Files\SQL Anywhere 16\Bin64\dbjdbc16.dll already loaded in another classloader
      at java.lang.ClassLoader.loadLibrary1(Unknown Source)
      at java.lang.ClassLoader.loadLibrary0(Unknown Source)
      at java.lang.ClassLoader.loadLibrary(Unknown Source)
      at java.lang.Runtime.loadLibrary0(Unknown Source)
      at java.lang.System.loadLibrary(Unknown Source)
      at sybase.jdbc4.sqlanywhere.IDriver.try_load(IDriver.java:483)
      at sybase.jdbc4.sqlanywhere.IDriver.<clinit>(IDriver.java:421)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Unknown Source)
      at org.talend.core.model.metadata.builder.database.JDBCDriverLoader.getDriver(JDBCDriverLoader.java:90)
      at org.talend.core.model.metadata.builder.database.JDBCDriverLoader.getConnection(JDBCDriverLoader.java:115)
      ... 9 more
What's wrong?
Please help, thanks.
Ben
3 REPLIES
Moderator

Re: Issue with general JDBC and sybase sqlanywhere 16

Hi bpat,
Have you tried to use ODBC connection to see if it works?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: Issue with general JDBC and sybase sqlanywhere 16

Hello Sabrina,

Thank you for your reply. I'm tried odbc connection with x64 driver, but I have many error, I have found post with problem in x64 odbc connection and I tried odbc connection with x86 driver and talend. Apparently problems have disappeared.  But I would connect to jdbc connection for test and I don't understand how to install and configure  java driver sybase sajdbc.jar, have you an idea to solve driver already loaded in another classloader ?
Best regards
Ben
One Star

Re: Issue with general JDBC and sybase sqlanywhere 16

Hello,
I tried the JDBC connection to sqlanywhere 16 and it is working when I use it in a Job, however it throws the error you mentioned when you do a Check connection in Metadata -> DB Connections. So go ahead and try this in a Job.