<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Exception: no dbjdbc17 in java.library.path (in mac and linux only, windows works perfectly) in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/exception-no-dbjdbc17-in-java-library-path-in-mac-and-linux-only-windows/qaa-p/13834169#M4865012</link>
    <description>&lt;LI-CODE lang="sql"&gt;cat ~/.zshrc | grep sa_config&lt;/LI-CODE&gt;

&lt;P&gt;source /Applications/SQLAnywhere17/System/bin64/sa_config.sh&lt;/P&gt;
&lt;LI-CODE lang="sql"&gt;otool -L $SQLANY17/lib64/libdbjdbc17.dylib&lt;/LI-CODE&gt;

&lt;P&gt;/Applications/SQLAnywhere17/System/lib64/libdbjdbc17.dylib:
    @rpath/libdbjdbc17.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/libdbtasks17_r.dylib (compatibility version 0.0.0, current version 0.0.0)
    /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 800.6.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.0.0)&lt;/P&gt;
&lt;LI-CODE lang="sql"&gt;echo $LD_LIBRARY_PATH&lt;/LI-CODE&gt;

&lt;P&gt;/Applications/SQLAnywhere17/System/lib64:&lt;/P&gt;
&lt;LI-CODE lang="sql"&gt;String library_path = System.getProperty( "java.library.path" );
System.out.println("library_path = " + library_path);&lt;/LI-CODE&gt;

&lt;P&gt;library_path = /Applications/SQLAnywhere17/System/lib64:/Applications/SQLAnywhere17/System/lib64:/Users/mrjill/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Mar 2023 09:12:05 GMT</pubDate>
    <dc:creator>former_SQLA_member1694918</dc:creator>
    <dc:date>2023-03-06T09:12:05Z</dc:date>
    <item>
      <title>Exception: no dbjdbc17 in java.library.path (in mac and linux only, windows works perfectly)</title>
      <link>https://community.sap.com/t5/technology-q-a/exception-no-dbjdbc17-in-java-library-path-in-mac-and-linux-only-windows/qaq-p/13834162</link>
      <description>&lt;P&gt;Good day for you!&lt;/P&gt;
&lt;P&gt;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:...".&lt;/P&gt;
&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;System&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;setProperty&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"java.library.path"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"/Applications/SQLAnywhere17/System/lib64/"&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;

&lt;SPAN&gt;Connection&lt;/SPAN&gt; &lt;SPAN&gt;con&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;DriverManager&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;getConnection&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;
        &lt;SPAN&gt;"jdbc:sqlanywhere:"&lt;/SPAN&gt; &lt;SPAN&gt;+&lt;/SPAN&gt;
                &lt;SPAN&gt;"UserID=dba;"&lt;/SPAN&gt; &lt;SPAN&gt;+&lt;/SPAN&gt;
                &lt;SPAN&gt;"Password=sql;"&lt;/SPAN&gt; &lt;SPAN&gt;+&lt;/SPAN&gt;
                &lt;SPAN&gt;"Host=127.0.0.1:2638;"&lt;/SPAN&gt; &lt;SPAN&gt;+&lt;/SPAN&gt;
                &lt;SPAN&gt;"ServerName=srvname;"&lt;/SPAN&gt; &lt;SPAN&gt;+&lt;/SPAN&gt;
                &lt;SPAN&gt;"DatabaseName=dbname;"&lt;/SPAN&gt;
&lt;SPAN&gt;);&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;This issue only in macos and linux. In windows the same code works perfectly.&lt;/P&gt;
&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;/SPAN&gt;echo $SQLANY17
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;/Applications/SQLAnywhere17/System&lt;/P&gt;
&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;/SPAN&gt;ls -l /Applications/SQLAnywhere17/System/lib64/ | grep libdbjdbc17
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;-r-xr-xr-x 1 user admin libdbjdbc17.dylib&lt;/P&gt;
&lt;P&gt;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."&lt;/P&gt;
&lt;P&gt;Does anyone know how to solve this problems?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 10:22:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exception-no-dbjdbc17-in-java-library-path-in-mac-and-linux-only-windows/qaq-p/13834162</guid>
      <dc:creator>former_SQLA_member1694918</dc:creator>
      <dc:date>2023-03-01T10:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: Exception: no dbjdbc17 in java.library.path (in mac and linux only, windows works perfectly)</title>
      <link>https://community.sap.com/t5/technology-q-a/exception-no-dbjdbc17-in-java-library-path-in-mac-and-linux-only-windows/qaa-p/13834164#M4865007</link>
      <description>&lt;P&gt;If I source sa_config.sh, I am able to load the library. Otherwise, I see the behaviour that you report. There must be an environment element that must be defined - typically $SQLANY17 but I have tried that with no luck.  Note that on MacOS 10.11, the full path to the library must be used (as documented). Is there a reason to not use sa_config?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 11:49:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exception-no-dbjdbc17-in-java-library-path-in-mac-and-linux-only-windows/qaa-p/13834164#M4865007</guid>
      <dc:creator>chris_keating</dc:creator>
      <dc:date>2023-03-02T11:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: Exception: no dbjdbc17 in java.library.path (in mac and linux only, windows works perfectly)</title>
      <link>https://community.sap.com/t5/technology-q-a/exception-no-dbjdbc17-in-java-library-path-in-mac-and-linux-only-windows/qaa-p/13834165#M4865008</link>
      <description>&lt;P&gt;sa_config was called earlier. Unfortunately it doesn't help.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 03:22:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exception-no-dbjdbc17-in-java-library-path-in-mac-and-linux-only-windows/qaa-p/13834165#M4865008</guid>
      <dc:creator>former_SQLA_member1694918</dc:creator>
      <dc:date>2023-03-03T03:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: Exception: no dbjdbc17 in java.library.path (in mac and linux only, windows works perfectly)</title>
      <link>https://community.sap.com/t5/technology-q-a/exception-no-dbjdbc17-in-java-library-path-in-mac-and-linux-only-windows/qaa-p/13834166#M4865009</link>
      <description>&lt;P&gt;I have the same problem.. I want to make a report using BIRT (eclipse) and I get the same error. I'm working in macOS&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 10:03:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exception-no-dbjdbc17-in-java-library-path-in-mac-and-linux-only-windows/qaa-p/13834166#M4865009</guid>
      <dc:creator>mandres1</dc:creator>
      <dc:date>2023-03-03T10:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: Exception: no dbjdbc17 in java.library.path (in mac and linux only, windows works perfectly)</title>
      <link>https://community.sap.com/t5/technology-q-a/exception-no-dbjdbc17-in-java-library-path-in-mac-and-linux-only-windows/qaa-p/13834167#M4865010</link>
      <description>&lt;P&gt;If you have sourced the environment with sa_config.sh (assuming BASH), the java.library.path should not need to be changed (comment out that line).&lt;/P&gt;
&lt;P&gt;Can you check &lt;/P&gt;
&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;/SPAN&gt; ldd $SQLANY17/lib64/libdbjdbc17.so
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;to see if all shared objects are resolved?  &lt;/P&gt;
&lt;P&gt;and ensure that LD_LIBRARY_PATH is defined as per the sa_config. And also check in the java app by checking the value with:&lt;/P&gt;
&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;/SPAN&gt;System.getProperty( "java.library.path" );
&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 03 Mar 2023 13:48:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exception-no-dbjdbc17-in-java-library-path-in-mac-and-linux-only-windows/qaa-p/13834167#M4865010</guid>
      <dc:creator>chris_keating</dc:creator>
      <dc:date>2023-03-03T13:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: Exception: no dbjdbc17 in java.library.path (in mac and linux only, windows works perfectly)</title>
      <link>https://community.sap.com/t5/technology-q-a/exception-no-dbjdbc17-in-java-library-path-in-mac-and-linux-only-windows/qaa-p/13834168#M4865011</link>
      <description>&lt;P&gt;FWIW, do you mean the script has been "called" or really be "sourced", as that is an &lt;A href="https://superuser.com/questions/176783/what-is-the-difference-between-executing-a-bash-script-vs-sourcing-it"&gt;important difference&lt;/A&gt;?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 03:08:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exception-no-dbjdbc17-in-java-library-path-in-mac-and-linux-only-windows/qaa-p/13834168#M4865011</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2023-03-06T03:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: Exception: no dbjdbc17 in java.library.path (in mac and linux only, windows works perfectly)</title>
      <link>https://community.sap.com/t5/technology-q-a/exception-no-dbjdbc17-in-java-library-path-in-mac-and-linux-only-windows/qaa-p/13834169#M4865012</link>
      <description>&lt;LI-CODE lang="sql"&gt;cat ~/.zshrc | grep sa_config&lt;/LI-CODE&gt;

&lt;P&gt;source /Applications/SQLAnywhere17/System/bin64/sa_config.sh&lt;/P&gt;
&lt;LI-CODE lang="sql"&gt;otool -L $SQLANY17/lib64/libdbjdbc17.dylib&lt;/LI-CODE&gt;

&lt;P&gt;/Applications/SQLAnywhere17/System/lib64/libdbjdbc17.dylib:
    @rpath/libdbjdbc17.dylib (compatibility version 0.0.0, current version 0.0.0)
    @rpath/libdbtasks17_r.dylib (compatibility version 0.0.0, current version 0.0.0)
    /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 800.6.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.0.0)&lt;/P&gt;
&lt;LI-CODE lang="sql"&gt;echo $LD_LIBRARY_PATH&lt;/LI-CODE&gt;

&lt;P&gt;/Applications/SQLAnywhere17/System/lib64:&lt;/P&gt;
&lt;LI-CODE lang="sql"&gt;String library_path = System.getProperty( "java.library.path" );
System.out.println("library_path = " + library_path);&lt;/LI-CODE&gt;

&lt;P&gt;library_path = /Applications/SQLAnywhere17/System/lib64:/Applications/SQLAnywhere17/System/lib64:/Users/mrjill/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 09:12:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exception-no-dbjdbc17-in-java-library-path-in-mac-and-linux-only-windows/qaa-p/13834169#M4865012</guid>
      <dc:creator>former_SQLA_member1694918</dc:creator>
      <dc:date>2023-03-06T09:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: Exception: no dbjdbc17 in java.library.path (in mac and linux only, windows works perfectly)</title>
      <link>https://community.sap.com/t5/technology-q-a/exception-no-dbjdbc17-in-java-library-path-in-mac-and-linux-only-windows/qaa-p/13834163#M4865006</link>
      <description>&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;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:&lt;/P&gt;
&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;/SPAN&gt;System.setProperty("java.library.path", "/Applications/SQLAnywhere17/System/lib64/");
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;You may also try passing the library path as a command-line input to the JVM when launching it:&lt;/P&gt;
&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;/SPAN&gt;java -Djava.library.path=/Applications/SQLAnywhere17/System/lib64/ YourMainClass
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;If you're still having problems, you may try contacting the SQL Anywhere JDBC driver's provider for assistance.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 06:49:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exception-no-dbjdbc17-in-java-library-path-in-mac-and-linux-only-windows/qaa-p/13834163#M4865006</guid>
      <dc:creator>former_SQLA_member1694955</dc:creator>
      <dc:date>2023-03-15T06:49:53Z</dc:date>
    </item>
  </channel>
</rss>

