How to deploy tomcat7-maven-plugin? - java

I want to deploy a project using maven tomcat7:deploy. I am using maven 3.3.9, apache tomcat 7, OS X.
I set the user and password in tomcat-users.xml, and in Maven settings.xml set the password and user.
And I got this error message:
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/springAngularjs]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
.
.
.
.
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/springAngularjs]]
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
.
.
.
.
Apr 17, 2016 2:31:32 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:192)
.
.
.
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:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
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:800)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] -----------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run (default-cli) on project springAngularjs: 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]

Caused by: java.lang.ClassCastException: org.springframework.web.SpringServletContainerInitializer cannot be cast to javax.servlet.ServletContainerInitializer
means that you've built an environment with two copies of spring-web: one inside your webapp, and one outside, and something is passing an object from one to the other. This probably means that you need to get rid of the copy from inside your webapp so that it inherits the classes from outside.

Related

tomee won't start from within eclipse

I installed apache-tomee-plume-7.1.0 from https://tomee.apache.org/
I installed eclipse-jee from https://www.eclipse.org/ using the installation tool.
In eclipse I added a new tomcat v8.5 server since eclipse told me that was the installed version.
When starting the server from within eclipse, I get an error-message like this:
'Starting tomcat v8.5 Server at localhost' has encountered a problem.
Server Tomcat v8.5 Server at localhost failed to start.
In the console it says:
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
... 6 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.openejb.util.proxy.LocalBeanProxyFactory$Unsafe
at org.apache.openejb.util.proxy.LocalBeanProxyFactory.createProxy(LocalBeanProxyFactory.java:137)
at org.apache.openejb.util.proxy.LocalBeanProxyFactory.createProxy(LocalBeanProxyFactory.java:147)
at org.apache.tomee.catalina.TomcatWebAppBuilder.eagerInitOfLocalBeanProxies(TomcatWebAppBuilder.java:1563)
at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1309)
at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1125)
at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5154)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
There are some more errors but I think the NoClassDefFoundError might be the main problem... am I right?
Any help is appreciated.
I ended up using another version of tomee.
Switched to version: apache-tomee-plume-8.0.0-M3
This solved my issues.
Both version of TomEE, witch is Apache TomEE plume 8.0.0-M3 and Apache Tomee plume 7.1.0, it seems to run without error, both started from prompt and also from Eclipse plugin. However try to unpacked them in an directory whose name does not contain the space character.

org.apache.catalina.LifecycleException;failed to start component

After deploying/replacing the class files in Tomcat 8 I got the following error. I haven't been able to find (or properly implement) a solution to the problem at hand yet. Any help would be appreciated!
org.apache.catalina.core.StandardService.startInternal Starting
service Catalina
org.apache.catalina.core.StandardEngine.startInternal Starting
Servlet Engine: Apache Tomcat/8.0.50
SEVERE [Catalina-startStop-1]
org.apache.catalina.core.ContainerBase.startInternal A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start
component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.apache.catalina.core.ContainerBase.startInternal (ContainerBase.java:943)
atorg.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
atorg.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
Clean your repository folder in .m2 folder
Then clean and build maven again.

How to solve exception [Error loading application.groovy due to [java.lang.ArrayIndexOutOfBoundsException]: 0] when deploying war?

How to solve exception occurred on war deployment to production mode
Development in Grails 3.1.8, Java 8
Deployment on Linux CentOS 7 and Tomcat 8.5.9 server.
Please find the error log from catalina.out
18-Mar-2018 20:29:21.953 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/application]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.grails.core.exceptions.GrailsConfigurationException: Error loading application.groovy due to [java.lang.ArrayIndexOutOfBoundsException]: 0
at org.grails.core.cfg.GroovyConfigPropertySourceLoader.load(GroovyConfigPropertySourceLoader.groovy:72)
at org.grails.core.cfg.GroovyConfigPropertySourceLoader.load(GroovyConfigPropertySourceLoader.groovy:45)
at org.springframework.boot.env.PropertySourcesLoader.load(PropertySourcesLoader.java:127)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.loadIntoGroup(ConfigFileApplicationListener.java:462)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:449)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at grails.boot.GrailsApp.run(GrailsApp.groovy:55)
at org.springframework.boot.context.web.SpringBootServletInitializer.run(SpringBootServletInitializer.java:149)
at org.grails.boot.context.web.GrailsAppServletInitializer.createRootApplicationContext(GrailsAppServletInitializer.groovy:57)
at org.springframework.boot.context.web.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:85)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5292)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
... 10 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at sun.font.CompositeFont.getSlotFont(CompositeFont.java:333)
at sun.font.CompositeGlyphMapper.initMapper(CompositeGlyphMapper.java:81)
at sun.font.CompositeGlyphMapper.<init>(CompositeGlyphMapper.java:62)
at sun.font.CompositeFont.getMapper(CompositeFont.java:391)
at sun.font.CompositeFont.canDisplay(CompositeFont.java:417)
at java.awt.Font.canDisplay(Font.java:1980)
at com.octo.captcha.component.image.fontgenerator.RandomFontGenerator.checkFontCanDisplayCharacters(RandomFontGenerator.java:207)
at com.octo.captcha.component.image.fontgenerator.RandomFontGenerator.cleanFontList(RandomFontGenerator.java:163)
at com.octo.captcha.component.image.fontgenerator.RandomFontGenerator.initializeFonts(RandomFontGenerator.java:79)
at com.octo.captcha.component.image.fontgenerator.RandomFontGenerator.<init>(RandomFontGenerator.java:69)
at org.grails.core.cfg.GroovyConfigPropertySourceLoader.load(GroovyConfigPropertySourceLoader.groovy:61)
... 34 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at sun.font.CompositeFont.getSlotFont(CompositeFont.java:333)
This looks like some fonts are missing, or maybe none is installed. Compare the output of fc-command between your dev environment and your prod. This command might not be here by default and you need to install it too.
This post might help, as we don't know which distro you are running.

Netbeans Maven Spring boot error

