jersey
  1. jersey
  2. JERSEY-1549

Helloworld-webapp (and possibly all other) sample is broken

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0-m09
    • Fix Version/s: 2.0-m13, 2.0
    • Component/s: None
    • Labels:
      None

      Description

      mvn clean compile exec:java results in

      java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
      	at java.lang.Thread.run(Thread.java:680)
      Caused by: java.lang.NoClassDefFoundError: javax/servlet/SessionTrackingMode
      	at org.glassfish.jersey.grizzly2.servlet.GrizzlyWebContainerFactory.create(GrizzlyWebContainerFactory.java:243)
      	at org.glassfish.jersey.examples.helloworld.webapp.App.main(App.java:71)
      	... 6 more
      Caused by: java.lang.ClassNotFoundException: javax.servlet.SessionTrackingMode
      	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:306)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

        Activity

        Hide
        Michal Gajdos added a comment -

        @PersistenceUnit in bookmark/bookmark-em is not working as well. Migrate this functionality from Jersey 1.x.

        Show
        Michal Gajdos added a comment - @PersistenceUnit in bookmark/bookmark-em is not working as well. Migrate this functionality from Jersey 1.x.
        Hide
        CliffRedmond added a comment -

        A workaround (while we're waiting for an official fix); add this to pom.xml:

        <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.0.1</version>
        </dependency>

        Show
        CliffRedmond added a comment - A workaround (while we're waiting for an official fix); add this to pom.xml: <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.0.1</version> </dependency>

          People

          • Assignee:
            Michal Gajdos
            Reporter:
            Pavel Bucek
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 3 hours Original Estimate - 3 hours
              3h
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 15 hours
              15h