Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-3014

unable to launch StartExamples from IDEA (eventually other IDE's as well)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.10, 1.5-M1
    • 1.4.11, 1.5-M2.1
    • wicket-examples
    • 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.

      Attachments

        1. wicket-1_5.patch
          0.3 kB
          Peter Ertl
        2. wicket-1_4.patch
          0.3 kB
          Peter Ertl

        Activity

          People

            ivaynberg Igor Vaynberg
            pete Peter Ertl
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: