on 2022 Oct 17 7:20 AM
I have an SQLAnywhere17 database running and can connect via SQLCentral, but Tomcat cannot connect because of missing dbjdbc17. The error message is java.lang.UnsatisfiedLinkError: no dbjdbc17 in java.library.path: /Applications/SQLAnywhere17/System/lib64 which is the directory that contains libdbjdbc17.dylib. sajdbc4.jar is in the catalina_home /lib folder and the Java/Extensions folder. I have set the system environment variable DYLD_LIBRARY_PATH to point to the lib64 folder (this is handled by sa_config.sh). I have verified the java.library.path is pointing to both the sajdbc4.jar and the associated dylib files. The SAP help portal page says that the java.library.path must contain the full path to libdbjdbc.dylib, but that file does not exist. I tried removing the 17 from the file name (to match the example) but this did not resolve anything- I'm pretty sure that's a misprint on the help portal page. I just don't know why the native library is invisible- I've triple checked the directory paths for any mistyping, the files are all in the right directories and the error message explicitly says it is looking at the right directory. I would love to know what I can do to understand why the link error occurs. If it matters, this is happening on an M1 mac however the tomcat installation, the JRE and SQLAnywhere are all x64 versions.
It is a misprint. If you look elsewhere in the documentation, it is libdbjdbc17.dylib. You did not mention the SQLANY17 environment variable. It is essential that this be set and point to your SQL Anywhere install root.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The problem is that a security update in macOS will not allow use of $DYLD_LIBRARY_PATH unless the parameter com.apple.security.cs.allow-dyld-environment-variables has been set to true. This meant that the sa_config shell script was not able to create its environment variables. I switched to using the pure java driver in jconn4.jar and that is working, so I am going to go with that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As I mentioned, the setting of SQLANY17 is important. It is used by the SQL Anywhere software file location resolution gear as one of the techniques for locating libs and res files. Did you give that a shot?
if i echo $SQLANY17 I correctly see /Applications/SQLAnywhere17/System which contains the lib64 folder. The libdbjdbc17.dylib and other required dylib files are in that folder (All that were included with SQLAnywhere installation). The UnsatisfiedLinkError shows the path to the folder, but indicates dbjdbc17 is not found.
User | Count |
---|---|
67 | |
11 | |
10 | |
10 | |
9 | |
9 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.