I have a error like this.I workin on netbeans maven spring boot.
Application failed to start with classpath: [file:/C:/Users/Osman/Documents/sdn-twitter-boot-master/target/classes/, file:/C:/Users/Osman/.m2/repository/org/springframework/data/spring-data-neo4j-rest/3.1.0.M1/spring-data-neo4j-rest-3.1.0.M1.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/spring-tx/4.0.3.RELEASE/spring-tx-4.0.3.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/spring-context/4.0.3.RELEASE/spring-context-4.0.3.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/spring-expression/4.0.3.RELEASE/spring-expression-4.0.3.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/spring-beans/4.0.3.RELEASE/spring-beans-4.0.3.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/spring-aspects/4.0.3.RELEASE/spring-aspects-4.0.3.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/org/aspectj/aspectjweaver/1.7.4/aspectjweaver-1.7.4.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/spring-aop/4.0.3.RELEASE/spring-aop-4.0.3.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/spring-core/4.0.3.RELEASE/spring-core-4.0.3.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/org/neo4j/neo4j-kernel/2.0.1/neo4j-kernel-2.0.1.jar, file:/C:/Users/Osman/.m2/repository/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1.1/geronimo-jta_1.1_spec-1.1.1.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/data/spring-data-neo4j/3.1.0.M1/spring-data-neo4j-3.1.0.M1.jar, file:/C:/Users/Osman/.m2/repository/org/aspectj/aspectjrt/1.7.4/aspectjrt-1.7.4.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/data/spring-data-commons/1.8.0.M1/spring-data-commons-1.8.0.M1.jar, file:/C:/Users/Osman/.m2/repository/org/neo4j/neo4j-cypher-dsl/2.0.1/neo4j-cypher-dsl-2.0.1.jar, file:/C:/Users/Osman/.m2/repository/org/neo4j/neo4j-rest-graphdb/2.0.1/neo4j-rest-graphdb-2.0.1.jar, file:/C:/Users/Osman/.m2/repository/org/codehaus/jackson/jackson-jaxrs/1.9.7/jackson-jaxrs-1.9.7.jar, file:/C:/Users/Osman/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.9.7/jackson-core-asl-1.9.7.jar, file:/C:/Users/Osman/.m2/repository/org/codehaus/jackson/jackson-mapper-asl/1.9.7/jackson-mapper-asl-1.9.7.jar, file:/C:/Users/Osman/.m2/repository/com/sun/jersey/jersey-client/1.9/jersey-client-1.9.jar, file:/C:/Users/Osman/.m2/repository/com/sun/jersey/jersey-core/1.9/jersey-core-1.9.jar, file:/C:/Users/Osman/.m2/repository/org/neo4j/neo4j/2.0.1/neo4j-2.0.1.jar, file:/C:/Users/Osman/.m2/repository/org/neo4j/neo4j-lucene-index/2.0.1/neo4j-lucene-index-2.0.1.jar, file:/C:/Users/Osman/.m2/repository/org/apache/lucene/lucene-core/3.6.2/lucene-core-3.6.2.jar, file:/C:/Users/Osman/.m2/repository/org/neo4j/neo4j-graph-algo/2.0.1/neo4j-graph-algo-2.0.1.jar, file:/C:/Users/Osman/.m2/repository/org/neo4j/neo4j-udc/2.0.1/neo4j-udc-2.0.1.jar, file:/C:/Users/Osman/.m2/repository/org/neo4j/neo4j-graph-matching/2.0.1/neo4j-graph-matching-2.0.1.jar, file:/C:/Users/Osman/.m2/repository/org/neo4j/neo4j-jmx/2.0.1/neo4j-jmx-2.0.1.jar, file:/C:/Users/Osman/.m2/repository/org/neo4j/neo4j-cypher/2.0.1/neo4j-cypher-2.0.1.jar, file:/C:/Users/Osman/.m2/repository/org/neo4j/neo4j-cypher-commons/2.0.1/neo4j-cypher-commons-2.0.1.jar, file:/C:/Users/Osman/.m2/repository/org/neo4j/neo4j-cypher-compiler-1.9/2.0.1/neo4j-cypher-compiler-1.9-2.0.1.jar, file:/C:/Users/Osman/.m2/repository/org/neo4j/neo4j-cypher-compiler-2.0/2.0.1/neo4j-cypher-compiler-2.0-2.0.1.jar, file:/C:/Users/Osman/.m2/repository/org/parboiled/parboiled-scala_2.10/1.1.6/parboiled-scala_2.10-1.1.6.jar, file:/C:/Users/Osman/.m2/repository/org/parboiled/parboiled-core/1.1.6/parboiled-core-1.1.6.jar, file:/C:/Users/Osman/.m2/repository/com/googlecode/concurrentlinkedhashmap/concurrentlinkedhashmap-lru/1.3.1/concurrentlinkedhashmap-lru-1.3.1.jar, file:/C:/Users/Osman/.m2/repository/org/scala-lang/scala-library/2.10.3/scala-library-2.10.3.jar, file:/C:/Users/Osman/.m2/repository/org/slf4j/slf4j-api/1.7.7/slf4j-api-1.7.7.jar, file:/C:/Users/Osman/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.7/jcl-over-slf4j-1.7.7.jar, file:/C:/Users/Osman/.m2/repository/org/hibernate/hibernate-validator/5.0.3.Final/hibernate-validator-5.0.3.Final.jar, file:/C:/Users/Osman/.m2/repository/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar, file:/C:/Users/Osman/.m2/repository/org/jboss/logging/jboss-logging/3.1.1.GA/jboss-logging-3.1.1.GA.jar, file:/C:/Users/Osman/.m2/repository/com/fasterxml/classmate/1.0.0/classmate-1.0.0.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/boot/spring-boot-starter-data-rest/1.0.2.RELEASE/spring-boot-starter-data-rest-1.0.2.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/boot/spring-boot-starter-web/1.0.2.RELEASE/spring-boot-starter-web-1.0.2.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/boot/spring-boot-starter/1.0.2.RELEASE/spring-boot-starter-1.0.2.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/boot/spring-boot/1.0.2.RELEASE/spring-boot-1.0.2.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/1.0.2.RELEASE/spring-boot-autoconfigure-1.0.2.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/boot/spring-boot-starter-logging/1.0.2.RELEASE/spring-boot-starter-logging-1.0.2.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/org/slf4j/jul-to-slf4j/1.7.7/jul-to-slf4j-1.7.7.jar, file:/C:/Users/Osman/.m2/repository/org/slf4j/log4j-over-slf4j/1.7.7/log4j-over-slf4j-1.7.7.jar, file:/C:/Users/Osman/.m2/repository/ch/qos/logback/logback-classic/1.1.2/logback-classic-1.1.2.jar, file:/C:/Users/Osman/.m2/repository/ch/qos/logback/logback-core/1.1.2/logback-core-1.1.2.jar, file:/C:/Users/Osman/.m2/repository/org/yaml/snakeyaml/1.13/snakeyaml-1.13.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/1.0.2.RELEASE/spring-boot-starter-tomcat-1.0.2.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/7.0.52/tomcat-embed-core-7.0.52.jar, file:/C:/Users/Osman/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/7.0.52/tomcat-embed-el-7.0.52.jar, file:/C:/Users/Osman/.m2/repository/org/apache/tomcat/embed/tomcat-embed-logging-juli/7.0.52/tomcat-embed-logging-juli-7.0.52.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/spring-web/4.0.3.RELEASE/spring-web-4.0.3.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/spring-webmvc/4.0.3.RELEASE/spring-webmvc-4.0.3.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/hateoas/spring-hateoas/0.9.0.RELEASE/spring-hateoas-0.9.0.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/data/spring-data-rest-webmvc/2.0.2.RELEASE/spring-data-rest-webmvc-2.0.2.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/data/spring-data-rest-core/2.0.2.RELEASE/spring-data-rest-core-2.0.2.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/plugin/spring-plugin-core/1.0.0.RELEASE/spring-plugin-core-1.0.0.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/org/atteo/evo-inflector/1.0.1/evo-inflector-1.0.1.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/social/spring-social-twitter/1.0.5.RELEASE/spring-social-twitter-1.0.5.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/social/spring-social-core/1.0.3.RELEASE/spring-social-core-1.0.3.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/security/spring-security-crypto/3.1.3.RELEASE/spring-security-crypto-3.1.3.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/boot/spring-boot-starter-test/1.0.2.RELEASE/spring-boot-starter-test-1.0.2.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/spring-test/4.0.3.RELEASE/spring-test-4.0.3.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/de/codecentric/spring-boot-admin-server/1.0.5/spring-boot-admin-server-1.0.5.jar, file:/C:/Users/Osman/.m2/repository/de/codecentric/spring-boot-starter-admin-client/1.0.5/spring-boot-starter-admin-client-1.0.5.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/boot/spring-boot-starter-actuator/1.0.2.RELEASE/spring-boot-starter-actuator-1.0.2.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/org/springframework/boot/spring-boot-actuator/1.0.2.RELEASE/spring-boot-actuator-1.0.2.RELEASE.jar, file:/C:/Users/Osman/.m2/repository/org/jolokia/jolokia-core/1.2.0/jolokia-core-1.2.0.jar, file:/C:/Users/Osman/.m2/repository/com/googlecode/json-simple/json-simple/1.1/json-simple-1.1.jar, file:/C:/Users/Osman/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.3.3/jackson-databind-2.3.3.jar, file:/C:/Users/Osman/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.3.0/jackson-annotations-2.3.0.jar, file:/C:/Users/Osman/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.3.3/jackson-core-2.3.3.jar, file:/C:/Users/Osman/.m2/repository/org/apache/commons/commons-lang3/3.3.2/commons-lang3-3.3.2.jar, file:/C:/Users/Osman/.m2/repository/org/webjars/bootstrap/2Exception in thread "main" .3.2/bootstrap-2.3.2.jar, file:/C:/Users/Osman/.m2/repository/org/webjars/jquery/1.11.0/jquery-1.11.0.jar, file:/C:/Users/Osman/.m2/repository/org/webjars/angularjs/1.2.12/angularjs-1.2.12.jar, file:/C:/Users/Osman/.m2/repository/org/webjars/angular-ui-router/0.2.10-1/angular-ui-router-0.2.10-1.jar, file:/C:/Users/Osman/.m2/repository/org/webjars/angularjs-nvd3-directives/0.0.7-1/angularjs-nvd3-directives-0.0.7-1.jar, file:/C:/Users/Osman/.m2/repository/org/webjars/d3js/3.4.11/d3js-3.4.11.jar, file:/C:/Users/Osman/.m2/repository/org/webjars/nvd3/1.1.15-beta/nvd3-1.1.15-beta.jar, file:/C:/Users/Osman/.m2/repository/org/objenesis/objenesis/1.0/objenesis-1.0.jar]
org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:135)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:476)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:120)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:648)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:311)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:909)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:898)
at org.neo4j.twitter_graph.TwitterApplication.main(TwitterApplication.java:48)
Caused by: org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:106)
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.<init>(TomcatEmbeddedServletContainer.java:69)
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getTomcatEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:270)
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:145)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:159)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:132)
... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardServer[-1]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.startup.Tomcat.start(Tomcat.java:341)
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:79)
... 12 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Tomcat]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:731)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 14 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 16 more
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.StandardEngine.startInternal(StandardEngine.java:300)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 18 more
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 14.924s
Finished at: Sun May 14 14:48:12 MSK 2017
Final Memory: 10M/158M
------------------------------------------------------------------------
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:exec (default-cli) on project sdn-twitter-graph: Command execution failed. Process exited with an error: 1(Exit value: 1) -> [Help 1]
You might start working on these troubleshooting steps to identify/resolve the issue:
Looked for multiple jars/versions
Tomcat & Java compatibility
Clean /Restart/Reimport the project
If it still not resolved then you might look for specific jars like Servlet3. Spring Bootdepends on Servlet 3 or higher to work, check for these issues.
You can check this for more details!

Can't deploy YouTrack on Tomcat 7 (org.apache.catalina.LifecycleException)

I'm trying to install YouTrack. I installed Tomcat 7 and that works fine (I'm able to load localhost:8080). Now I'm trying to deploy YouTrack. I followed the instructions on their website:
Deploy youtrack-xx.war in Tomcat servlet container:
If you run Tomcat (e.g. as a Windows service), stop Tomcat instance before deploying YouTrack.
Save youtrack-xx.war in the $TOMCAT_HOME$/webapps directory. Rename youtrack-xx.war file as required before deploying. In the
further examples we assume that the YouTrack servlet name is set to
youtrack.war.
Start Apache Tomcat and check whether YouTrack is set up correctly and is available (in a web browser navigate to
http://yourserver:<Tomcat port>/youtrack).
At step 3. I can't access YouTrack. I get a 404. If I go to the management site of Tomcat, it says that the Running state of YouTrack is false. If I click Start, it will display this error message:
FAIL - Application at context path /youtrack could not be started
FAIL - Encountered exception org.apache.catalina.LifecycleException:
Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/youtrack]]
I looked at logs/catalina.out and this is the full error:
Information: Deploying web application directory /usr/local/apache-tomcat-7.0.50/webapps/youtrack
Feb 02, 2014 3:19:26 PM org.apache.catalina.core.ContainerBase addChildInternal
Schwerwiegend: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/youtrack]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:634)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1230)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1876)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
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: java.lang.NoClassDefFoundError: org/apache/log4j/xml/DOMConfigurator
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2397)
at java.lang.Class.getDeclaredFields(Class.java:1806)
at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:106)
at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:263)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:142)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:67)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:407)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:883)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:378)
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:5343)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 10 more
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.xml.DOMConfigurator
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
... 24 more
Feb 02, 2014 3:19:26 PM org.apache.catalina.startup.HostConfig deployDirectory
Schwerwiegend: Error deploying web application directory /usr/local/apache-tomcat-7.0.50/webapps/youtrack
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/youtrack]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:634)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1230)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1876)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
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)
It looks like some classes are missing, but the one that is referenced in the error does actually exist:
$TOMCAT$/webapps/youtrack/org/apache/log4j/xml:
Do you have a brand new Tomcat installation, or are there some modifications made in terms of %TOMCAT%\lib folder content? Could this be the case that you have the issue described under Update in this comment: https://stackoverflow.com/a/8832023/469159?

Categories

Resources