Error deploying with Tomcat 7

Asked

Viewed 291 times

2

I made an app with springboot and when I run it inside the springboot it works normally but when I run War and I put to run in Tomcat it gives some errors. I’ve tried a few things I’ve seen on the Internet, but so far nothing’s helped me. I have no idea what these errors mean or what to do to solve, the only one I know from the logs is that something is related to jdbc or Hibernate...

No manager appears these messages:

FAIL - Application at context path /brides-0.0.1-SNAPSHOT could not be Started FAIL - Encountered Exception org.apache.Catalina.Lifecycleexception: Failed to start Component [Standardengine[Catalina]. Standardhost[localhost]. Standardcontext[/brides-0.0.1-SNAPSHOT]]

And in the logs:

GRAVE: Containerbase.addChild: start: org.apache.Catalina.Lifecycleexception: Failed to start Component [Standardengine[Catalina]. Standardhost[localhost]. Standardcontext[/brides-0.0.1-SNAPSHOT]] (continues...)

Caused by: org.springframework.Beans.factory.Beancreationexception: Error Creating bean with name 'entityManagerFactory' defined in class path Resource [org/springframework/boot/autoconfigure/Orm/jpa/Hibernatejpaconfiguration.class]: Invocation of init method failed; nested Exception is javax.persistence.Persistenceexception: [Persistenceunit: default] Unable to build Hibernate Sessionfactory; nested Exception is org.hibernate.cfg.beanvalidation.Integrationexception: Error Activating Bean Validation Integration

Caused by: javax.persistence.Persistenceexception: [Persistenceunit: default] Unable to build Hibernate Sessionfactory; nested Exception is org.hibernate.cfg.beanvalidation.Integrationexception: Error Activating Bean Validation Integration

Caused by: org.hibernate.cfg.beanvalidation.Integrationexception: Error Activating Bean Validation Integration

Caused by: java.lang.Noclassdeffounderror: javax/el/Elmanager

GRAVE: Error deploying web application Archive C: Program Files Apache Software Foundation Tomcat 7.0 webapps brides-0.0.1-SNAPSHOT. War java.lang.Illegalstateexception: Containerbase.addChild: start: org.apache.Catalina.Lifecycleexception: Failed to start Component [Standardengine[Catalina]. Standardhost[localhost]. Standardcontext[/brides-0.0.1-SNAPSHOT]]

GRAVE: The web application [/brides-0.0.1-SNAPSHOT] Registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To Prevent a memory Leak, the JDBC Driver has been forcibly unregistered. Jul 19, 2018 9:51:43 AM org.apache.Catalina.loader.Webappclassloaderbase clearReferencesThreads

GRAVE: The web application [/brides-0.0.1-SNAPSHOT] appears to have Started a thread named [Abandoned Connection Cleanup thread] but has failed to stop it. This is very likely to create a memory Leak. jul 19, 2018 9:51:43 AM org.apache.Catalina.loader.Webappclassloaderbase validateJarFile

INFO: validateJarFile(C: Program Files Apache Software Foundation Tomcat 7.0 webapps brides-0.0.1-SNAPSHOT WEB-INF lib Tomcat-embed-core-8.5.31.jar) - jar not Loaded. See Servlet Spec 3.0, Section 10.7.2. Offending class: javax/Servlet/Servlet.class Jul 19, 2018 9:51:43 AM org.apache.Catalina.loader.Webappclassloaderbase validateJarFile

INFO: validateJarFile(C: Program Files Apache Software Foundation Tomcat 7.0 webapps brides-0.0.1-SNAPSHOT WEB-INF lib Tomcat-embed-el-8.5.31.jar) - jar not Loaded. See Servlet Spec 3.0, Section 10.7.2. Offending class: javax/el/Expression.class Jul 19, 2018 9:51:44 AM org.apache.Catalina.loader.Webappclassloaderbase findResourceInternal

INFO: Illegal access: this web application instance has been stopped already. Could not load . The eventual following stack trace is caused by an error thrown for debugging purposes as well as to Attempt to terminate the thread which caused the illegal access, and has no Functional Impact. Jul 19, 2018 9:51:48 AM org.apache.Catalina.startup.Tldconfig run

INFORMATION: At least one JAR was Scanned for Tlds yet contained no Tlds. Enable debug logging for this logger for a complete list of Jars that Were Scanned but no Tlds Were found in them. Skipping unneeded Jars During Scanning can improve startup time and JSP Compilation time.

  • Not if you still need help, but how did you build your?

1 answer

0

Well, first as you will deploy in an external container, mark the container dependency as provided, for example, in the pom.xmlchange the dependency to look like in the example below:

<!-- marca o container como provided -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-tomcat</artifactId>
    <scope>provided</scope>
</dependency>

Generate War again and try to deploy it. Hug.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.