on 2011 Aug 30 8:21 AM
Hi!
I just started using SQL anywhere on Ubuntu x64 platform. I've made a simple connecting java program using JConnect driver. Worked fine. After that I wanted to try JDBC driver but I got stuck.
I use eclipse IDE, I included the sajdbc.jar to classpath, set the native library location to "/opt/sqlanywhere12/lib64" (default installation location) and I get the following error: "java.lang.UnsatisfiedLinkError: /opt/sqlanywhere12/lib64/libdbjdbc12.so: libdbtasks12_r.so: Cannot open shared object file: No such file or directory."
So...I think java found the native library location, loaded the libdbjdbc.so in which there is a link to libdbtasks12_r.so and java cannot find this library. The problem is that this libdbtasks12_r.so sits next to libdbjdbc12.so in the same folder.
My question is of course: what do i do wrong or is this a bug?
Thanks for your answers!
The SQL Anywhere JDBC driver (sajdbc.jar) requires the native library (libdbjdbc12.so) to be present in the (library) system path for Java, which is loaded out of the LD_LIBRARY_PATH environment information on Linux.
A quick reminder that the original libdbjdbc12.so file is actually a symbolic link to the real file, along with the libdbtasks12_r.so file:
lrwxrwxrwx. 1 root root 16 Apr 12 14:38 libdbjdbc12.so -> libdbjdbc12.so.1 -r-xr-xr-x. 1 root root 2398832 Apr 12 14:38 libdbjdbc12.so.1 lrwxrwxrwx. 1 root root 19 Apr 12 14:38 libdbtasks12_r.so -> libdbtasks12_r.so.1 -r-xr-xr-x. 1 root root 99688 Apr 12 14:38 libdbtasks12_r.so.1
Is your LD_LIBRARY_PATH set up correctly, and have you set up the symbolic links to the related files as shown above?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your answer, i missed this step i thought it's enough to give eclipse the native library path.
User | Count |
---|---|
69 | |
9 | |
8 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.