[jetty-user] IllegalStateException on 7.4.1

Java Programmer <[email protected]> Thu, 19 May 2011 23:08:32 +0200
Newsgroups gmane.comp.java.jetty.support
Message-ID <[email protected]>
Hi,
I have strange problem - I cannot launch even a very simple web app,
which is created with maven-archetype -webapp, when I use
jetty-maven-plugin 7.4.1.v20110513.
I always get:
2011-05-19 22:45:54.482:WARN::FAILED
o.m.j.p.JettyWebAppContext{/,file:/C:/Users/adrian/IdeaProjects/TestWeb/src/main/webapp/},file:/C:/Users/adrian/IdeaProjects/TestWeb/src/main/webapp/:
java.lang.IllegalStateException
2011-05-19 22:45:54.482:WARN::FAILED
org.eclipse.jetty.server.handler.ContextHandlerCollection@13fba1:
java.lang.IllegalStateException
2011-05-19 22:45:54.482:WARN::FAILED
org.eclipse.jetty.server.handler.HandlerCollection@1ed27e4:
java.lang.IllegalStateException
2011-05-19 22:45:54.502:INFO::Started
[email protected]:8080 STARTING
2011-05-19 22:45:54.502:WARN::FAILED
org.mortbay.jetty.plugin.JettyServer@813bc1:
java.lang.IllegalStateException
[INFO] Jetty server exiting.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failure
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Failure
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
        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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failure
        at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:493)
        at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:408)
        at org.mortbay.jetty.plugin.JettyRunMojo.execute(JettyRunMojo.java:589)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
        ... 17 more
Caused by: java.lang.IllegalStateException
        at org.eclipse.jetty.webapp.WebAppContext.setConfigurations(WebAppContext.java:839)
        at org.mortbay.jetty.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:165)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58)
        at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224)
        at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:164)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58)
        at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58)
        at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:89)
        at org.eclipse.jetty.server.Server.doStart(Server.java:258)
        at org.mortbay.jetty.plugin.JettyServer.doStart(JettyServer.java:67)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58)
        at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:468)
        ... 21 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Thu May 19 22:45:54 CEST 2011
[INFO] Final Memory: 11M/27M
[INFO] ------------------------------------------------------------------------
2011-05-19 22:45:55.064:INFO::stopped
o.m.j.p.JettyWebAppContext{/,file:/C:/Users/adrian/IdeaProjects/TestWeb/src/main/webapp/},file:/C:/Users/adrian/IdeaProjects/TestWeb/src/main/webapp/
2011-05-19 22:45:55.065:WARN::FAILED
o.m.j.p.JettyWebAppContext{/,file:/C:/Users/adrian/IdeaProjects/TestWeb/src/main/webapp/},file:/C:/Users/adrian/IdeaProjects/TestWeb/src/main/webapp/:
java.lang.NullPointerException
2011-05-19 22:45:55.065:WARN::FAILED
org.eclipse.jetty.server.handler.ContextHandlerCollection@13fba1:
java.lang.NullPointerException
2011-05-19 22:45:55.065:WARN::FAILED
org.eclipse.jetty.server.handler.HandlerCollection@1ed27e4:
java.lang.NullPointerException
2011-05-19 22:45:55.065:WARN::FAILED
org.mortbay.jetty.plugin.JettyServer@813bc1:
java.lang.NullPointerException
2011-05-19 22:45:55.566:INFO::stopped
o.m.j.p.JettyWebAppContext{/,file:/C:/Users/adrian/IdeaProjects/TestWeb/src/main/webapp/},file:/C:/Users/adrian/IdeaProjects/TestWeb/src/main/webapp/
2011-05-19 22:45:55.566:WARN::FAILED
o.m.j.p.JettyWebAppContext{/,file:/C:/Users/adrian/IdeaProjects/TestWeb/src/main/webapp/},file:/C:/Users/adrian/IdeaProjects/TestWeb/src/main/webapp/:
java.lang.NullPointerException
2011-05-19 22:45:55.566:WARN::FAILED
org.eclipse.jetty.server.handler.ContextHandlerCollection@13fba1:
java.lang.NullPointerException
2011-05-19 22:45:55.568:WARN::FAILED
org.eclipse.jetty.server.handler.HandlerCollection@1ed27e4:
java.lang.NullPointerException
2011-05-19 22:45:55.568:WARN::FAILED
org.mortbay.jetty.plugin.JettyServer@813bc1:
java.lang.NullPointerException

My pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>TestWeb</groupId>
  <artifactId>TestWeb</artifactId>
  <packaging>jar</packaging>
  <version>1.0</version>
  <name>TestWeb Maven Webapp</name>
  <url>http://maven.apache.org</url>
  <dependencies>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
      <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-server</artifactId>
      <version>7.4.1.v20110513</version>
    </dependency>
  </dependencies>

  <build>
    <finalName>TestWeb</finalName>
      <plugins>
        <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
	    <version>7.4.1.v20110513</version>
        </plugin>
    </plugins>
  </build>

</project>

My web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	 xmlns="http://java.sun.com/xml/ns/javaee"
	 xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
	 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
	 id="WebApp_ID"
	 version="2.5">
  <display-name>Archetype Created Web Application</display-name>
</web-app>

Any idea what could be wrong? I can add that I try this version of
plugin with larger application, and I have same errors, but when I
made WAR and deploy it to standalone server Jetty it works, only
plugin seems to be misconfigured I guess?

-- 
Best regards,
Adrian

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email