• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

catalina.out logging same error continuously until the var folder gets full

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I am working on CentOS 6 with tomcat version 6.0.24. Whenever I try to deploy my application on tomcat i get the following error in catalina.out

Illegal access: this web application instance has been stopped already. Could not load org.bouncycastle.crypto.modes.CBCBlockCipher. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1370)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1329)
at org.bouncycastle.jcajce.provider.symmetric.util.BaseBlockCipher.engineSetMode(Unknown Source)
at javax.crypto.Cipher$Transform.setModePadding(Cipher.java:357)
at javax.crypto.Cipher.chooseProvider(Cipher.java:847)
at javax.crypto.Cipher.init(Cipher.java:1348)
at sun.security.ssl.CipherBox.<init>(CipherBox.java:175)
at sun.security.ssl.CipherBox.newCipherBox(CipherBox.java:208)
at sun.security.ssl.CipherSuite$BulkCipher.newCipher(CipherSuite.java:467)
at sun.security.ssl.CipherSuite$BulkCipher.isAvailable(CipherSuite.java:507)
at sun.security.ssl.CipherSuite$BulkCipher.isAvailable(CipherSuite.java:485)
at sun.security.ssl.CipherSuite.isAvailable(CipherSuite.java:190)
at sun.security.ssl.SSLContextImpl.getApplicableCipherSuiteList(SSLContextImpl.java:342)
at sun.security.ssl.SSLContextImpl.getDefaultCipherSuiteList(SSLContextImpl.java:293)
at sun.security.ssl.SSLSocketImpl.init(SSLSocketImpl.java:576)
at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:494)
at sun.security.ssl.SSLServerSocketImpl.accept(SSLServerSocketImpl.java:313)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.acceptSocket(JSSESocketFactory.java:152)
at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:352)
at java.lang.Thread.run(Thread.java:722)

and then catalina.out starts logging the following error again and again until /var folder gets to 100%

Socket accept failed
java.lang.NoClassDefFoundError: org/bouncycastle/crypto/modes/CBCBlockCipher
at org.bouncycastle.jcajce.provider.symmetric.util.BaseBlockCipher.engineSetMode(Unknown Source)
at javax.crypto.Cipher$Transform.setModePadding(Cipher.java:357)
at javax.crypto.Cipher.chooseProvider(Cipher.java:847)
at javax.crypto.Cipher.init(Cipher.java:1348)
at sun.security.ssl.CipherBox.<init>(CipherBox.java:175)
at sun.security.ssl.CipherBox.newCipherBox(CipherBox.java:208)
at sun.security.ssl.CipherSuite$BulkCipher.newCipher(CipherSuite.java:467)
at sun.security.ssl.CipherSuite$BulkCipher.isAvailable(CipherSuite.java:507)
at sun.security.ssl.CipherSuite$BulkCipher.isAvailable(CipherSuite.java:485)
at sun.security.ssl.CipherSuite.isAvailable(CipherSuite.java:190)
at sun.security.ssl.SSLContextImpl.getApplicableCipherSuiteList(SSLContextImpl.java:342)
at sun.security.ssl.SSLContextImpl.getDefaultCipherSuiteList(SSLContextImpl.java:293)
at sun.security.ssl.SSLSocketImpl.init(SSLSocketImpl.java:576)
at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:494)
at sun.security.ssl.SSLServerSocketImpl.accept(SSLServerSocketImpl.java:313)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.acceptSocket(JSSESocketFactory.java:152)
at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:352)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassNotFoundException: org.bouncycastle.crypto.modes.CBCBlockCipher
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1484)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1329)
... 18 more

jdk version is 7u17
Kindly help. Thanks

 
Saloon Keeper
Posts: 25482
180
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Bhagyashree!

There's not enough information to be certain. The "application instance has been stopped already" message would lead me to suspect that you have a web application that was spawning threads in a manner that's inconsistent with J2EE's restrictions on multi-threading.

On the other hand, your stack traces seem to be mostly internal Tomcat functions, which would make me suspect that the web application is explicitly closing a data stream that should have been closed by Tomcat, instead.

Of course, it's possible that both (or neither) of these situations apply. If you could find us some more information we'll try again.
 
Bhagyashree Jog
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Tim,

The first exception trace is logged only once. The second exception (NoClassDefFoundError) is then logged continuously until the var folder gets full 100%. I found someone had faced a similar problem in some forum and the answer given there was that this seems to be a tomcat issue. But they were not entirely sure. My CentOS version is 6.2. Tomcat version is 6.0.24.
 
Tim Holloway
Saloon Keeper
Posts: 25482
180
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If this is actually a Tomcat problem, try upgrading to a newer version of Tomcat. There was some instability in versions earlier than 6.30, as I recall, although it never was a problem for me.

You could also try Tomcat 7. It's mostly compatible with Tomcat 6 webapps.

There aren't any issues I know of relative to your OS version. Although do make sure you're using the Sun/Oracle JDK to run Tomcat or at least a good commercial alternative like IBM's J9. The "Iced Tea" Java that comes bundled with Linux isn't really good enough for J2EE.
 
Bhagyashree Jog
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The issue seems to be resolved after upgrading to CentOS 6.5. I was earlier working on CentOS 6.2. Although I am baffled by this. Why should this happen?
 
Tim Holloway
Saloon Keeper
Posts: 25482
180
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think that there's that much difference between CentOS 6.2 and 6.5. Or even 5.10, as far as Tomcat goes.

More likely it was the JDK you were running with Tomcat. As I said earlier, there was a batch of flakey Tomcat 6 releases.
 
Bhagyashree Jog
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay, thanks for the input
 
Bhagyashree Jog
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay so I ran the java -version command on both machines:

On machine 1 : Issue is reproducible (CentOS 6.2, tomcat 6.0.24)
java -version
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)

On machine 2 : Issue is not reproducible (CentOS 6.4, tomcat 6.0.24)
java -version
java version "1.7.0_09-icedtea"
OpenJDK Runtime Environment (rhel-2.3.4.1.el6_3-x86_64)
OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)

Any explanations for this?
 
Tim Holloway
Saloon Keeper
Posts: 25482
180
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, you're more likely to have problems on machine 2. As I said, the "IcedTea" Java (which comes bundled with CentOS) is not always reliable when used with J2EE.

And you still seriously need to consider upgrading Tomcat to something newer. The current version 6 release is 6.0.43 and there were definitely problems with Tomcat itself somewhere around 6.0.28 plus or minus a few releases.

This is also the possibility of an application that's misbehaving. In which case any "fixes" that came from changing OS, Tomcat or JDK version might be an illusion. If a communications channel is being improperly closed, timing quirks could cause the problem to be intermittent and hard to reproduce. Except, of course that Murphy's Law states that the worst possible things happen at the worst possible times.
 
"I know this defies the law of gravity... but I never studied law." -B. Bunny Defiant tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic