On 8/8/2012 6:06 AM, CHRISTOS STAVRINOU wrote:
Problem with tomcat 7 and java ld_library_path under centos 6 using
IANYWHERE JDBC DRIVER
At what path I must copy the file dbjodbc12.so? What is the correct
configuration?
How I can configure the java.library.path under under centos 6 and
tomcat 7 in order to fix the problem?
Please help me. If you have any answers please email me to
stavr...@gmail.com
Thanks in advance
The connection string is as follows:
"jdbc:ianywhere:driver=libdbodbc12.so;ENG=host;DBN=database"
But when running the program, I get the following exception (with the
relevant stack trace) -
Exception in thread "main" java.lang.UnsatisfiedLinkError: no
dbjodbc12 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1030)
at ianywhere.ml.jdbcodbc.IDriver.try_load(IDriver.java:247)
at ianywhere.ml.jdbcodbc.IDriver.<clinit>(IDriver.java:216)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
I just did a quick yum search on a CentOS 6 machine, and I guess you're
running a self-installed version of Tomcat 7 from tomcat.apache.org.
If that's the case, you can do the following to add to your
java.library.path.
1. Create a file called setenv.sh in $CATALINA_BASE/bin
2. Add the following lines
JAVA_OPTS="-Djava.library.path=directory-with-libdbodbc12.so"
export JAVA_OPTS
3. Restart Tomcat
Technically you could place this in CATALINA_OPTS instead, and the path
would only be available to Tomcat (and not the separate shutdown JVM).
For memory parameters, this is important. For java.library.path,
probably not as much.
If you've installed Tomcat 7 from a third party RPM, then you'll have to
find the bin directory and create the file as above. Hopefully the
packager didn't alter catalina.sh so that it doesn't parse setenv.sh.
I've not tried this since I use pure Java drivers for databases, and
have not used this database. I do load the APR native library this way.
. . . . just my 2 cents.
/mde/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org