GreenButtonAlliance / OpenESPI-ThirdParty-java

Spring Framework implementation of a Green Button Third Party OpenESPI Application
https://sandbox.greenbuttonalliance.org:8443/ThirdParty/
Apache License 2.0
11 stars 28 forks source link

Build error following OpenESPI developmentEnvironment instructions #122

Open hybridite opened 9 years ago

hybridite commented 9 years ago

Hi,

Thank you for your great work. I am attempting to deploy the Third-Party application locally on the recommended virtual machine and I ran into an issue when running the tomcat server.

According to the greenbutton documentation I was able to build the different applications using the command mvn -P devmysql -Dmaven.test.skip=true clean install.

But unfortunately I run into an error when I want to run the Third-Party application using mvn -P devmysql -Dmaven.test.skip=true clean tomcat7:run.

I am running under the virtual machine proposed by GreenButton. I was able to successfully build Common, DataCustodian and Third-Party applications and I can run tomcat for the DataCustodian application.

Here is the full log of the build failing for the Third-Party application:

[INFO] Scanning for projects...
[INFO]                                                                        
[INFO] ------------------------------------------------------------------------
[INFO] Building ThirdParty 1.2-RC1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ ThirdParty ---
[INFO] Deleting /home/bitnami/Documents/my_espi/OpenESPI-ThirdParty-java/target
[INFO]
[INFO] >>> tomcat7-maven-plugin:2.0:run (default-cli) @ ThirdParty >>>
[INFO]
[INFO] --- buildnumber-maven-plugin:1.1:create (default) @ ThirdParty ---
[INFO] Checking for local modifications: skipped.
[INFO] Updating project files from SCM: skipped.
[INFO] ShortRevision tag detected. The value is '7'.
[INFO] Executing: /bin/sh -c cd /home/bitnami/Documents/my_espi/OpenESPI-ThirdParty-java && git rev-parse --verify --short=7 HEAD
[INFO] Working directory: /home/bitnami/Documents/my_espi/OpenESPI-ThirdParty-java
[INFO] Storing buildNumber: b74797d at timestamp: 1426696035058
[INFO] ShortRevision tag detected. The value is '7'.
[INFO] Executing: /bin/sh -c cd /home/bitnami/Documents/my_espi/OpenESPI-ThirdParty-java && git rev-parse --verify --short=7 HEAD
[INFO] Working directory: /home/bitnami/Documents/my_espi/OpenESPI-ThirdParty-java
[INFO] Storing buildScmBranch: UNKNOWN
[INFO]
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ ThirdParty ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 16 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ ThirdParty ---
[INFO] Compiling 34 source files to /home/bitnami/Documents/my_espi/OpenESPI-ThirdParty-java/target/classes
[INFO]
[INFO] <<< tomcat7-maven-plugin:2.0:run (default-cli) @ ThirdParty <<<
[INFO]
[INFO] --- tomcat7-maven-plugin:2.0:run (default-cli) @ ThirdParty ---
[INFO] Running war on http://localhost:8080/ThirdParty
[INFO] Creating Tomcat server configuration at /home/bitnami/Documents/my_espi/OpenESPI-ThirdParty-java/target/tomcat
[INFO] create webapp with contextPath: /ThirdParty
Mar 18, 2015 12:27:19 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Mar 18, 2015 12:27:19 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Mar 18, 2015 12:27:19 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.30
Mar 18, 2015 12:27:19 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/ThirdParty]]
                at java.util.concurrent.FutureTask.report(FutureTask.java:122)
                at java.util.concurrent.FutureTask.get(FutureTask.java:188)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
                at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:785)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
                at java.util.concurrent.FutureTask.run(FutureTask.java:262)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
                at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/ThirdParty]]
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
                ... 6 more
Caused by: java.lang.ClassCastException: org.springframework.web.SpringServletContainerInitializer cannot be cast to javax.servlet.ServletContainerInitializer
                at org.apache.catalina.startup.ContextConfig.getServletContainerInitializer(ContextConfig.java:1657)
                at org.apache.catalina.startup.ContextConfig.processServletContainerInitializers(ContextConfig.java:1565)
                at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1273)
                at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
                at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
                at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
                at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
                ... 6 more

Mar 18, 2015 12:27:19 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]
                at java.util.concurrent.FutureTask.report(FutureTask.java:122)
                at java.util.concurrent.FutureTask.get(FutureTask.java:188)
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
                at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
                at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
                at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
                at org.apache.catalina.startup.Tomcat.start(Tomcat.java:335)
                at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.startContainer(AbstractRunMojo.java:1018)
                at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.execute(AbstractRunMojo.java:478)
                at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
                at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
                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: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(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:606)
                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.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
                at java.util.concurrent.FutureTask.run(FutureTask.java:262)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
                at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
                at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
                at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:785)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
                ... 6 more

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.006s
[INFO] Finished at: Wed Mar 18 12:27:19 EDT 2015
[INFO] Final Memory: 27M/64M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0:run (default-cli) on project ThirdParty: Could not start Tomcat: Failed to start component [StandardServer[-1]]: Failed to start component [StandardService[Tomcat]]: Failed to start component [StandardEngine[Tomcat]]: A child container failed during start -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
riddhipatel23 commented 3 years ago

I am having the same issue. running it on my local MacOS machine.

dfcoffin commented 3 years ago

Based on your comments, I am guessing you are starting the DataCustodian and ThirdParty Tomcat servers separately. Are you starting the DataCustodian and then the ThirdParty servers? If so, please reverse the order and let me know if the DataCustodian server fails in the same manner as you have reported the ThirdParty server failure?

riddhipatel23 commented 3 years ago

No, I just want to implement the OpenESPI-ThirdParty-java. I first build the OpenESPI-Common-java for that. while running the command tomcat, I am facing issues.

On Sat, Feb 27, 2021 at 10:42 PM Donald F Coffin notifications@github.com wrote:

Based on your comments, I am guessing you are starting the DataCustodian and ThirdParty Tomcat servers separately. Are you starting the DataCustodian and then the ThirdParty servers? If so, please reverse the order and let me know if the DataCustodian server fails in the same manner as you have reported the ThirdParty server failure?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/GreenButtonAlliance/OpenESPI-ThirdParty-java/issues/122#issuecomment-787104171, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKFIH3BQRPISZMTTCSOOTNLTBERWPANCNFSM4A6DNJEA .

dfcoffin commented 3 years ago

@riddhuu23 Since your GitHub repository only contains the OpenESPI-Common-java repository (the OpenESPI-ThirdParty-java repository may be Private so I can't see it), I am unable to attempt to recreate your issue.

riddhipatel23 commented 3 years ago

you might now see it.

On Mon, Mar 1, 2021 at 8:12 PM Donald F Coffin notifications@github.com wrote:

@riddhuu23 https://github.com/riddhuu23 Since your GitHub repository only contains the OpenESPI-Common-java repository (the OpenESPI-ThirdParty-java repository may be Private so I can't see it), I am unable to attempt to recreate your issue.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/GreenButtonAlliance/OpenESPI-ThirdParty-java/issues/122#issuecomment-788000128, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKFIH3FHG26A6XDQA5DN3CTTBORT5ANCNFSM4A6DNJEA .

riddhipatel23 commented 3 years ago

On Mon, Mar 1, 2021 at 8:24 PM Riddhi Patel riddhipatel2224@gmail.com wrote:

you might now see it.

On Mon, Mar 1, 2021 at 8:12 PM Donald F Coffin notifications@github.com wrote:

@riddhuu23 https://github.com/riddhuu23 Since your GitHub repository only contains the OpenESPI-Common-java repository (the OpenESPI-ThirdParty-java repository may be Private so I can't see it), I am unable to attempt to recreate your issue.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/GreenButtonAlliance/OpenESPI-ThirdParty-java/issues/122#issuecomment-788000128, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKFIH3FHG26A6XDQA5DN3CTTBORT5ANCNFSM4A6DNJEA .

riddhipatel23 commented 3 years ago

[image: image.png]

On Mon, Mar 1, 2021 at 8:26 PM Riddhi Patel riddhipatel2224@gmail.com wrote:

On Mon, Mar 1, 2021 at 8:24 PM Riddhi Patel riddhipatel2224@gmail.com wrote:

you might now see it.

On Mon, Mar 1, 2021 at 8:12 PM Donald F Coffin notifications@github.com wrote:

@riddhuu23 https://github.com/riddhuu23 Since your GitHub repository only contains the OpenESPI-Common-java repository (the OpenESPI-ThirdParty-java repository may be Private so I can't see it), I am unable to attempt to recreate your issue.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/GreenButtonAlliance/OpenESPI-ThirdParty-java/issues/122#issuecomment-788000128, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKFIH3FHG26A6XDQA5DN3CTTBORT5ANCNFSM4A6DNJEA .