Tomcat occassionally failing to start jruby runtimes

We have some java jar files that we are using for a saml implementation
within jruby 1.7.10 under tomcat 7. To suppress logging we have a
logback.xml file in webapp classes directory. When the logback.xml file
in place sometimes when starting tomcat when jruby runtimes are starting
we get:

[JRuby-Rack-App-Init-1] INFO jruby.rack - An exception happened during
JRuby-Rack startup

load error: kryptcore – java.lang.NoClassDefFoundError:

— System

jruby 1.7.10 (1.9.3p392) 2014-01-09 c4ecd6b on Java HotSpot™ 64-Bit
Server VM 1.7.0_25-b15 [linux-amd64]

Time: 2014-01-22 19:20:44 +0000

Server: Apache Tomcat/7.0.42


— Context Init Parameters:

jruby.max.runtimes = 8

jruby.min.runtimes = 8 =

jruby.rack.logging = log4j

jruby.runtime.acquire.timeout = 10

public.root = /

rails.env = production

— Backtrace

LoadError: load error: kryptcore – java.lang.NoClassDefFoundError:

require at org/jruby/

(root) at

require at org/jruby/

(root) at

require at org/jruby/

(root) at

require at org/jruby/

(root) at

 load at org/jruby/

(root) at

require at org/jruby/

(root) at

require at org/jruby/

(root) at

require at org/jruby/

(root) at

require at org/jruby/

(root) at

 each at org/jruby/

(root) at

 each at org/jruby/

(root) at

(root) at

(root) at

require at org/jruby/

(root) at

require at org/jruby/

(root) at

(root) at

require at

We saw this before with jruby 1.7.8 while on our production servers.
Servers would randomly drop out. I thought it was because we were
the krypt-core gem so I’ve removed that and it actually seemed to be ok,
but now we are seeing the above again and I can’t seem to trace down
I was wondering if it is a low memory issue but I have plenty of free
memory so thats not it. I can restart tomcat and it’ll be fine. If I
it down and start it again it may or may not come up. We did not have
of these problem with 1.7.3. It is almost as if krypt-core that comes
jruby is sometimes not loading. Any ideas?

You haven’t explicitly enabled invokedynamic, have you? This sounds very
close to the NoClassDefFoundErrors generated by enabling invokedynamic
on too old of a JVM version.


We have but this is the version of java:

java version “1.7.0_25”

Java™ SE Runtime Environment (build 1.7.0_25-b15)

Java HotSpot™ 64-Bit Server VM (build 23.25-b01, mixed mode)

Actually let me correct this. I thought we had, but looks like someone
removed it. I’m putting it back.

With and without invokedynamic i still get the above error on and off.
cannot seem to consistently cause it to fail though. I’m at a loss as
what to look at for more information. It really sounds like because it also throws the
constant Krypt::ASN1::BOOLEAN error

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs