8000 NPE while tomcat is starting · Issue #50 · t7mp/t7mp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Apr 16, 2024. It is now read-only.

NPE while tomcat is starting #50

Closed
amirkibbar opened this issue Jan 3, 2012 · 8 comments
Closed

NPE while tomcat is starting #50

amirkibbar opened this issue Jan 3, 2012 · 8 comments

Comments

@amirkibbar
Copy link

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:

                <plugin>
                    <groupId>com.googlecode.t7mp</groupId>
                    <artifactId>maven-t7-plugin</artifactId>
                    <configuration>
                        <tomcatHttpPort>${tomcat.http.port}</tomcatHttpPort>
                        <tomcatShutdownPort>${tomcat.shutdown.port}</tomcatShutdownPort>
                        <tomcatVersion>${tomcat.version}</tomcatVersion>
                        <tomcatSetAwait>${tomcat.blocking}</tomcatSetAwait>
                        <lookInside>${t7.lookinside}</lookInside>
                        <webapps>
                            <webappArtifact>
                                <groupId>${project.groupId}</groupId>
                                <artifactId>my-app1</artifactId>
                                <contextPath>app1</contextPath>
                            </webappArtifact>
                            <webappArtifact>
                                <groupId>${project.groupId}</groupId>
                                <artifactId>my-app2</artifactId>
                                <contextPath>app2</contextPath>
                            </webappArtifact>
                        </webapps>
                        <systemProperties>
                            <systemProperty>
                                <key>jdbc.driver_class</key>
                                <value>${jdbc.driver_class}</value>
                            </systemProperty>
                            <systemProperty>
                                <key>jdbc.url</key>
                                <value>${jdbc.url}</value>
                            </systemProperty>
                            <systemProperty>
                                <key>db.username</key>
                                <value>${db.username}</value>
                            </systemProperty>
                            <systemProperty>
                                <key>db.password</key>
                                <value>${db.password}</value>
                            </systemProperty>
                            <systemProperty>
                                <key>db.pool.maxPoolSize</key>
                                <value>${db.pool.maxPoolSize}</value>
                            </systemProperty>
                            <systemProperty>
                                <key>db.pool.minPoolSize</key>
                                <value>${db.pool.minPoolSize}</value>
                            </systemProperty>
                            <systemProperty>
                                <key>db.pool.maxIdleTime</key>
                                <value>${db.pool.maxIdleTime}</value>
                            </systemProperty>
                            <systemProperty>
                                <key>db.show_sql</key>
                                <value>${db.show_sql}</value>
                            </systemProperty>
                        </systemProperties>
                        <libs>
                            <jarArtifact>
                                <groupId>com.h2database</groupId>
                                <artifactId>h2</artifactId>
                            </jarArtifact>
                            <jarArtifact>
                                <groupId>mysql</groupId>
                                <artifactId>mysql-connector-java</artifactId>
                            </jarArtifact>
                            <jarArtifact>
                                <groupId>postgresql</groupId>
                                <artifactId>postgresql</artifactId>
                            </jarArtifact>
                            <jarArtifact>
                                <groupId>com.oracle</groupId>
                                <artifactId>ojdbc6</artifactId>
                            </jarArtifact>
                        </libs>
                    </configuration>
                    <executions>
                        <execution>
                            <id>start tomcat</id>
                            <phase>integration-test</phase>
                            <goals>
                                <goal>run</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>stop tomcat</id>
                            <phase>post-integration-test</phase>
                            <goals>
                                <goal>stop</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

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

@marcobuss
Copy link
Member

Hi,

the configuration for Systemproperties has changed in Version 0.9.8.
See
#39
and
#49

simply change
<systemProperties> <systemProperty> <key>jdbc.driver_class</key> <value>${jdbc.driver_class}</value> </systemProperty> ... </systemProperties>

to
<systemProperties> <jdbc.driver_class>${jdbc.driver_class}</jdbc.driver_class> ... </systemProperties>

@amirkibbar
Copy link
Author

Thanks!

-----Original Message-----
From: Marco Buss [mailto:reply@reply.github.com]
Sent: Tuesday, January 03, 2012 11:57 AM
To: Kibbar, Amir
Subject: Re: [t7mp] NPE while tomcat is starting (#50)

Hi,

the configuration for Systemproperties has changed in Version 0.9.8.
See
#39
and
#49

simply change
<systemProperties> <systemProperty> <key>jdbc.driver_class</key> <value>${jdbc.driver_class}</value> </systemProperty> ... </systemProperties> to <systemProperties> <jdbc.driver_class>${jdbc.driver_class}</jdbc.driver_class> ... </systemProperties>


Reply to this email directly or view it on GitHub:
#50 (comment)

@jbellmann
Copy link
Member

Thanks Marco for the support.

@jwmach1
Copy link
jwmach1 commented Mar 12, 2013

Could you please make sure that the documentation is updated when changes like this occur. We are a year later, and this document page still shows the old systemProperties section: https://github.com/t7mp/t7mp/wiki/Configuration---Overview

@jbellmann
Copy link
Member

Hi James,

you are right. This is a problem. We will discuss that issue.

Do you would say that the wiki here would be the right place or would you prefer a dedicated site?

Cheers
Jörg

@jwmach1
Copy link
jwmach1 commented Mar 12, 2013

I think the wiki would be fine. But I would value your (the maintainers) time higher importance. So whatever is convenient. Just so long as all of the other locations point to the 'master' documentation. Much in the same way that the google-code wiki points over here in github. (though I'll also note that the readme.md (https://github.com/t7mp/t7mp) did not point me to the wiki, I got there via google).

I'm happy to create a new issue against the documentation if you want to consolidate the conversation away from this (only semi-related) issue.

@jbellmann
Copy link
Member

Yes, feel free to create an issue for better documentation and put the points above (linking to github) so I can remember the important parts ;-).

Thank you,
Jörg

@jwmach1
Copy link
jwmach1 commented Mar 12, 2013

I'm putting one more comment here, since this is where the conversation started. So there will be full circle back to the new issue #72 that I've just created. DOH! I had not refreshed the page, and did not know that Github was taking care of it for me. Cool. Thank you Github.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
0