1
resposta

Erro 404 ao tentar acessar http://localhost:8080/projeto-jpa-2/

Segui os procedimentos informados, criei um banco de dados no mysql chamado projeto_jpa. Instalei o tomcat e confirmei que está funcionando, pois o localhost:8080 carrega a página do tomcat. Alterei o nome da pasta do projeto para projeto-jpa-2, e configurei o getDataSource para estar de acordo com minha máquina. Mas mesmo assim, ao visitar a página do projeto dá erro 404. Já li as postagens de outras pessoas com o mesmo problema, tentei o que fizeram mas não deu certo pra mim. Por isso, deletei projeto e importei novamente para que não fique muito diferente do original. Segue cópia parcial do console, pois a cópia inteira excede limite de caracteres.

Jul 12, 2020 4:43:44 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2895 ms
Jul 12, 2020 4:43:44 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service [Catalina]
Jul 12, 2020 4:43:44 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.5.57
Jul 12, 2020 4:43:54 PM org.apache.jasper.servlet.TldScanner scanJars
INFO: 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.
Jul 12, 2020 4:43:54 PM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Jul 12, 2020 4:43:54 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory [C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\docs]
Jul 12, 2020 4:43:54 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory [C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\docs] has finished in [51] ms
Jul 12, 2020 4:43:54 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory [C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\examples]
Jul 12, 2020 4:43:55 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jul 12, 2020 4:43:55 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jul 12, 2020 4:43:55 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('StockTicker', 'async.Stockticker@73ae1e5e')
Jul 12, 2020 4:43:55 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory [C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\examples] has finished in [1,223] ms
Jul 12, 2020 4:43:55 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory [C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\host-manager]
Jul 12, 2020 4:43:55 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory [C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\host-manager] has finished in [83] ms
Jul 12, 2020 4:43:55 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory [C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\manager]
Jul 12, 2020 4:43:55 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory [C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\manager] has finished in [62] ms
Jul 12, 2020 4:43:55 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory [C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\ROOT]
Jul 12, 2020 4:43:55 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory [C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\ROOT] has finished in [82] ms
Jul 12, 2020 4:43:55 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8080"]
Jul 12, 2020 4:43:55 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 11191 ms
1 resposta

Olá Zenildo, tudo bem? Peço desculpas pelo demora no retorno! Notei que você está utilizando o Tomcat diretamente instalado na sua máquina correto? Você poderia tentar usar a versão zip, pode ser versão 9 mesmo, estou utilizando ela e não tive nenhum problema com ela.

E fala pra gente o resultado!