The following FAQ may clarify the issue:
It deals with 11.0.1 but the same seems correct for v12 (other than the Xyz4.jar drivers support JDBC 4.0).
Here's a further link to an SQL Anywhere blog article from Jason Hinsperger:
answered 16 Apr '12, 07:07
Hi, I'm trying sajdbc4.jar on Linux with a very simple code launched by Eclipse IDE:
DriverManager.getConnection("jdbc:sqlanywhere:uid=xxx; pwd=xxx; eng=asa12dev; links=tcpip");
... but the following error occours:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/sqlanywhere12/lib64/libdbjdbc12.so.1: libdbtasks12_r.so: cannot open shared object file: No such file or directory
I've just added all required references to library path (/opt/sqlanywhere/lib64) .... and "libdbtasks12" library is included in that path !!
Any idea ? Thanks.
answered 16 Apr '12, 12:42
Hi Jeff, and thanks for replay ...
$ java -version java version "1.6.0_27" Java(TM) SE Runtime Environment (build 1.6.0_27-b07) Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode)
$ uname -a Linux XDev91 2.6.32-24-generic #39-Ubuntu SMP Wed Jul 28 05:14:15 UTC 2010 x86_64 GNU/Linux
You're right (... it's not taking into the local environment's library path ...), because in a production scenario all works fine .... but I've already set -Djava.library.path="/opt/sqlanywhere12/lib64" in the "Argument" tab of my Debug configuration. I've also tried to set "Native library location" in the sajdbc4.jar section managed by Java Build Path.
I already call '/bin64/sa_config.sh' script in my .bashrc ...
$ ldd ./libdbjdbc12.so.1 linux-vdso.so.1 => (0x00007fff0db12000) libdbtasks12_r.so => not found libpthread.so.0 => /lib/libpthread.so.0 (0x00007f8056be3000) libdl.so.2 => /lib/libdl.so.2 (0x00007f80569de000) libm.so.6 => /lib/libm.so.6 (0x00007f805675b000) libc.so.6 => /lib/libc.so.6 (0x00007f80563d8000) /lib64/ld-linux-x86-64.so.2 (0x00007f805727a000)
But libdbtasks12_r.so is in /opt/sqlanywhere12/lib64 !!!!
$ ldconfig -v | grep libdbtasks /sbin/ldconfig.real: Can't stat /lib/x86_64-linux-gnu: No such file or directory
... Boh :-( ... I'm confused ...
I've just completed some tests in a 32bit scenario (on the same previous 64bit OS): The following combo:
WORKS FINE. What about ? No one uses Java 64-bit software on Linux ?
answered 18 Apr '12, 07:56