wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Vanishing JNI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Vanishing JNI" Watch "Vanishing JNI" New topic
Author

Vanishing JNI

AS Morgan
Greenhorn

Joined: Sep 11, 2007
Posts: 2
We're using the Lindo API (math optimizer) as a shared/lib jar in Tomcat 5.0.28 under RedHat (2.6.9-5). The jar itself is a JNI wrapper for the engine.

It works fine, for a time. Intermittently, and at fairly random intervals, attempts to reference classes from that jar throw an ERROR "no lindojni in java.library.path". No exception is generated, even with X:checkjni enabled. It just sort of stops answering the phone. It may run without problems for a week, then die. Maybe next time its a day.

Suggestions?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

We have to use some JNI stuff where I work and we've seen flaky behavior if we try to either do a hot deploy or if we stop and start and individual application without a clean restart of Tomcat (and thus the entire JVM).

Are you doing any of these things?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
AS Morgan
Greenhorn

Joined: Sep 11, 2007
Posts: 2
We always do a full Tomcat restart for other reasons related mostly to some poor initial design choices. We do hot swaps of JSPs, but that's it.

That being said, there was a script that would restart tomcat via shutdown/startup, but didn't wait for the shutdown to finish. When we tried using this script, we got the same behavior from the JNI library.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Vanishing JNI