Failure to startar Tomcat

Asked

Viewed 322 times

0

When I try to start the TomCat 7 in my project called ribeiraoreefshop, triggers the error of start the main one would be as follows:

Failed to start Component [Standardengine[Catalina]. Standardhost[localhost]. Standardcontext[/ribeiraoreefshop]

Below the Tomcat start error console that fires.

mai 21, 2018 6:26:41 pm org.apache.Tomcat.util.digester.Setpropertiesrule Begin WARNING: [Setpropertiesrule]{Server/Service/Engine/Host/Context} Setting Property 'source' to 'org.eclipse.jst.jee.server:ribeiraoreefshop' Did not find a matching Property. mai 21, 2018 6:26:42 pm org.apache.Catalina.startup.Versionloggerlistener log INFO: Server version: Apache Tomcat/7.0.85 mai 21, 2018 6:26:42 pm org.apache.Catalina.startup.Versionloggerlistener log INFORMATION: Server built: Feb 7 2018 18:52:33 UTC mai 21, 2018 6:26:42 pm org.apache.Catalina.startup.Versionloggerlistener log INFORMATION: Server number: 7.0.85.0 mai 21, 2018 6:26:42 pm org.apache.Catalina.startup.Versionloggerlistener log INFO: OS Name: Windows 8.1 mai 21, 2018 6:26:42 pm org.apache.Catalina.startup.Versionloggerlistener log INFORMATION: OS Version: 6.3 mai 21, 2018 6:26:42 pm org.apache.Catalina.startup.Versionloggerlistener log INFORMATION: Architecture: amd64 mai 21, 2018 6:26:42 pm org.apache.Catalina.startup.Versionloggerlistener log INFORMATION: Java Home: C: Program Files Java jre1.8.0_172 mai 21, 2018 6:26:42 pm org.apache.Catalina.startup.Versionloggerlistener log INFORMATION: JVM Version: 1.8.0_172-B11 mai 21, 2018 6:26:42 pm org.apache.Catalina.startup.Versionloggerlistener log INFORMATION: JVM Vendor: Oracle Corporation mai 21, 2018 6:26:42 pm org.apache.Catalina.startup.Versionloggerlistener log INFO: CATALINA_BASE: C: Users Tiago workspaceTiago.metadata.plugins org.eclipse.wst.server.core tmp0 mai 21, 2018 6:26:42 pm org.apache.Catalina.startup.Versionloggerlistener log INFO: CATALINA_HOME: C: Program Files Apache Software Foundation Tomcat 7.0 mai 21, 2018 6:26:42 pm org.apache.Talina.startup.Versionloggerlistener

mai 21, 2018 6:27:05 PM org.apache.Talina.core.Containerbase startInternal GRAVE: A Child container failed During start java.util.Concurrent.Executionexception: org.apache.Catalina.Lifecycleexception: Failed to start Component [Standardengine[Catalina]. Standardhost[localhost]] at java.util.Concurrent.FutureTask.report(Unknown Source) at java.util.Concurrent.FutureTask.get(Unknown Source) at org.apache.Catalina.core.Containerbase.startInternal(Containerbase.java:1239) at org.apache.Catalina.core.Standardengine.startInternal(Standardengine.java:300) at org.apache.Catalina.util.Lifecyclebase.start(Lifecyclebase.java:145) at org.apache.Catalina.core.Standardservice.startInternal(Standardservice.java:444) at org.apache.Catalina.util.Lifecyclebase.start(Lifecyclebase.java:145) at org.apache.Catalina.core.Standardserver.startInternal(Standardserver.java:758) at org.apache.Catalina.util.Lifecyclebase.start(Lifecyclebase.java:145) at org.apache.Catalina.startup.Catalina.start(Catalina.java:705) at sun.reflect..Nativemethodaccessorimpl.invoke0(Native Method) at sun.reflect..Nativemethodaccessorimpl.invoke(Unknown Source) at sun.reflect.Delegatingmethodaccessorimpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.Catalina.startup.Bootstrap.start(Bootstrap.java:294) at org.apache.Catalina.startup.Bootstrap.main(Bootstrap.java:428) Caused by: org.apache.Catalina.Lifecycleexception: Failed to start Component [Standardengine[Catalina]. Standardhost[localhost]] at org.apache.Catalina.util.Lifecyclebase.start(Lifecyclebase.java:162) at org.apache.Containerbase$Startchild.call(Containerbase.java:1700) at org.apache.Catalina.core.Containerbase$Startchild.call(Containerbase.java:1690) at java.util.Concurrent.FutureTask.run(Unknown Source) at java.util.Concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.Concurrent.Threadpoolexecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: org.apache.Catalina.Lifecycleexception: Child container failed During start at org.apache.Catalina.core.Containerbase.startInternal(Containerbase.java:1247) at org.apache.Catalina.core.Standardhost.startInternal(Standardhost.java:819) at org.apache.Catalina.util.Lifecyclebase.start(Lifecyclebase.java:145) ... 6 more

mai 21, 2018 6:27:05 PM org.apache.Catalina.startup.Catalina start start GRAVE: The required Server Component failed to start so Tomcat is Unable to start. org.apache.Catalina.Lifecycleexception: Failed to start Component [Standardserver[8005]] at org.apache.Catalina.util.Lifecyclebase.start(Lifecyclebase.java:162) at org.apache.Catalina.startup.Catalina.start(Catalina.java:705) at sun.reflect..Nativemethodaccessorimpl.invoke0(Native Method) at sun.reflect..Nativemethodaccessorimpl.invoke(Unknown Source) at sun.reflect.Delegatingmethodaccessorimpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.Catalina.startup.Bootstrap.start(Bootstrap.java:294) at org.apache.Catalina.startup.Bootstrap.main(Bootstrap.java:428) Caused by: org.apache.Catalina.Lifecycleexception: Failed to start Component [Standardservice[Catalina]] at org.apache.Catalina.util.Lifecyclebase.start(Lifecyclebase.java:162) at org.apache.Catalina.core.Standardserver.startInternal(Standardserver.java:758) at org.apache.Catalina.util.Lifecyclebase.start(Lifecyclebase.java:145) ... 7 more Caused by: org.apache.Catalina.Lifecycleexception: Failed to start Component [Standardengine[Catalina]] at org.apache.Catalina.util.Lifecyclebase.start(Lifecyclebase.java:162) at org.apache.Catalina.core.Standardservice.startInternal(Standardservice.java:444) at org.apache.Catalina.util.Lifecyclebase.start(Lifecyclebase.java:145) ... 9 more Caused by: org.apache.Catalina.Lifecycleexception: A Child container failed During start at org.apache.Catalina.core.Containerbase.startInternal(Containerbase.java:1247) at org.apache.Catalina.core.Standardengine.startInternal(Standardengine.java:300) at org.apache.Catalina.util.Lifecyclebase.start(Lifecyclebase.java:145) ... 11 more

mai 21, 2018 6:27:05 PM org.apache.Coyote.Abstractprotocol pause INFORMATION: Pausing Protocolhandler ["http-bio-8080"] May 21, 2018 6:27:05 PM org.apache.Coyote.Abstractprotocol pause INFORMATION: Pausing Protocolhandler ["ajp-bio-8009"] May 21, 2018 6:27:05 PM org.apache.Catalina.core.Standardservice stopInternal INFORMATION: Stopping service Catalina May 21, 2018 6:27:05 PM org.apache.Coyote.Abstractprotocol Destroy INFORMATION: Destroying Protocolhandler ["http-bio-8080"] May 21, 2018 6:27:05 PM org.apache.Coyote.Abstractprotocol Destroy INFORMATION: Destroying Protocolhandler ["ajp-bio-8009"]

I have tried the solutions implemented on the internet and none worked. What may be occurring?

1 answer

0


The solution found was: 1st - Create the class JPAUtil to create the EntityManager

@ApplicationScoped
public class JPAUtil {

      private EntityManagerFactory entityManagerFactory = Persistence
        .createEntityManagerFactory("postgreSQL");


      public JPAUtil() {

      }

      @Produces
      @RequestScoped
      public EntityManager getEntityManager() {
          return entityManagerFactory.createEntityManager();
      }

      public void close(@Disposes EntityManager em) {
          em.close();
      }

}

2º - Map the class JPAUtil.java in the beans.xml as follows in the attribute bean-discovery-mode:

<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
                        http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
version="1.1" bean-discovery-mode="all">

But the annotation @ApplicationScoped already makes this mapping.

Browser other questions tagged

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