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

Tomcat não inicializa servlet do Spring

Pessoal, vinha acompanhando as aulas normalmente até que tive um problema no meu disco e precisei formatar e reinstalar o windows. Para voltar a acompanhar o curso baixei o projeto da aula 2, importei ele como um maven project, adicionei ele ao tomcat e subi o servidor. Ao subir percebi que o tomcat não inicializa o Servlet do Spring de forma que dá erro 404 para todos os requests.

Fiz alguns testes mexendo no Project Facets do projeto e nas propiedades do servidor mas nada resolveu.

Vou colocar abaixo a mensagem que aparece no console quando subo o projeto.

jul 28, 2020 11:20:31 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Server version name: Apache Tomcat/9.0.37 jul 28, 2020 11:20:31 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Server built: Jun 30 2020 20:09:49 UTC jul 28, 2020 11:20:31 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Server version number: 9.0.37.0 jul 28, 2020 11:20:31 AM org.apache.catalina.startup.VersionLoggerListener log INFO: OS Name: Windows 10 jul 28, 2020 11:20:31 AM org.apache.catalina.startup.VersionLoggerListener log INFO: OS Version: 10.0 jul 28, 2020 11:20:31 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Architecture: amd64 jul 28, 2020 11:20:31 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Java Home: C:\Program Files\Java\jdk-13.0.2 jul 28, 2020 11:20:31 AM org.apache.catalina.startup.VersionLoggerListener log INFO: JVM Version: 13.0.2+8 jul 28, 2020 11:20:31 AM org.apache.catalina.startup.VersionLoggerListener log INFO: JVM Vendor: Oracle Corporation jul 28, 2020 11:20:31 AM org.apache.catalina.startup.VersionLoggerListener log INFO: CATALINA_BASE: C:\Users\alexg\eclipse-workspace.metadata.plugins\org.eclipse.wst.server.core\tmp0 jul 28, 2020 11:20:31 AM org.apache.catalina.startup.VersionLoggerListener log INFO: CATALINA_HOME: C:\Users\alexg\Downloads\apache-tomcat-9.0.37-windows-x64\apache-tomcat-9.0.37 jul 28, 2020 11:20:31 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Dcatalina.base=C:\Users\alexg\eclipse-workspace.metadata.plugins\org.eclipse.wst.server.core\tmp0 jul 28, 2020 11:20:31 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Dcatalina.home=C:\Users\alexg\Downloads\apache-tomcat-9.0.37-windows-x64\apache-tomcat-9.0.37 jul 28, 2020 11:20:31 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Dwtp.deploy=C:\Users\alexg\eclipse-workspace.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps jul 28, 2020 11:20:31 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Dfile.encoding=Cp1252 jul 28, 2020 11:20:31 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: Loaded Apache Tomcat Native library [1.2.24] using APR version [1.7.0]. jul 28, 2020 11:20:31 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. jul 28, 2020 11:20:31 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] jul 28, 2020 11:20:31 AM org.apache.catalina.core.AprLifecycleListener initializeSSL INFO: OpenSSL successfully initialized [OpenSSL 1.1.1g 21 Apr 2020] jul 28, 2020 11:20:32 AM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["http-nio-8080"] jul 28, 2020 11:20:33 AM org.apache.catalina.startup.Catalina load INFO: Server initialization in [1761] milliseconds jul 28, 2020 11:20:33 AM org.apache.catalina.core.StandardService startInternal INFO: Starting service [Catalina] jul 28, 2020 11:20:33 AM org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet engine: [Apache Tomcat/9.0.37] jul 28, 2020 11:20:33 AM org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom WARNING: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [129] milliseconds. jul 28, 2020 11:20:34 AM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-nio-8080"] jul 28, 2020 11:20:34 AM org.apache.catalina.startup.Catalina start INFO: Server startup in [969] milliseconds

insira seu código aqui
2 respostas

Todo o código está igual o projeto disponibilizado com exceção das configurações do banco de dados.

Dentro do Tomcat o projeto aparece como um J2EE Web Module.

solução!

Desinstalando o eclipse e instalando a versão Java EE o problema não ocorreu mais!