Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Vanishing JNI

 
AS Morgan
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
AS Morgan
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic