We're updating the issue view to help you get more done. 

NPE when deploying tomcat on ant

Description

getting an NPE on deployment using the nightly build. Unless running ant at -v, this is only presented as a 'failed to start the container'. Perhaps nested exceptions should be checked for containing a Throwable and reported differently.

<c:cargo-tomcat5x
type="local"
action="start"
home="C:\Java\Apps\Tomcat">
<configuration>
<property name="cargo.servlet.port" value="8080"/>
<property name="cargo.logging" value="high"/>
<war warfile="${target.jar}"/>
</configuration>

cargo-tomcat:

BUILD FAILED
C:\Personal\AntBook\app2\diary\webapp\webapp-chapter-12.xml:262: org.codehaus.cargo.container.ContainerException: Failed to start the Tomcat 5.5.9 container.
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:114)
at org.apache.tools.ant.Task.perform(Task.java:365)
at org.apache.tools.ant.Target.execute(Target.java:356)
at org.apache.tools.ant.Target.performTasks(Target.java:384)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1240)
at org.apache.tools.ant.Project.executeTarget(Project.java:1209)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1092)
at org.apache.tools.ant.Main.runBuild(Main.java:676)
at org.apache.tools.ant.Main.startAnt(Main.java:195)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:276)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:96)
Caused by: org.codehaus.cargo.container.ContainerException: Failed to start the Tomcat 5.5.9 container.
at org.codehaus.cargo.container.spi.AbstractLocalContainer.start(AbstractLocalContainer.java:307)
at org.codehaus.cargo.ant.CargoTask.executeActions(CargoTask.java:400)
at org.codehaus.cargo.ant.CargoTask.execute(CargoTask.java:381)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:104)
... 11 more
Caused by: org.codehaus.cargo.container.ContainerException: Failed to create a Tomcat 5.5.9 container configuration
at org.codehaus.cargo.container.tomcat.CatalinaStandaloneLocalConfiguration.configure(CatalinaStandaloneLocalConfiguration.java:94)
at org.codehaus.cargo.container.tomcat.AbstractTomcatLocalContainer.doStart(AbstractTomcatLocalContainer.java:87)
at org.codehaus.cargo.container.spi.AbstractLocalContainer.start(AbstractLocalContainer.java:300)
... 18 more
Caused by: java.lang.NullPointerException
at org.codehaus.cargo.container.spi.configuration.AbstractStandaloneLocalConfiguration.createConfigurationDir(AbstractStandaloneLocalConfiguration.java:78)
at org.codehaus.cargo.container.tomcat.CatalinaStandaloneLocalConfiguration.configure(CatalinaStandaloneLocalConfiguration.java:72)
... 20 more
— Nested Exception —
org.codehaus.cargo.container.ContainerException: Failed to start the Tomcat 5.5.9 container.
at org.codehaus.cargo.container.spi.AbstractLocalContainer.start(AbstractLocalContainer.java:307)
at org.codehaus.cargo.ant.CargoTask.executeActions(CargoTask.java:400)
at org.codehaus.cargo.ant.CargoTask.execute(CargoTask.java:381)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:104)
at org.apache.tools.ant.Task.perform(Task.java:365)
at org.apache.tools.ant.Target.execute(Target.java:356)
at org.apache.tools.ant.Target.performTasks(Target.java:384)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1240)
at org.apache.tools.ant.Project.executeTarget(Project.java:1209)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1092)
at org.apache.tools.ant.Main.runBuild(Main.java:676)
at org.apache.tools.ant.Main.startAnt(Main.java:195)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:276)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:96)
Caused by: org.codehaus.cargo.container.ContainerException: Failed to create a Tomcat 5.5.9 container configuration
at org.codehaus.cargo.container.tomcat.CatalinaStandaloneLocalConfiguration.configure(CatalinaStandaloneLocalConfiguration.java:94)
at org.codehaus.cargo.container.tomcat.AbstractTomcatLocalContainer.doStart(AbstractTomcatLocalContainer.java:87)
at org.codehaus.cargo.container.spi.AbstractLocalContainer.start(AbstractLocalContainer.java:300)
... 18 more
Caused by: java.lang.NullPointerException
at org.codehaus.cargo.container.spi.configuration.AbstractStandaloneLocalConfiguration.createConfigurationDir(AbstractStandaloneLocalConfiguration.java:78)
at org.codehaus.cargo.container.tomcat.CatalinaStandaloneLocalConfiguration.configure(CatalinaStandaloneLocalConfiguration.java:72)
... 20 more
org.codehaus.cargo.container.ContainerException: Failed to create a Tomcat 5.5.9 container configuration
at org.codehaus.cargo.container.tomcat.CatalinaStandaloneLocalConfiguration.configure(CatalinaStandaloneLocalConfiguration.java:94)
at org.codehaus.cargo.container.tomcat.AbstractTomcatLocalContainer.doStart(AbstractTomcatLocalContainer.java:87)
at org.codehaus.cargo.container.spi.AbstractLocalContainer.start(AbstractLocalContainer.java:300)
at org.codehaus.cargo.ant.CargoTask.executeActions(CargoTask.java:400)
at org.codehaus.cargo.ant.CargoTask.execute(CargoTask.java:381)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:104)
at org.apache.tools.ant.Task.perform(Task.java:365)
at org.apache.tools.ant.Target.execute(Target.java:356)
at org.apache.tools.ant.Target.performTasks(Target.java:384)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1240)
at org.apache.tools.ant.Project.executeTarget(Project.java:1209)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1092)
at org.apache.tools.ant.Main.runBuild(Main.java:676)
at org.apache.tools.ant.Main.startAnt(Main.java:195)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:276)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:96)
Caused by: java.lang.NullPointerException
at org.codehaus.cargo.container.spi.configuration.AbstractStandaloneLocalConfiguration.createConfigurationDir(AbstractStandaloneLocalConfiguration.java:78)
at org.codehaus.cargo.container.tomcat.CatalinaStandaloneLocalConfiguration.configure(CatalinaStandaloneLocalConfiguration.java:72)
... 20 more
java.lang.NullPointerException
at org.codehaus.cargo.container.spi.configuration.AbstractStandaloneLocalConfiguration.createConfigurationDir(AbstractStandaloneLocalConfiguration.java:78)
at org.codehaus.cargo.container.tomcat.CatalinaStandaloneLocalConfiguration.configure(CatalinaStandaloneLocalConfiguration.java:72)
at org.codehaus.cargo.container.tomcat.AbstractTomcatLocalContainer.doStart(AbstractTomcatLocalContainer.java:87)
at org.codehaus.cargo.container.spi.AbstractLocalContainer.start(AbstractLocalContainer.java:300)
at org.codehaus.cargo.ant.CargoTask.executeActions(CargoTask.java:400)
at org.codehaus.cargo.ant.CargoTask.execute(CargoTask.java:381)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:104)
at org.apache.tools.ant.Task.perform(Task.java:365)
at org.apache.tools.ant.Target.execute(Target.java:356)
at org.apache.tools.ant.Target.performTasks(Target.java:384)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1240)
at org.apache.tools.ant.Project.executeTarget(Project.java:1209)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1092)
at org.apache.tools.ant.Main.runBuild(Main.java:676)
at org.apache.tools.ant.Main.startAnt(Main.java:195)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:276)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:96)

Total time: 1 second

Status

Assignee

Vincent Massol

Reporter

Steve Loughran

Components

Fix versions

Affects versions

0.7

Priority

Major