on 2023 Mar 01 10:22 AM
Good day for you!
When i try to connect to the database with sajdbc.jar driver i get error message "no dbjdbc17 in java.library.path: /Applications/SQLAnywhere17/System/lib64:...".
System.setProperty("java.library.path","/Applications/SQLAnywhere17/System/lib64/"); Connection con = DriverManager.getConnection( "jdbc:sqlanywhere:" + "UserID=dba;" + "Password=sql;" + "Host=127.0.0.1:2638;" + "ServerName=srvname;" + "DatabaseName=dbname;" );
This issue only in macos and linux. In windows the same code works perfectly.
echo $SQLANY17
/Applications/SQLAnywhere17/System
ls -l /Applications/SQLAnywhere17/System/lib64/ | grep libdbjdbc17
-r-xr-xr-x 1 user admin libdbjdbc17.dylib
Using jconn4.jar driver give the next error: "SQL Anywhere Error -103: Invalid user ID or password 010HA: The server denied your request to use the high-availability feature. Please reconfigure your database, or do not request a high-availability session."
Does anyone know how to solve this problems?
The error message "no dbjdbc17 in java.library.path" indicates that the Java Virtual Machine (JVM) is unable to locate the SQL Anywhere JDBC driver's native library. The native library is a platform-specific dynamic link library (DLL) or shared object file that provides the driver's native method implementation.
To resolve this issue, use the following command before initiating the connection to add the directory containing the native library to the JVM's library path:
System.setProperty("java.library.path", "/Applications/SQLAnywhere17/System/lib64/");
You may also try passing the library path as a command-line input to the JVM when launching it:
java -Djava.library.path=/Applications/SQLAnywhere17/System/lib64/ YourMainClass
If you continue to receive the "Invalid user ID or password" error while using the jconn4.jar driver, it is likely that the user ID or password you are using is wrong, or that the database server is not configured to support high-availability connections. You can try connecting to the database server with the same user ID and password that you use with other tools or clients. You may also look for any error messages linked to the high-availability functionality in the database server logs.
If you're still having problems, you may try contacting the SQL Anywhere JDBC driver's provider for assistance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
10 | |
10 | |
10 | |
10 | |
8 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.