Specifying java.library.path using Tomcat 5.5 as a Windows Service

2006-01-03 Thread Richard Toren
I want to move my webserver over to a Windows' service (it works great 
with linux, but the client is always insistent).  The problem is
that I use Berkeley DB XML which is used via JNI.  When I start tomcat 
using startTomcat.bat I need to add a line


   set JAVA_OPTS=-Djava.library.path=path

and then all works well.  The question is how to do this when using 
Tomcat installed with the Windows installer?
I can add a line for -Djava.library.path=;;; and it searches 
the path, but fails to initialize properly (log below).
Since I can get the same installation to work by adding the .bat files 
it must be something is different in the way libraries
are searched.  It may have something to do with the System.loadLibrary() 
call I don't make, but I'm not sure how to proceed
with it and I feel that I shouldn't have to make changes to my war files 
just to make my project compatible with Windows.


Thanks in advance,

Richard Toren

java.lang.UnsatisfiedLinkError: C:\Program Files\Sleepycat 
Software\Berkeley DB XML 2.2.13\bin\libdb_java43.dll: Can't find 
dependent libraries

at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.sleepycat.db.internal.db_javaJNI.clinit(db_javaJNI.java:34)
at com.sleepycat.db.internal.DbEnv.init(DbEnv.java:200)
at 
com.sleepycat.db.EnvironmentConfig.createEnvironment(EnvironmentConfig.java:738)
at 
com.sleepycat.db.EnvironmentConfig.openEnvironment(EnvironmentConfig.java:691)

at com.sleepycat.db.Environment.init(Environment.java:30)





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Specifying java.library.path using Tomcat 5.5 as a Windows Service

2006-01-03 Thread Caldarale, Charles R
 From: Richard Toren [mailto:[EMAIL PROTECTED] 
 Subject: Specifying java.library.path using Tomcat 5.5 as a 
 Windows Service
 
 The question is how to do this when using 
 Tomcat installed with the Windows installer?

Use the Java tab of bin\tomcat5w.exe to set properties when running as a
service.

Watch out for access permission problems, since processes running as a
service usually use a generic account, not the one you installed Tomcat
(or 3rd-party libraries) with.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]