JNI & Informix ESQL/C
Posted in 1998
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Java & JDBC Development
Has anybody managed to use Informix ESQL/C (Solaris 2.5.1) via the Java Native Interface (JNI)? I took the step-by-step JNI example that comes with the JDK Documentation (which I had built and run successfully) and replaced the "hello, world!" guts of it with EXEC SQL blocks to connect to a db server, open a database, and do a simple query. (I also added the various includes, etc.) I managed to create the shared object library ("libhello.so"), but when I run the program with the Java vm, I get the following error: ld.so.1: /home/java/jdk1.1.5/examples/../bin/../bin/sparc/green_threads/java: fatal relocation error: symbol not found: _iqconnect: referenced in ./libhello.so As near as I can tell, it looks as if there may be some funnies with trying to include ESQL/C library calls (e.g., "iqconnect") in a shared library. I added the various Informix libs (e.g., "libsql.a") to the creation of the .so, but to no avail. Any help would be appreciated. Thanks. -- Brad McFarlane Newbridge Networks Corp. Kanata, Ont., CANADA