jersey
  1. jersey
  2. JERSEY-675

mvn embedded-glassfish:run NoClassDefFoundError errors running samples\jersey-guice-filter & samples\moxy

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.7
    • Component/s: examples
    • Labels:
      None

      Description

      c:> cd jersey/samples/jersey-guice-filter
      //Run the application using "mvn embedded-glassfish:run"
      c:> mvn embedded-glassfish:run

      see attached for full console output, errors include:
      org.apache.catalina.LifecycleException: java.util.ServiceConfigurationError: javax.servlet.ServletContainerInitializer: Provider com.sun.jersey.server.impl.container.servlet.JerseyServletContainerInitializer could not be instantiated: java.lang.NoClassDefFoundError: javax/servlet/ServletContainerInitializer
      [snip]

      SEVERE: ContainerBase.addChild: start:
      org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
      [snip]

      WARNING: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apa
      che.catalina.LifecycleException: java.lang.IllegalArgumentException: java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
      java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
      [snip]

      SEVERE: Exception while invoking class com.sun.enterprise.web.WebApplication start method
      java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException:
      java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
      [snip]

      SEVERE: Exception while loading the app
      classLoader = WebappClassLoader (delegate=true; repositories=WEB-INF/classes/)
      SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@99c4cc
      Mar 14, 2011 1:58:36 PM org.glassfish.deployment.admin.DeployCommand execute
      SEVERE: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
      PlainTextActionReporterFAILUREDescription: deploy AdminCommandError occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener. Please see server.log for more details.

      1. embedded.moxy.run.txt
        42 kB
        jbenoit
      2. embedded.run.txt
        38 kB
        jbenoit
      3. jersey-ejb.embedded.errors.txt
        45 kB
        jbenoit

        Activity

        Hide
        jbenoit added a comment -

        similar errors occur running samples\moxy via mvn embedded-glassfish:run, see attached embedded.moxy.run.txt

        using <plugin> version
        <groupId>org.glassfish</groupId>
        <artifactId>maven-embedded-glassfish-plugin</artifactId>
        <version>3.1</version>

        Show
        jbenoit added a comment - similar errors occur running samples\moxy via mvn embedded-glassfish:run, see attached embedded.moxy.run.txt using <plugin> version <groupId>org.glassfish</groupId> <artifactId>maven-embedded-glassfish-plugin</artifactId> <version>3.1</version>
        Hide
        jbenoit added a comment -

        similar errors occur trying to run jersey-ejb using embedded container via:

        C:\jersey\samples\jersey-ejb>mvn clean package embedded-glassfish:run

        see attached jersey-ejb.embedded.errors.txt file for run console output.

        Show
        jbenoit added a comment - similar errors occur trying to run jersey-ejb using embedded container via: C:\jersey\samples\jersey-ejb>mvn clean package embedded-glassfish:run see attached jersey-ejb.embedded.errors.txt file for run console output.
        Hide
        jbenoit added a comment -

        fixed, no longer seeing this exception - added to each of these sample's pom.xml file:
        <dependency>
        <groupId>org.glassfish</groupId>
        <artifactId>javax.servlet</artifactId>
        <version>3.1</version>
        </dependency>

        Show
        jbenoit added a comment - fixed, no longer seeing this exception - added to each of these sample's pom.xml file: <dependency> <groupId>org.glassfish</groupId> <artifactId>javax.servlet</artifactId> <version>3.1</version> </dependency>

          People

          • Assignee:
            jbenoit
            Reporter:
            jbenoit
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: