Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

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!

asked 30 Aug '11, 07:21

legezam's gravatar image

legezam
101339
accept rate: 0%


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?

permanent link

answered 30 Aug '11, 14:30

Jeff%20Albion's gravatar image

Jeff Albion
10.8k171175
accept rate: 25%

Thanks for your answer, i missed this step i thought it's enough to give eclipse the native library path.

(02 Sep '11, 07:25) legezam
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×86
×78

question asked: 30 Aug '11, 07:21

question was seen: 3,432 times

last updated: 02 Sep '11, 08:09