Note that there are some explanatory texts on larger screens.

plurals
  1. PONot able to start the Spring-Boot sample
    text
    copied!<p>I was trying out spring-boot samples. This is specifically the example <a href="https://github.com/spring-projects/spring-boot/tree/master/spring-boot-samples/spring-boot-sample-tomcat" rel="nofollow">spring-boot-sample-tomcat</a>, that I have been trying to run.</p> <p>As instructed, I have run <code>mvn package</code> and it is successful. But when running the jar <code>java -jar target/spring-boot-sample-tomcat-0.5.0.BUILD-SNAPSHOT.jar</code>, I am getting the below exception.</p> <p>Please confirm if there is any jars which need to be put in the classpath. Or what to do to make it run.</p> <p>Link to the <a href="https://raw.github.com/spring-projects/spring-boot/master/spring-boot-samples/spring-boot-sample-tomcat/pom.xml" rel="nofollow">pom.xml</a> which is being used.</p> <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at java.lang.Class.getDeclaredMethod(Class.java:1935) at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletContextListener at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at org.springframework.boot.loader.LaunchedURLClassLoader.findClass(LaunchedURLClassLoader.java:110) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at org.springframework.boot.loader.LaunchedURLClassLoader.doLoadClass(LaunchedURLClassLoader.java:93) at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:65) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) ... 5 more </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload