jQuery in Action, 2nd edition*
The moose likes Web Services and the fly likes java.lang.NoClassDefFoundError: javax/xml/crypto/dsig/XMLSignatureException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "java.lang.NoClassDefFoundError: javax/xml/crypto/dsig/XMLSignatureException" Watch "java.lang.NoClassDefFoundError: javax/xml/crypto/dsig/XMLSignatureException" New topic
Author

java.lang.NoClassDefFoundError: javax/xml/crypto/dsig/XMLSignatureException

Anoop Singhal
Greenhorn

Joined: May 07, 2010
Posts: 12
Dear All,

I have a dedicated server with Godaddy and I am running XMLDigitalSignatureAPI on it. It works fine on my local server but when I uploaded the war file to the production server I got the error below and if I try to refresh the page again I get 404 error. My API files are lying in lib folder under WEB-INF. Could any one please let me know what should I do to fix this error.

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Error instantiating servlet class SignXML
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
java.lang.Thread.run(Thread.java:595)

root cause

java.lang.NoClassDefFoundError: javax/xml/crypto/dsig/XMLSignatureException
java.lang.Class.getDeclaredConstructors0(Native Method)
java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
java.lang.Class.getConstructor0(Class.java:2671)
java.lang.Class.newInstance0(Class.java:321)
java.lang.Class.newInstance(Class.java:303)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
java.lang.Thread.run(Thread.java:595)

note The full stack trace of the root cause is available in the Apache Tomcat/5.5.27 logs.
Apache Tomcat/5.5.27

Regards
Anoop
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Does the libraries in your WEB-INF/lib folder include any of the JARs seen when clicking on this link?
http://www.jarfinder.com/index.php/java/info/javax.xml.crypto.dsig.XMLSignatureException
I suspect that your local Tomcat installation contains this JAR, but your web service WAR and the production server does not.
Best wishes!
Anoop Singhal
Greenhorn

Joined: May 07, 2010
Posts: 12
Thanks for your response. It's already solved.
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Anoop Singhal wrote:Thanks for your response. It's already solved.

OK, I am dead curious : How did you solve it?
Anoop Singhal
Greenhorn

Joined: May 07, 2010
Posts: 12
It was JAR compatibility issues.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: java.lang.NoClassDefFoundError: javax/xml/crypto/dsig/XMLSignatureException
 
Similar Threads
Tomcat throws java.lang.UnsupportedClassVersionError
Error in java sip api
Encountering server internal error while running the local application in the tomcat server.
sending email using JavaMail
java.lang.NoClassDefFoundError: javax/xml/crypto/dsig/XMLSignatureException