c-isam isopn error with Java JNI call
Posted in 1997
hi all, Does anybody use C-ISAM 7.1 with Java JNI? When I call isopen from JNI, it returns a -1. I checked the informix error message but it says nothing more about this error. so i decided to print out "errno" after the failed call. the errno = 14 which is "EFAULT" (bad address). check the "man page" of "open()" (equivalent to isopen, i guess), it says "The path parameter is an invalid address." The files I try to open can be "isopen"ed from a c or C++ calls w/o no problems at all. The platform is DEC Alpha running Digital UNIX 3.2D with JDK 1.02. But if I took the same C-ISAM files and Java code to DEC Alpha running Digital UNIX 4.0B with JDK 1.1, everything is fine. Could someone out there tell me what's my problem? If someone knows Informix tech support phone number or e-mail address, please pass them to me. The C-ISAM package we have does not come with a dynamic library. JNI requires a dynamic library. What I did is to create a symbolic link with the name "libisam.so" to the static library libisam.a. For somehow (I don't know the reason behind it), it works, I mean, JVM can find the correct function to load through that link at run time. :-) Thanks, David -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ David Yuan MCI Telecommunications Corporation 901 International Pkwy. || Office Number: 972 498 1129 Richardson, TX 75081 || FAX Number: 972 498 1040 http://win20.rch.mci.com/~dyuan Want to know my public key? Finger me :-) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~