Pattern selector

Most relevant patterns first. Most helpful ones displayed. Click here to show all.

  1. LauncherHelper.checkAndLoadMain() has thrown a NoClassDefFoundError
    Java Runtime
    131
    40
    15
  2. Class.getMethod() has thrown a NoClassDefFoundError
    Java Runtime
    143
    46
    19

Your stack trace compared to the selected pattern

Jump to solutionsExpand frames
java.lang.ClassNotFoundException: javax.servlet.Servlet
7 matching frames hidden
java.lang.NoClassDefFoundError: javax/servlet/Servlet
2 matching frames hidden
    at java.lang.Class.getMethod0(Class.java:2866)
    at java.lang.Class.getMethod(Class.java:1676)
    at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)

Solution

rafael1 year ago

This error means there's a class missing in your classpath during runtime. You need to create a jar with all your dependencies and have it in your classpath. Check Maven Assembly Plugin and how to add your dependencies to a jar: https://goo.gl/U2zr8k

Check the source of this solution for more info

External results for this pattern (10)

  1. AbdulAlivia GitHub4 months ago
    soot.Transformer
    Show stack trace
  2. Unknown authorvia grokbase.com4 months ago
    com.google.gwt.core.ext.TreeLogger
    Show stack trace
  3. xkmvia Stack Overflow4 months ago
    com.google.gwt.core.ext.TreeLogger
    Show stack trace
  4. banjinvia GitHub4 months ago
    backtype.storm.topology.IRichBolt
    Show stack trace
  5. Juhapekka Tolvanenvia Google Groups4 months ago
    org.pdfbox.cos.ICOSVisitor
    Show stack trace
  6. org.apache.spark.mllib.recommendation.Rating
    Show stack trace
  7. com.amazonaws.AmazonClientException
    Show stack trace
  8. Kmsvia Stack Overflow4 months ago
    org.apache.commons.io.filefilter.IOFileFilter
    Show stack trace
  9. org.lwjgl.LWJGLException
    Show stack trace