Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.4.10, 1.5-M1
-
None
-
OS X, java 6, IDEA
Description
When trying to run
org.apache.wicket.examples.StartExamples
as a Java application trough my IDE (using IntelliJ IDEA) the class loader complains that it can't find the jetty JARs.
Exception in thread "main" java.lang.NoClassDefFoundError: org/mortbay/jetty/HandlerContainer
Caused by: java.lang.ClassNotFoundException: org.mortbay.jetty.HandlerContainer
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
These JARs are using maven scope 'provided' which means the container has to provide the JARs. As you might expect IDEA has no jetty JARs in the classpath when running a class. An easy fix is to move StartExamples from src/main/java to src/test/java so the dependencies are found.
Patch for 1.4 and 1.5 will follow.