Hi All

I would like to connect the Oracle Data Modeler V 3.3 to the SQL Anywhere 12 database. But none of the JDBC drivers I tried worked, i. e. jconn3.jar, sajdbc4.jar, and sajdbc.jar. Is there anyone who is using this tool and was able to make a connection to SQL Anywhere 12? I am on OS X Mountain Lion (10.8), but it's not actually a platform specific problem. And yes, I know it may look like strange pairing for some, but Oracle Data Modeler is beside other qualities working on Macs, and PowerBuilder (unfortunatly) not. Sometimes I saw a reference to a jconn4.jar JDBC driver file, but I could not find it in my SQL Anywhere installation.

Thanks in advance, Robert

asked 17 Apr '13, 03:23

robert's gravatar image

robert
593333950
accept rate: 0%

edited 18 Apr '13, 13:55

Mark%20Culp's gravatar image

Mark Culp
23.4k9132275

Don't have any clues, however, as to the jConnect driver - cf. the docs:

The jConnect driver is available as a separate download at http://www.sybase.com/products/allproductsa-z/softwaredeveloperkit/jconnect. Documentation for jConnect can also be found on the same page.

(17 Apr '13, 04:37) Volker Barth

Thanks Volker for the hint. I studied that as well. I have still no clear picture for what situations the JConnect driver would be useful, and is it still useful these days. It looks to me something rather old, but may be I am completely wrong. It also seems quite complicated, whereas with the jconn3.jar file I just can move it to some place and it works (except with the Oracle Data Modeler). Do you use teh jconn3.jar file? Are you aware of the jconn4.jar file? And what is it, if it really exists?

Regards, Robert

(17 Apr '13, 08:08) robert

Can you provide more details on "they didn't work"? What errors were returned, what connect string were you using, ...

Can other Java apps on the same machine use any of the JDBC drivers you mention to connect to a SQL Anywhere 12 database?

(17 Apr '13, 08:29) Reg Domaratzki

JConnect is the name of the driver. jconn3.jar and jconn4.jar are both JConnect.

Is the ODM giving you any error messages that we could use to track down the problem?

(17 Apr '13, 10:14) Jonathan Baker

In Oracle Data Modeler, I have to point to the JDBC driver file, i. e. make an entry as: /Library/Java/Extensions/jconn3.jar

Then, when connecting, I have to fake and select the SQL Server tab to get a dialog (screen) where I can only enter: username, password, host, and database port number.

The error I get is:

Status : Failure -Test failed: I/O Error: DB server closed connection.

which seems to say that the database is actually seen but can't be accessed correctly. What do you think?

(18 Apr '13, 05:16) robert

@Jonathan: I can find the jconn3.jar file in may SQL Anywhere 12 installation, but not the jconn4.jar (OS X 10.8.3). Any idea why this is missing in the installation? And what is the difference between jconn3.jar and jconn4.jar?

(18 Apr '13, 06:56) robert
More comments hidden
showing 5 of 6 show all flat view

Yes, jConnect is still 'current' and 'supported'. It is our supported 'Type-4' ("pure Java") JDBC driver, whereas SQL Anywhere JDBC (SAJDBC) is a mixed managed and native ('Type-2') driver. You are required to source the native libraries in the java.library.path JVM value in order for the SAJDBC driver to work correctly.

--

Yes - I could connect using this tool without issue over jConnect 6.05 / SAJDBC 12.0.1.3873. Here is what I tried:

  • Java 1.7u11 JRE
  • Oracle Data Modeler 3.3
  • jConnect 6.05 (%SQLANY12%\java\jconn3.jar)
  • SAJDBC4 12.0.1.3873 (%SQLANY12%\java\sajdbc4.jar)

Reproducible Steps:

  • Start the SQL Anywhere 12 Demo Database
  • Start Oracle Data Modeler (ODM)
  • In ODM, go to Tools -> Preferences, Data Modeller -> Third Party JDBC Drivers

For jConnect:

  • [+] - Browse to 'C:\Program Files\SQL Anywhere 12\java\jconn3.jar'. [OK]
  • Restart Oracle Data Modeller
  • File -> Import -> Data Dictionary...
  • Add
    • Connection Name: SQL Anywhere 12 Demo - JCONNECT
    • Username: dba
    • Password: sql
    • [ JDBC ] Tab
    • (*) Other ThirdParty Driver
    • JDBC URL: jdbc:sybase:Tds:localhost:2638
    • Driver Class: com.sybase.jdbc3.jdbc.SybDriver
    • [Connect], ensure it is successful. Highlight the connection, click 'Next'.
  • Check 'GROUPO' for the tables to import, check off tables and views you would like to Import, click 'Next'
  • Click 'Merge' - the tables will import into your default Relational Model.

For SAJDBC4:

I need to first shut down ODM and include the SAJDBC4 native library directory in the '\datamodeler\bin\datamodeler[64].conf' file. Without doing this, you will see the exception no dbjdbc found in java.library.path each time you try to connect with this driver. Here is the line I added to my configuration:

AddVMOption -Djava.library.path=c:\Program Files\SQL Anywhere 12\bin64;%ORACLE_HOME%;%PATH%

Then:

  • [+] - Browse to 'C:\Program Files\SQL Anywhere 12\java\sajdbc4.jar'. [OK]
  • Restart Oracle Data Modeller
  • File -> Import -> Data Dictionary...
  • Add
    • Connection Name: SQL Anywhere 12 Demo - SAJDBC4
    • Username: dba
    • Password: sql
    • [ JDBC ] Tab
    • (*) Other ThirdParty Driver
    • JDBC URL: jdbc:sqlanywhere:DSN=SQL Anywhere 12 Demo
    • Driver Class: sybase.jdbc4.sqlanywhere.IDriver
    • [Connect], ensure it is successful. Highlight the connection, click 'Next'
  • ...

How far can you get in this connection configuration sequence, and which errors do you see when you get stuck?

permanent link

answered 17 Apr '13, 13:55

Jeff%20Albion's gravatar image

Jeff Albion
10.7k171174
accept rate: 24%

edited 18 Apr '13, 13:34

Great news! By "your require to source" you mean something like the installer says, i. e. source "/<path-to-sql anywhere="" 12="" folder="">/System/bin32/sa_config.sh" in my case: source "/Library/SQLAnywhere12/System/bin32/sa_config.sh" Have you got any idea if this is working with Java 6 as well? I have currently only Java 6 installed, version build 1.6.0_43, but could install Java 7. You did your tests on Windows?

Currently, the problem is, I do not get the JDBC Tab, so I can't enter the data. But I have no idea, under what circumstances the JDBC Tab will appear?

(18 Apr '13, 10:07) robert
Replies hidden
1

By "your require to source" you mean something like the installer says, i. e. source "/<path-to-sql anywhere="" 12="" folder="">/System/bin32/sa_config.sh" in my case: source "/Library/SQLAnywhere12/System/bin32/sa_config.sh"

For the SAJDBC driver to use normal JDBC applications on Mac OS X, yes, you need to add the native JDBC libraries ( *.dylib - http://dcx.sybase.com/index.html#1201/en/dbprogramming/jdbc-driver-deploy.html ) to a locatable path in DYLD_LIBRARY_PATH ( http://dcx.sybase.com/index.html#1201/en/dbadmin/dyld-library-path-environment-variable.html ) - this environment variable value will be set as the default JVM value for the java.library.path. This environment variable is set as part of the sa_config.sh script.

However, I found (at least on Windows) that the Oracle Data Modeller is setting its own library path outside of the default JVM library path before it launches - I think it may have something to do with the Oracle Data Modeller attempting to source the native Oracle OCI libraries (for their JDBC driver).

Because of this reason, I described the requirement above to change the Oracle Data Modeller configuration file (datamodeler[64].conf) to add: -Djava.library.path= to the lib64 directory (or lib32 if you are running a 32-bit JVM).

Have you got any idea if this is working with Java 6 as well? I have currently only Java 6 installed, version build 1.6.0_43, but could install Java 7.

I believe this should work on Java 6 as well (as JDBC4 is also supported there). I just picked Java 7 as the JRE when Oracle Data Modeller first started up.

And what is the difference between jconn3.jar and jconn4.jar?

jconn3.jar is jConnect 6.05, and is a JDBC3 driver (Java 1.4-1.5). jconn4.jar is jConnect 7 and is a JDBC4 (1.6-1.7) driver.

Similarly for the SQL Anywhere JDBC driver (SAJDBC), we have jodbc.jar/jodbc4.jar (JDBC3 vs JDBC4), which were renamed to sajdbc.jar/sajdbc4.jar (JDBC3 vs. JDBC4) in version 12 (and later 11 EBFs).

Currently, the problem is, I do not get the JDBC Tab, so I can't enter the data. But I have no idea, under what circumstances the JDBC Tab will appear?

That question I can't really answer - I only have a Windows installation to currently test on, and the JDBC tab is definitely there in the Windows version of the Oracle Data Modeller 3.3. Maybe you can ask about this particular issue on an Oracle forum?

I see [Oracle] and [JDBC] as the two option tabs on this "Add Connection" menu. Selecting [JDBC] allows me to select (*) Other ThirdParty Driver and set the appropriate JDBC driver options. If you aren't currently making this selection, then yes, it's quite likely you aren't using the correct SQL Anywhere JDBC driver and will not be able to connect to a SQL Anywhere database.

(18 Apr '13, 13:24) Jeff Albion

Jeff

I tried all you described but unfortunatly with no success. Problem remains I do not get this JDBC tab. Will ask in the Oracle forum. Would it be possible for you to send me your jconn3.jar and jconn4.jar files just to be sure these files are not the problem. I tried with the ones which came with the SQL Anywhere 12 installation. On Mac, there are in /Library/SQLAnywhere12/System/java/ (I installed the database at the /Library/SQLAnywhere12/ location)

(30 Apr '13, 03:53) robert

Here's what it looks like for me in Windows, if it helps at all - I'm not sure what it would look like on Mac.

Oracle Data Modeller 3.3 - Windows x64

Would it be possible for you to send me your jconn3.jar and jconn4.jar files just to be sure these files are not the problem.

If you open a technical support case, yes, we can help verify that you have the correct jConnect files. - I have a feeling that this isn't your issue though. As mentioned, you can always get the original files here:

http://www.sybase.com/products/allproductsa-z/softwaredeveloperkit/jconnect

For this error, I really think you need to properly configure the JDBC driver from within the Oracle Data Modeller. I didn't need to do anything special once the configuration was properly added.

(30 Apr '13, 15:39) Jeff Albion

I just miss the JDBC tab. I can get a SQL Server tab, when I install the MS SQL Server JDBC driver, but do not get the JDBC tab when putting the jconn3.jar file in the same folder.

It looks like this on OS X. alt text

(01 May '13, 06:21) robert
Replies hidden

Yes, it looks like you will have to ask Oracle about this situation further - like I said, I can definitely confirm this combination works on Windows with the proper configuration.

I do have a hypothesis though: Have you installed the ODBC Administrator Tool for Mac OS X yet? I seem to recall reading somewhere that Mac OS X doesn't have an ODBC Driver Manager installed by default any more - perhaps the Oracle software is looking for an installed ODBC Driver Manager before it enables the JDBC-ODBC bridge dialog screen?

(01 May '13, 06:55) Jeff Albion

With the Oracle Data Modeler Version 4.0 (Early Access) everything works, as I now get the JDBC tab which was missing in version 3.3. The Data Modeler I refer to can be found here:

http://www.oracle.com/technetwork/developer-tools/datamodeler/downloads/datamodeler-4ea-downloads-1988443.html

(18 Sep '13, 05:27) robert
showing 5 of 7 show all flat view

Hi Jeff

Coming back to this thread, I download the ASE trial from SAP Marketplace and found there in the folder jConnect-16_0 > classes the jconn4.jar file I was looking for as mentioned elsewhere on this forum. I could get ODM to work with this jconn4.jar driver. Bur, I would very much like to get it to work with the SQL Anywhere 16 native sajdbc4.jar driver. I put the sajdbc4.jar file at the same place as the jconn4.jar file, i. e. at /Library/Java/Extensions/ but get the attached error message 1. If I put all the files mentioned here: http://dcx.sybase.com/index.html#sa160/en/dbprogramming/jdbc-client-deploy.html in the same place as the sajdbc4.jar file, I get the error as seen in error message 2.

Best regards, Robert

PS: By the way, do you know if running the database with jconn4.jar is faster than with conn3.jar?

alt text

alt text

permanent link

answered 28 Sep '15, 03:36

robert's gravatar image

robert
593333950
accept rate: 0%

Hi Robert,

Did you edit the '\datamodeler\bin\datamodeler[64].conf' file to include the library path for the libdbjdbc16.dylib and all of the associated files? It looks like some of the required SAJDBC files (lidbtasks16_r.dylib specifically) can't be found.

By the way, do you know if running the database with jconn4.jar is faster than with conn3.jar?

jconn3.jar vs. jconn4.jar is really a matter of which version of JDBC you're using (JDBC 3.0 vs. JDBC 4.0) and which version of jConnect you're using (jConnect 6.x vs. jConnect 7.x). Underneath the covers, the code is still largely the same between the two so I would doubt there would be any significant speed advantage between the two.

SAJDBC (sajdbc4.jar) vs jConnect though (jconn4.jar), SAJDBC is typically faster because of the native layer, which is the advantage to deploying the native files and altering the system path of the application to use them instead.

(28 Sep '15, 10:36) Jeff Albion

Hi Jeff

I am on OS X 10.10.5. There is no '\datamodeler\bin\datamodeler[64].conf' file. May be some plist file. Problem is, I have an Application Server (Servoy/TomCat), an IDE Eclipse with Servoy plugin, and Oracle Data Modeler. Because I don't know the steps where to put the (driver) files and I also seem not be able to find them somewhere, I can't get my environment to work. On the other hand, it should not be so difficult, should it.

Any idea?

Best regards Robert

(28 Sep '15, 17:25) robert
Replies hidden

Hmmm... the SAJDBC driver worked fine with the Data Modeler on Windows for myself, as I described above. All I needed to do was alter the system path for the Oracle Data Modeler environment.

This document from Oracle:

http://www.oracle.com/technetwork/developer-tools/datamodeler/downloads/data-modeler-relnotes-v402-2195461.html

suggests that the datamodeler.conf file should be common across Windows, Linux and Mac OS X. So, perhaps you can review the files you downloaded and see if the file is listed...?

(29 Sep '15, 10:57) Jeff Albion

Hi Jeff

Leaving the ODM discussion, how can I connect to the SQL Anywhere 16 database with the sajdbc4.jar driver (generally spoken). I just can't seem to find a step by step instruction on how to connect to the database. Putting the sajdbc4.jar file to the same place (in the file system) as jconn4.jar is not sufficient. The question is which files to put where (on OS X)? Any hint?

Thanks in advance Robert

(05 Oct '15, 10:46) robert
Replies hidden

So there are two pieces to the "Type-2 (Mixed Mode)" SAJDBC driver (i.e. sajdbc4.jar managed driver plus the *.dylib native files), versus just one piece for the "Type-4 (Pure Java)" jConnect driver (i.e. just the managed jconn4.jar file).

When Java loads a .JAR file, it always loads it from the CLASSPATH. This is an environment variable set in the Java application environment or as part of a -cp argument to the Java executable. So for both .JAR files, you need to ensure they would appear in the CLASSPATH for the Java application. This is why both .JAR files can appear side-by-side and can get loaded similarly.


For the SAJDBC ("Type 2") driver however, there are also native compiled files that also need to be deployed and referenced by the Java process. It sounds like this is the piece you're having issues with...

On Windows, the native files are .DLL, on Linux .SO, and on Mac OS X, .DYLIB files and are listed in the documentation here.

Similar to JAR files, Java loads the native library location information from the application environment. However, instead of the CLASSPATH environment variable, Java uses the native library paths of the environment to determine the location of the native files - this value is then provided as the java.library.path value to Java.

How the java.library.path value is determined separately on each OS:

On all of the Linux, Mac OS X, and UNIX distributions, there is a /bin32/sa_config.(c)sh file with SQL Anywhere that automatically will set these values for the environment. So to source the native files correctly for the Java process, you need to either:

  1. Alter the environment variable from where Java launches from (which will pick up the environment variables) - i.e. source the script, then run Java:

    . $SQLANY16/bin64/sa_config.sh

    java ...

  2. Alter the Java launcher command line: java -Djava.library.path=/native/path/to/add ...


Because of the potential difficulty to source the environment for the Oracle Data Modeller, this is why I recommended the alteration of the datamodeler.conf file above to add:

AddVMOption -Djava.library.path=/native/path/to/add/...

as this would modify the native path to include the .DYLIB required files (or .DLL on Windows, as I had showed earlier).

When sourcing the native libraries, be sure to match native bitness of the libraries to the bitness of the Java process (i.e. 32-bit to .../lib32 or 64-bit to .../lib64).

(05 Oct '15, 12:29) Jeff Albion

Hi Jeff

Thanks a lot for your detailed information. It is very appreciated. I did apply your suggestions to the start of my application server (Servoy Server based on TomCat).

The startup shell script looks like follows. I added the part: -Djava.library.path=/Applications/SQLAnywhere16/System/lib64 as you mention.

#!/bin/sh

if [ -z "$CMD_LINE_START" ]; then
    CMD_LINE_START="java"
fi

while true
do
    $CMD_LINE_START -Djava.awt.headless=true -Djava.library.path=/Applications/SQLAnywhere16/System/lib64 -Xmx1280m -Xms256m -classpath .:lib/activation.jar:lib/antlr.jar:lib/apache-mime4j.jar:lib/BrowserLauncher2.jar:lib/commons-codec.jar:lib/commons-collections.jar:lib/commons-dbcp.jar:lib/commons-fileupload.jar:lib/commons-io.jar:lib/commons-logging.jar:lib/commons-pool.jar:lib/dom4j.jar:lib/hibernate3.jar:lib/httpclient.jar:lib/httpclient-cache.jar:lib/httpcore.jar:lib/httpmime.jar:lib/j2db.jar:lib/j2dbdev.jar:lib/jabsorb.jar:lib/xstream.jar:lib/javassist.jar:lib/jcifs.jar:lib/joda-time.jar:lib/js.jar:lib/jta.jar:lib/jug.jar:lib/log4j.jar:lib/mail.jar:lib/MRJAdapter.jar:lib/networktnl.jar:lib/rmitnl.jar:lib/server-bootstrap.jar:lib/servlet-api.jar:lib/slf4j-api.jar:lib/slf4j-log4j.jar:lib/wicket.jar:lib/wicket-calendar.jar:lib/wicket-extentions.jar:lib/wiquery.jar:lib/fs-parser.jar:lib/fs-commons.jar:lib/minis.jar:lib/PBKDF2.jar:lib/prompt.jar com.servoy.j2db.server.main.ApplicationServer "$@" 1>> server.log 2>> server.log
    EXITCODE=$?
    if [ "$EXITCODE" != 99 ] && [ "x$EXITCODE" != "x$ADDITIONAL_RESTART_CODE" ]; then exit $EXITCODE; fi
done

I get the following error:

Exception in thread "pool-1-thread-1" java.lang.UnsatisfiedLinkError: /Applications/SQLAnywhere16/System/lib64/libdbjdbc16.dylib: dlopen(/Applications/SQLAnywhere16/System/lib64/libdbjdbc16.dylib, 1): Library not loaded: libdbtasks16_r.dylib
  Referenced from: /Applications/SQLAnywhere16/System/lib64/libdbjdbc16.dylib
  Reason: image not found
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1854)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1122)
    at sybase.jdbc4.sqlanywhere.IDriver.try_load(IDriver.java:487)
    at sybase.jdbc4.sqlanywhere.IDriver.<clinit>(IDriver.java:425)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at java.lang.Class.newInstance(Class.java:442)
    at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
    at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
    at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
    at java.sql.DriverManager$2.run(DriverManager.java:603)
    at java.sql.DriverManager$2.run(DriverManager.java:583)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.sql.DriverManager.loadInitialDrivers(DriverManager.java:583)
    at java.sql.DriverManager.<clinit>(DriverManager.java:101)
    at com.sybase.jdbc4.jdbc.SybDriver.registerWithDriverManager(SybDriver.java:708)
    at com.sybase.jdbc4.jdbc.SybDriver.<init>(SybDriver.java:139)
    at com.sybase.jdbc4.jdbc.SybDriver.<clinit>(SybDriver.java:103)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

...

The mentioned files are all in the folder /Applications/SQLAnywhere16/System/lib64/

(07 Oct '15, 09:35) robert
Replies hidden

Hi Robert,

Is this a full install of SQL Anywhere or just a client deployment? If a deployment, how was the client deployed? Can you try opening a Terminal and running the following commands:

Confirm that these are 64-bit binaries deployed:

file /Applications/SQLAnywhere16/System/lib64/libdbjdbc16.dylib
file /Applications/SQLAnywhere16/System/lib64/libdbtasks16_r.dylib

Confirm library linkages for each library:

otool -L /Applications/SQLAnywhere16/System/lib64/libdbjdbc16.dylib
otool -L /Applications/SQLAnywhere16/System/lib64/libdbtasks16_r.dylib

Are there any missing libraries mentioned?

Can you confirm that this is a 64-bit java process and not 32-bit?

file `which java`
(07 Oct '15, 13:23) Jeff Albion

Hi Jeff

This is a full install of SQL Anywhere 16 (Developer Edition). There are no mentioned libraries missing. The 5 mentioned libraries and the language file are in place, at /lib64 and /res. And yes, it is a 64-bit java process.

Following the results of your commands in the terminal:

Roberts-MacBook-Pro:~ robert$ file /Applications/SQLAnywhere16/System/lib64/libdbjdbc16.dylib /Applications/SQLAnywhere16/System/lib64/libdbjdbc16.dylib: Mach-O 64-bit dynamically linked shared library x86_64 Roberts-MacBook-Pro:~ robert$ file /Applications/SQLAnywhere16/System/lib64/libdbtasks16_r.dylib /Applications/SQLAnywhere16/System/lib64/libdbtasks16_r.dylib: Mach-O 64-bit dynamically linked shared library x86_64 Roberts-MacBook-Pro:~ robert$ otool -L /Applications/SQLAnywhere16/System/lib64/libdbjdbc16.dylib /Applications/SQLAnywhere16/System/lib64/libdbjdbc16.dylib: libdbjdbc16.dylib (compatibility version 0.0.0, current version 0.0.0) libdbtasks16_r.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 60.0.0) Roberts-MacBook-Pro:~ robert$ otool -L /Applications/SQLAnywhere16/System/lib64/libdbtasks16_r.dylib /Applications/SQLAnywhere16/System/lib64/libdbtasks16_r.dylib: libdbtasks16_r.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 60.0.0) Roberts-MacBook-Pro:~ robert$ file which java /usr/bin/java: Mach-O universal binary with 2 architectures /usr/bin/java (for architecture i386): Mach-O executable i386 /usr/bin/java (for architecture x86_64): Mach-O 64-bit executable x86_64 Roberts-MacBook-Pro:~ robert$

(07 Oct '15, 13:43) robert
Replies hidden

Hmmm, that's very strange - can you also run dbversion against these files?

dbversion /Applications/SQLAnywhere16/System/lib64/libdbjdbc16.dylib
dbversion /Applications/SQLAnywhere16/System/lib64/libdbtasks16_r.dylib

We are wondering if perhaps /lib32 was getting loaded first via DYLD_LIBRARY_PATH - do you have that environment variable set on the system at all? (Although that shouldn't matter when you hard-code -Djava.library.path...)

Can you maybe run dtruss on the Java process to confirm where the dlopen() is getting its resources from?

(21 Oct '15, 12:02) Jeff Albion

Jeff, following the result for dbversion:

Roberts-MacBook-Pro:~ robert$ /Applications/SQLAnywhere16/System/bin64/dbversion /Applications/SQLAnywhere16/System/lib64/libdbjdbc16.dylib
SQL Anywhere Version Diagnostic Utility Version 16.0.0.2087
/Applications/SQLAnywhere16/System/lib64/libdbjdbc16.dylib: libdbjdbc16.dylib GA 16 0 0 2087 macosx 2015/02/20 00:50:54 posix 64 production
Roberts-MacBook-Pro:~ robert$ /Applications/SQLAnywhere16/System/bin64/dbversion /Applications/SQLAnywhere16/System/lib64/libdbtasks16_r.dylib
SQL Anywhere Version Diagnostic Utility Version 16.0.0.2087
/Applications/SQLAnywhere16/System/lib64/libdbtasks16_r.dylib: libdbtasks16_r.dylib GA 16 0 0 2087 macosx 2015/02/20 00:39:22 posix 64 production
Roberts-MacBook-Pro:~ robert$

I do not have set the environment variable DYLD_LIBRARY_PATH

Are you looking (with dtruss) for something like this?…

stat64("/Applications/Servoy/application_server/server/webapps/ROOT\0", 0x1248D6FA0, 0x0)         = 0 0
stat64("/Applications/Servoy/application_server/server/webapps/ROOT\0", 0x1248D6FA0, 0x0)        = 0 0
stat64("/Applications/Servoy/application_server/server/conf/context.xml\0", 0x1248D6FA0, 0x0)        = 0 0
stat64("/Applications/Servoy/application_server/server/conf/context.xml\0", 0x1248D7000, 0x0)        = 0 0
stat64("/Applications/Servoy/application_server/server/conf/web.xml\0", 0x1248D6FA0, 0x0)        = 0 0
stat64("/Applications/Servoy/application_server/server/conf/web.xml\0", 0x1248D7000, 0x0)        = 0 0
stat64("/Applications/Servoy/application_server/server/webapps/eastwood.war\0", 0x1248D6FA0, 0x0)        = 0 0
stat64("/Applications/Servoy/application_server/server/webapps/eastwood.war\0", 0x1248D6FA0, 0x0)        = 0 0
stat64("/Applications/Servoy/application_server/server/webapps/eastwood.war\0", 0x1248D7000, 0x0)        = 0 0
stat64("/Applications/Servoy/application_server/server/webapps/eastwood\0", 0x1248D6FA0, 0x0)        = 0 0
stat64("/Applications/Servoy/application_server/server/webapps/eastwood\0", 0x1248D6FA0, 0x0)        = 0 0
stat64("/Applications/Servoy/application_server/server/conf/context.xml\0", 0x1248D6FA0, 0x0)        = 0 0
stat64("/Applications/Servoy/application_server/server/conf/context.xml\0", 0x1248D7000, 0x0)        = 0 0
stat64("/Applications/Servoy/application_server/server/conf/web.xml\0", 0x1248D6FA0, 0x0)        = 0 0
stat64("/Applications/Servoy/application_server/server/conf/web.xml\0", 0x1248D7000, 0x0)        = 0 0
open_nocancel("/Applications/Servoy/application_server/server/webapps\0", 0x1100004, 0x4)        = 214 0
fstatfs64(0xD6, 0x1248D6BD8, 0x4)        = 0 0
getdirentries64(0xD6, 0x7FF9ADE2C800, 0x1000)        = 200 0
getdirentries64(0xD6, 0x7FF9ADE2C800, 0x1000)        = 0 0
close_nocancel(0xD6)         = 0 0

With many thanks, Robert

(23 Oct '15, 04:09) robert

Jeff

Did my results for dbversion help you to come a step further?

Robert

(05 Nov '15, 03:29) robert

Hi Robert,

Thanks for checking back and staying with this - unfortunately, no, your answers only puzzled me further. I was hoping for something more obvious.

I think the next step is for us to look at the 16.0.0.2087 developer edition on a Mac and see what happens when we try it. Other than a possible 32-to-64 bitness incompatibility between the libraries and Java, we don't really have an explanation for why the native libraries aren't working based on your answers.

(05 Nov '15, 17:37) Jeff Albion

Hi Jeff

Thank you. I try to support you as much as possible as I really would like to get the native JDBC Adaptor running. I also will install on a local OS X Machine the latest EBF and report back.

Thank you for your continued support on this.

Robert

(06 Nov '15, 13:06) robert

Hi Jeff

I applied the latest EBF, the SQL Anywhere 16 version is now 16.0.0.2087. Unfortunately, it still does not work. Have you found anything. Could you replicate it on your testing environment?

Thanks a lot for your feedback. Robert

(25 Nov '15, 07:23) robert
More comments hidden
showing 5 of 14 show all flat view

Hi Jeff

I got the reference where to find your mentioned datamodeler.conf file in OS X and added this line as you described (for sajdbc4.jar):

AddVMOption -Djava.library.path=/Applications/SQLAnywhere16/System/lib64;%ORACLE_HOME%;%PATH%

Now, in Oracle Data Modeler, I get the exact same error as with my Application Server, namely

alt text

Best regards, Robert

permanent link

answered 08 Oct '15, 11:20

robert's gravatar image

robert
593333950
accept rate: 0%

Unfortunately, java.library.path only affects the Java VM itself and not the system loader. What I mean is that when Java attempts to load libdbjdbc16.dylib, it uses java.library.path to find it. However, libdbjdbc16.dylib is linked against libdbtasks16_r.dylib, and java.library.path has no effect on finding that. So libdbjdbc16.dylib is likely getting loaded, but the system loader still cannot find libdbtasks16_r.dylib.

We are working on a fix to accommodate El Capitan's enhanced security model, which will also fix this problem for you. Meanwhile, you should be able to use install_name_tool to fix the libraries you have installed. The basic idea is to tell the loader that the path to libdbtasks16_r.dylib is a relative path, and then give it a set of paths to search. Here's a start, but you may need to expand on it a bit:

$ install_name_tool -change libdbtasks16_r.dylib @rpath/libdbtasks16_r.dylib libdbjdbc16.dylib
$ install_name_tool -add_rpath @loader_path libdbjdbc16.dylib

I believe after running those two commands, in addition to the java.library.path setting, java should be able to find libdbjdbc, and the system loader should be able to find libdbtasks.

If this does not work, run dtruss as before (with -f to follow all forked processes), and look for lines that contain libdbtasks and libdbjdbc. They should tell you where the system is looking for libraries.

permanent link

answered 30 Nov '15, 16:31

Phil%20Mitchell's gravatar image

Phil Mitchell
1.9k1831
accept rate: 27%

converted 30 Nov '15, 21:14

Hi Phil

Thanks a lot for explaining some details. In the meantime, I have installed SQL Anywhere 17, and completely uninstalled version 16 (running the uninstall.sh script). Having changed your commands to libdbtask17_r.dylib and so on, I have run your commands (using absolute paths). Now when connecting, I get following error:

alt text

This is strange because there is no SQL Anywhere 16 installed on this machine. Only SQL Anywhere 17.

(03 Dec '15, 11:10) robert
Replies hidden

Did you also update the jar files that Oracle Data Modeller is loading?

(04 Dec '15, 13:52) Phil Mitchell

Hi Phil

Sorry for my delay in answering. The error was – as you suspect – in a not updated jadbc4.jar file which was still the one from SQL Anywhere 16. After updating it, the error is gone, but it's still not working. May be it's the easiest to wait for the fix for El Capitan.

Best regards and merry christmas Robert

(23 Dec '15, 03:26) robert

Hi Phil

I would like to ask if you have any news about the above mentioned fix for the native driver for El Capitan?

Thanks, Robert

(07 Jul '16, 05:28) robert
Replies hidden

Robert, have you tried 17.0.4 on Mac OS X (if that is already available, I don't know...) - cf. the re-freshened doc set.

(07 Jul '16, 09:38) Volker Barth

Volker, yes I have tried 17.0.4:2066 on OS X. And yes, it's already available :-) But unfortunately still the same problem. It doesn't seem to be solved. Unfortunately.

(08 Jul '16, 04:39) robert

Hi All

I have now SQL Anywhere 17.0.4.2129 running on OS X 10.11.6 and tested the connection with the sajdbc.jar file again. I am not able to make a connection, either from within Eclipse nor from Data Modeler. It would be very helpful to hear about the current status from SAP.

Regards, Robert

(10 Jan, 09:25) robert
showing 4 of 7 show all flat view
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:

×67
×27
×24

question asked: 17 Apr '13, 03:23

question was seen: 12,194 times

last updated: 10 Jan, 09:25