Solucionado (ver solução)
Solucionado
(ver solução)
24
respostas

alura-shows não sobe para o browser

jun 15, 2020 5:10:13 PM org.apache.catalina.core.StandardContext startInternal
GRAVE: One or more listeners failed to start. Full details will be found in the appropriate container log file
jun 15, 2020 5:10:13 PM org.apache.catalina.core.StandardContext startInternal
GRAVE: Context [/alura-shows] startup failed due to previous errors
jun 15, 2020 5:10:13 PM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: Closing Spring root WebApplicationContext
jun 15, 2020 5:10:13 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
ADVERTÊNCIA: The web application [alura-shows] 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.
jun 15, 2020 5:10:13 PM org.apache.coyote.AbstractProtocol start
INFORMAÇÕES: Starting ProtocolHandler ["http-nio-8080"]
jun 15, 2020 5:10:13 PM org.apache.catalina.startup.Catalina start
INFORMAÇÕES: Server startup in [7.333] milliseconds

gostaria de uma solução haja vista todos os posts referentes ao assunto forma tentados por mim, mas nao obtive solução

24 respostas

Oi roberto

Acredito que a causa do erro esteja mais no começo do stack, poderia enviar a pilha de mensagens completa?

jun 16, 2020 12:02:57 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {5.1.0.Final}
jun 16, 2020 12:02:57 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
jun 16, 2020 12:02:57 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
jun 16, 2020 12:02:58 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
jun 16, 2020 12:02:59 PM org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator initiateService
WARN: HHH000342: Could not obtain connection to query metadata : Client does not support authentication protocol requested by server; consider upgrading MySQL client
jun 16, 2020 12:02:59 PM org.springframework.web.context.support.AnnotationConfigWebApplicationContext refresh
ADVERTÊNCIA: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [br/com/alura/owasp/infra/JPAConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
jun 16, 2020 12:02:59 PM org.springframework.web.context.ContextLoader initWebApplicationContext
GRAVE: Context initialization failed

Otávio, muito obrigado pelo auxílio

Não consigo postar o código todo, pois aqui só aceita 5000 caracteres, dai irei mandar o restante abaixo.

Peço que me ajude a solucionar esse problema para que eu possa prosseguir com o curso.

O pacote que baixei no site da alura "alura-shows" está com erros (nas linhas que marquei no exemplo abaixo com o simbolo) ⁋ na pasta web inf, isso não está influenciando?

<%@ include file="/WEB-INF/views/cabecalho.jsp"%>
<div class="modal-dialog" style="margin-top: 10%">
    <div class="modal-content">
        <div class="modal-header">
            <h3 class="text-center">Área administrativa!</h3>
            <p style="color: red;font-weight:bold">${mensagem}</p>
        </div>
    ⁋    <form id="login-form" ⁋ ⁋action="${s:mvcUrl('AC#loginAdmin').build()}"
    ⁋        method="post" role="form" style="display: block;">
        ⁋    <div class="modal-body">
                <div class="form-group">
                    <input type="text" class=

abraço

segue o restante do errro apresentado no console:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [br/com/alura/owasp/infra/JPAConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1054)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:829)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4676)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5139)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
    at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
    at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
    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:343)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474)
Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:244)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:208)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:189)
    at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:51)
    at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:94)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:217)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:189)
    at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.handleTypes(MetadataBuildingProcess.java:352)
    at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:111)
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:848)
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:876)
    at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:60)
    at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:343)
    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:319)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
    ... 42 more
Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
    at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:100)
    at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:54)
    at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:137)
    at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
    at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:88)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:234)
    ... 57 more
jun 16, 2020 12:02:59 PM org.apache.catalina.core.StandardContext listenerStart
GRAVE: Exceção ao enviar evento de contexto iniciado para instância listener da classe [org.springframework.web.context.ContextLoaderListener]
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [br/com/alura/owasp/infra/JPAConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1054)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:829)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4676)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5139)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
    at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
    at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
    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:343)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474)
Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:244)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:208)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:189)
    at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:51)
    at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:94)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:217)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:189)
    at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.handleTypes(MetadataBuildingProcess.java:352)
    at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:111)
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:848)
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:876)
    at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:60)
    at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:343)
    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:319)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
    ... 42 more
Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
    at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:100)
    at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:54)
    at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:137)
    at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
    at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:88)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:234)
    ... 57 more
