File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javax.crypto.Cipher.a (DashoA6275) noClassDefFoundError

 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are using the code below to encrypt a short string of data. It works fine in our desktop weblogic server environments, but fails on the server. It fails on the line Cipher cipher = Cipher.getInstance("AES",p);
with

java.lang.NoClassDefFoundError
at javax.crypto.Cipher.a(DashoA6275)
at javax.crypto.Cipher.getInstance(DashoA6275)



notes about the server environment:
It is weblogic portal 8.1.5
ssl is enabled
the security providers look like this:
security.provider.1=sun.security.provider.Sun
security.provider.2=com.sun.net.ssl.internal.ssl.Provider
security.provider.3=com.sun.rsajca.Provider
security.provider.4=com.sun.crypto.provider.SunJCE
security.provider.5=sun.security.jgss.SunProvider
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We found the issue.
It turns out that the server admin, when adding the unlimited security jar files to jre/lib/security forgot to change the permissions and left them as only reachable by root.

The first user to attempt the action that relies on crypto got a long error with this at the bottom:

at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
Caused by: java.security.PrivilegedActionException: java.util.zip.ZipException:

Permission denied

at java.security.AccessController.doPrivileged(Native Method)


subsequent visitors got a different error, the one I pasted in my first post, and it contained no information about PrivilegedActionException

It was only when we deployed our app on a different box that we had a look at the first error.

Apparently java ate the error on subsequent visits because of some reason that I don't fully understand.

This teaches two lessons.
1) read the entire stack trace of errors and read them again.
2)Java can eat errors in ways I might not expect

here is the full stack trace of the first time error:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic