t7mp/t7mp — Issue #50: NPE while tomcat is starting
Author: amirkibbar
Created: 2012-01-03 09:46:17+00:00
State: open

starting with version 0.9.8 i'm getting this NPE:
[ERROR] Failed to execute goal com.googlecode.t7mp:maven-t7-plugin:0.9.9:run (start tomcat) on project bsf-system-tests: Execution start tomcat of goal com.googlecode.t7mp:maven-t7-plugin:0.9.9:run failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.googlecode.t7mp:maven-t7-plugin:0.9.9:run (start tomcat) on project bsf-system-tests: Execution start tomcat of goal com.googlecode.t7mp:maven-t7-plugin:0.9.9: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.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
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(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution start tomcat of goal com.googlecode.t7mp:maven-t7-plugin:0.9.9:run failed.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.lang.NullPointerException
at com.googlecode.t7mp.steps.resources.SetSystemPropertiesStep.replaceCatalinas(SetSystemPropertiesStep.java:44)
at com.googlecode.t7mp.steps.resources.SetSystemPropertiesStep.execute(SetSystemPropertiesStep.java:37)
at com.googlecode.t7mp.steps.DefaultStepSequence.execute(DefaultStepSequence.java:33)
at com.googlecode.t7mp.steps.deployment.SetupStepSequence.execute(SetupStepSequence.java:36)
at com.googlecode.t7mp.RunMojo.execute(RunMojo.java:49)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
... 20 more

my t7 configuration is:

com.googlecode.t7mp
maven-t7-plugin

${tomcat.http.port}
${tomcat.shutdown.port}
${tomcat.version}
${tomcat.blocking}
${t7.lookinside}

${project.groupId}
my-app1
app1

${project.groupId}
my-app2
app2

jdbc.driver_class
${jdbc.driver_class}

jdbc.url
${jdbc.url}

db.username
${db.username}

db.password
${db.password}

db.pool.maxPoolSize
${db.pool.maxPoolSize}

db.pool.minPoolSize
${db.pool.minPoolSize}

db.pool.maxIdleTime
${db.pool.maxIdleTime}

db.show_sql
${db.show_sql}

com.h2database
h2

mysql
mysql-connector-java

postgresql
postgresql

com.oracle
ojdbc6

start tomcat
integration-test

run

stop tomcat
post-integration-test

stop

obviously all parameters are resolved correctly in the pom. the tomcat.version is 7.0.22.

in version 0.9.8.M2 the same configuration worked just fine.

thanks,
Amir