jun 16, 2020 12:02:59 PM org.apache.catalina.core.StandardContext startInternal
GRAVE: One or more listeners failed to start. Full details will be found in the appropriate container log file
jun 16, 2020 12:02:59 PM org.apache.catalina.core.StandardContext startInternal
GRAVE: Context [/alura-shows] startup failed due to previous errors
jun 16, 2020 12:02:59 PM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: Closing Spring root WebApplicationContext
jun 16, 2020 12:02:59 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
ADVERTÊNCIA: The web application [alura-shows] 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.
jun 16, 2020 12:02:59 PM org.apache.coyote.AbstractProtocol start
INFORMAÇÕES: Starting ProtocolHandler ["http-nio-8080"]
jun 16, 2020 12:02:59 PM org.apache.catalina.startup.Catalina start
INFORMAÇÕES: Server startup in [9.363] milliseconds
jun 16, 2020 12:02:48 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Server version name:   Apache Tomcat/9.0.36
jun 16, 2020 12:02:48 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Server built:          Jun 3 2020 17:07:09 UTC
jun 16, 2020 12:02:48 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Server version number: 9.0.36.0
jun 16, 2020 12:02:48 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: OS Name:               Windows 10
jun 16, 2020 12:02:48 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: OS Version:            10.0
jun 16, 2020 12:02:48 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Architecture:          amd64
jun 16, 2020 12:02:48 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Java Home:             C:\Program Files\Java\jre1.8.0_251
jun 16, 2020 12:02:48 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: JVM Version:           1.8.0_251-b08
jun 16, 2020 12:02:48 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: JVM Vendor:            Oracle Corporation
jun 16, 2020 12:02:48 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: CATALINA_BASE:         C:\Users\Jr\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
jun 16, 2020 12:02:48 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: CATALINA_HOME:         C:\Users\Jr\Downloads\apache-tomcat-9.0.36
jun 16, 2020 12:02:48 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dcatalina.base=C:\Users\Jr\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
jun 16, 2020 12:02:48 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dcatalina.home=C:\Users\Jr\Downloads\apache-tomcat-9.0.36
jun 16, 2020 12:02:48 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dwtp.deploy=C:\Users\Jr\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
jun 16, 2020 12:02:48 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Djava.endorsed.dirs=C:\Users\Jr\Downloads\apache-tomcat-9.0.36\endorsed
jun 16, 2020 12:02:48 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dfile.encoding=Cp1252
jun 16, 2020 12:02:48 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFORMAÇÕES: Loaded Apache Tomcat Native library [1.2.24] using APR version [1.7.0].
jun 16, 2020 12:02:48 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFORMAÇÕES: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
jun 16, 2020 12:02:48 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFORMAÇÕES: APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
jun 16, 2020 12:02:48 PM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFORMAÇÕES: OpenSSL successfully initialized [OpenSSL 1.1.1g  21 Apr 2020]
jun 16, 2020 12:02:49 PM org.apache.coyote.AbstractProtocol init
INFORMAÇÕES: Initializing ProtocolHandler ["http-nio-8080"]
jun 16, 2020 12:02:50 PM org.apache.catalina.startup.Catalina load
INFORMAÇÕES: Server initialization in [2.008] milliseconds
jun 16, 2020 12:02:50 PM org.apache.catalina.core.StandardService startInternal
INFORMAÇÕES: Starting service [Catalina]
jun 16, 2020 12:02:50 PM org.apache.catalina.core.StandardEngine startInternal
INFORMAÇÕES: Starting Servlet engine: [Apache Tomcat/9.0.36]
jun 16, 2020 12:02:54 PM org.apache.jasper.servlet.TldScanner scanJars
INFORMAÇÕES: 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.
jun 16, 2020 12:02:54 PM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: 1 Spring WebApplicationInitializers detected on classpath
jun 16, 2020 12:02:55 PM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: Initializing Spring root WebApplicationContext
jun 16, 2020 12:02:55 PM org.springframework.web.context.ContextLoader initWebApplicationContext
INFORMAÇÕES: Root WebApplicationContext: initialization started

Oi roberto

Esse erro nos dá uma pista melhor agora:

Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set

Tenta setar na sua classe JPAConfiguration o hibernate.dialect no método additionalProperties(), exemplo:

Properties additionalProperties() {
          Properties properties = new Properties();
          properties.setProperty("hibernate.dialect", "org.hibernate.dialect.MySQL5Dialect");
          properties.setProperty("hibernate.hbm2ddl.auto", "update");
          properties.setProperty("hibernate.show_sql", "true");
          return properties;
       }

Também poderia ser a versão do mysql. O projeto está preparado para se conectar no MySQL 5, pode ser que o seu seja MySQL 8.

Boa tarde Otávio!

Muito obrigado pelo auxílio!

Segui os passos sugeridos por você e reinstalei o MySQL 5, assim como introduzi o código no JPA, conforme suas orientações. no entanto os erros permanecem e o projeto não sobe pro browser - status 404 -. ainda, estou usando o Tomcat 8.5.56 para que tudo fique igual ao do instrutor, mas não obtive exito.

Como podemos solucionar esse problema?

Gratidão!

Olá, Roberto!

