lapps / org.lappsgrid.examples

LAPPS example code.
2 stars 3 forks source link

mvn jetty:run fails #47

Closed abourai closed 6 years ago

abourai commented 8 years ago

Hello

I'm going through the tutorial and I'm having an issue in step 5 with mvn jetty:run. I get the following stacktrace:

[ERROR] Failed to execute goal org.mortbay.jetty:maven-jetty-plugin:6.1.26:run (default-cli) on project lappsgrid_example: Failure: NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.mortbay.jetty:maven-jetty-plugin:6.1.26:run (default-cli) on project lappsgrid_example: Failure
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failure
    at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:479)
    at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:396)
    at org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:210)
    at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    ... 20 more
Caused by: java.lang.NullPointerException
    at org.mortbay.jetty.plugin.AbstractJettyRunMojo.checkWebXml(AbstractJettyRunMojo.java:358)
    at org.mortbay.jetty.plugin.AbstractJettyRunMojo.configureWebApplication(AbstractJettyRunMojo.java:383)
    at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:438)
    ... 25 more

I checked the effective POM and I am importing the jetty plugin, and I am using a carbon copy of the web.xml and pom.xml defined in the source.

keighrim commented 8 years ago

Looks like jetty cannot find web.xml file. Please make sure that webapp files are placed in the right place. You need three files.

src/main/webapp/WEB-INF/server-config.wsdd
src/main/webapp/WEB-INF/web.xml
src/main/webapp/WEB-INF/serviceimpl/CLASS_NAME.xml

Let us know if it works!

keighrim commented 6 years ago

Hope OP has solved the problem. Closing the issue.