This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes NoClassDefFoundError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "NoClassDefFoundError" Watch "NoClassDefFoundError" New topic
Author

NoClassDefFoundError

naval kumar
Ranch Hand

Joined: Jul 08, 2012
Posts: 37
Dear Sir,

When I m Executing my Code In Side Of Public Static Void main(String arg[])Its Working Fine But When I am executing the code inside of apache Tomcat its Throwing Error

java.lang.NoClassDefFoundError: com/sun/org/apache/xml/security/Init
org.jcp.xml.dsig.internal.dom.DOMXMLSignature.<clinit>(DOMXMLSignature.java:54)
org.jcp.xml.dsig.internal.dom.DOMXMLSignatureFactory.unmarshalXMLSignature(DOMXMLSignatureFactory.java:118)
K. Gil
Ranch Hand

Joined: Apr 29, 2011
Posts: 75

that's simple one,
check if you have xmlsec.jar uploaded to your tomcat.
naval kumar
Ranch Hand

Joined: Jul 08, 2012
Posts: 37
you are Genius, My problem has been resolved but how did you find the solution Because the problem is showing com/sun/org/apache/xml/security/Init Security type issue but the problem in this jar xmlsec.jar.
K. Gil
Ranch Hand

Joined: Apr 29, 2011
Posts: 75

It's common problem/question on our java hosting support desk, so don't worry too much and trust me, you're not the only one that struggled with this issue
utsav gupta
Ranch Hand

Joined: Mar 19, 2009
Posts: 57

Hi

I would rather like to continue to discuss on this topic than to create a new post. I hope that is allowed. Because this was precisely the problem that I was facing.
I wish to know as to why is it that If i run the application as a simple Java application then I am able to run the application through eclipse but If I wish to run the same code as a web application I have to copy all the required jar files into the Tomcat container. Is it not the task of eclipse or Tomcat to pick up the dependent libraries from the classpath rather than for us to manually put it there??
Or Am I missing some configuration in eclipse.

Kindly Reply
Regards
Utsav.
 
 
subject: NoClassDefFoundError
 
Similar Threads
how to run js file with apache
Overriding
Servlet container - what is the real definition?
Regarding Thread's join()
ORA-00600: internal error