Jiri Peinlich created MTOMCAT-168:
-------------------------------------
Summary: Nullpointer exception in run mojo
Key: MTOMCAT-168
URL: https://issues.apache.org/jira/browse/MTOMCAT-168
Project: Apache Tomcat Maven Plugin
Issue Type: Bug
Components: tomcat7
Affects Versions: 2.0-beta-1
Environment: windows mingw
Reporter: Jiri Peinlich
Assignee: Olivier Lamy (*$^¨%`£)
when using enpty aditionalClasspathDir tag in the the plugin settings and
running the mvn tomcat7:run mojo I got the following nullpointer exception. I
am currently learning how the whole plugin works. I got the initial plugin
configuration from here:
http://tomcat.apache.org/maven-plugin-2/run-mojo-features.html
I removed parts that are not applicable for my project but i kept the empty
additionalClasspathDir as in the example:
<additionalClasspathDirs>
<additionalClasspathDir></additionalClasspathDir>
</additionalClasspathDirs>
When removing this section i did not get the exception anymore
Null Pointer exception:
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-
beta-1:run (default-cli) on project ITA: Execution default-cli of goal org.apach
e.tomcat.maven:tomcat7-maven-plugin:2.0-beta-1:run failed. NullPointerException
-> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
rg.apache.tomcat.maven:tomcat7-maven-plugin:2.0-beta-1:run (default-cli) on proj
ect ITA: Execution default-cli of goal org.apache.tomcat.maven:tomcat7-maven-plu
gin:2.0-beta-1:run failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:225)
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.buildProje
ct(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
ild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-c
li of goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-beta-1:run failed.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:110)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:209)
... 19 more
Caused by: java.lang.NullPointerException
at org.apache.tomcat.maven.plugin.tomcat7.run.RunMojo.createWebappLoader
(RunMojo.java:268)
at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.createCont
ext(AbstractRunMojo.java:415)
at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.startConta
iner(AbstractRunMojo.java:719)
at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.execute(Ab
stractRunMojo.java:353)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:101)
... 20 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutio
nException
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]