Pelo erros, parece que a versão do MySQL está mais nova do que a do curso, como o Otávio mencionou.

Você instalou qual versão do MySQL? Dá pra descobrir isso acessado pelo Terminal:

mysql -u root

(Talvez ele peça a senha).

Nos logs que você enviou aparece a versão 9.0.36 do Tomcat:

INFORMAÇÕES: Server version name:   Apache Tomcat/9.0.36

Você já testou com a versão 8.5.56, né?

Uma dúvida: você está acessando com a URL http://localhost:8080/alura-shows?

Alexandre, bom dia!

Primeiramente gostaria e lhe agradecer pelo auxílio.

Após o posto do Otávio rwfiz o procedimento instalando o MYSQL5 e à versão 8.57 do Tomcat. Entretanto continuo não subindo o projeto para o browser. Notei que o pacote alura-show apresenta vários erros - em vermelho- no pacote views. Também inclui os códigos que ele sugeriu no JPAConfigurations e tb não resolveu o problema.

Aguardo novas instruções.

Gratidão.

Olá, Roberto!

Os erros nos arquivos .jsp são de validação da IDE. Acontecem na minha também. Pode ignorá-los.

Teria como você postar os logs novamente?

Obrigado!

insira seu código aqui

Alexandre,

Conforme você solicitou segue o link com os logs do console: https://docs.google.com/document/d/1mtVymsaWhKS8mg0R4e2mVBiZlo06GtUs1Qg4OXoz2TU/edit?usp=sharing

Permaneço à disposição para enviar mais informações .

at Roberto

Essa é a mensagem de erro que aparece no navegador: HTTP Status 404 – Not Found Type Status Report

Message The requested resource [/alura-shows] is not available

Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

Apache Tomcat/8.5.56

Olá, Roberto.

Analisando os logs, parece que há um problema na usuário e senha do MySQL:

Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)

É necessário modificar tanto a classe ConnectionFactory como a classe JPAConfiguration.

Entendo,

Você poderia passar um passo a passo e os códigos correspondentes para que eu realize esse procedimento?

ps: ao instalar o MySQL cadastrei o usuário e senha e estou logado com ela. Além disso, inseri no JPAConfiguration pelo Eclipse o código postado pelo Otávio:

Properties additionalProperties() {
          Properties properties = new Properties();
          properties.setProperty("hibernate.dialect", "org.hibernate.dialect.MySQL5Dialect");
          properties.setProperty("hibernate.hbm2ddl.auto", "update");
          properties.setProperty("hibernate.show_sql", "true");
          return properties;
       }

Como devo proceder a partir de agora?

Alexandre, pelo Eclipse entrei na pasta SRV/JPAConfiguration.java e inseri o código que o Otávio passou, copiei ele pra você verificar: https://docs.google.com/document/d/1o1j1a3exwgL_iGBRm6J-kWnrWzLlR4bHf6kYy1OCT80/edit?usp=sharing

Como faço pra alterar a outra classe que você me orientou?

Na classe ConnectionFactory os códigos estão assim:

package br.com.alura.owasp.util;

import java.sql.Connection;
import java.sql.DriverManager;

public class ConnectionFactory {

    public Connection getConnection() {
        try {
            return DriverManager.getConnection("jdbc:mysql://localhost/owasp?createDatabaseIfNotExist=true",
                    "root", "");
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}

Gostaria de orientações com os códigos que devo inserir nela e sua ajuda também para que eu consiga retirar a senha do MySql se isso for necessário.

At Roberto

solução!

Olá, Roberto.

Marquei no código abaixo onde você deve alterar o usuário e a senha do seu MySQL na classe JPAConfiguration:

@Configuration
@EnableTransactionManagement
public class JPAConfiguration {

  // restante do código omitido...

 @Bean       
       public DataSource dataSource(Environment environment){
          DriverManagerDataSource dataSource = new DriverManagerDataSource();
          dataSource.setDriverClassName("com.mysql.jdbc.Driver");
          dataSource.setUrl("jdbc:mysql://localhost:3306/owasp?createDatabaseIfNotExist=true");
          dataSource.setUsername( "root" ); // COLOCAR AQUI O USUARIO
          dataSource.setPassword( "" ); // COLOCAR AQUI A SENHA
          return dataSource;
       }

}     

Já na classe ConnectionFactory:

public class ConnectionFactory {

    public Connection getConnection() {
        try {
            return DriverManager.getConnection("jdbc:mysql://localhost/owasp?createDatabaseIfNotExist=true",
                    "root", ""); //COLOCAR USUARIO E DEPOIS A SENHA
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}

Alexandre,

Muitíssimo obrigado pelo auxílio e parabéns pelo trabalho de excelência que você realizou neste suporte!

Gratidão.

Olá, Roberto!

Que bom que consegui ajudar.

Bons estudos!

Abraço

Abraços