6
respostas

HTTP Status 404 - /

Ao tentar acessar http://localhost:8080 ou http://localhost:8080/alura-shows/ , ele retorna mensagem:

HTTP Status 404 - /alura-shows/ type Status report

message /alura-shows/

description The requested resource is not available.

Apache Tomcat/8.0.36


Insira aqui a descrição dessa imagem para ajudar na acessibilidade


Insira aqui a descrição dessa imagem para ajudar na acessibilidade

Insira aqui a descrição dessa imagem para ajudar na acessibilidade

6 respostas

fev. 05, 2023 10:47:26 PM org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:alura-shows' did not find a matching property. fev. 05, 2023 10:47:26 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Server version: Apache Tomcat/8.0.36 fev. 05, 2023 10:47:26 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Server built: Jun 9 2016 13:55:50 UTC fev. 05, 2023 10:47:26 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Server number: 8.0.36.0 . java.lang.ClassNotFoundException: sun.misc.GC at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:435) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:377) at org.apache.catalina.core.JreMemoryLeakPreventionListener.lifecycleEvent(JreMemoryLeakPreventionListener.java:286) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:394) . . fev. 05, 2023 10:47:26 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["http-nio-8080"] fev. 05, 2023 10:47:27 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector INFO: Using a shared selector for servlet write/read fev. 05, 2023 10:47:27 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["ajp-nio-8009"] fev. 05, 2023 10:47:27 PM org.apache.coyote.AbstractProtocol init SEVERE: Failed to initialize end point associated with ProtocolHandler ["ajp-nio-8009"] java.lang.IllegalArgumentException: timeout < 0 at java.base/sun.nio.ch.ServerSocketAdaptor.setSoTimeout(ServerSocketAdaptor.java:161) at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:353) at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:748) at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:459) at org.apache.catalina.connector.Connector.initInternal(Connector.java:960) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.core.StandardService.initInternal(StandardService.java:568) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:869) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.startup.Catalina.load(Catalina.java:580) . . fev. 05, 2023 10:47:27 PM org.apache.catalina.core.StandardService initInternal SEVERE: Failed to initialize connector [Connector[AJP/1.3-8009]] org.apache.catalina.LifecycleException: Failed to initialize component [Connector[AJP/1.3-8009]] at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106) at org.apache.catalina.core.StandardService.initInternal(StandardService.java:568) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:869) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.startup.Catalina.load(Catalina.java:580) at org.apache.catalina.startup.Catalina.load(Catalina.java:603) . . . Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed at org.apache.catalina.connector.Connector.initInternal(Connector.java:962) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) ... 12 more Caused by: java.lang.IllegalArgumentException: timeout < 0 at java.base/sun.nio.ch.ServerSocketAdaptor.setSoTimeout(ServerSocketAdaptor.java:161) at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:353) at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:748) at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:459) at org.apache.catalina.connector.Connector.initInternal(Connector.java:960) ... 13 more

fev. 05, 2023 10:47:27 PM org.apache.catalina.startup.Catalina load . . . fev. 05, 2023 10:47:30 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-nio-8080"] fev. 05, 2023 10:47:30 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 3666 ms

bem eu consegui rodar sem erros, mas o tomcat está tomando um 404:

fev 07, 2023 9:06:46 PM org.apache.tomcat.util.digester.SetPropertiesRule begin ADVERTÊNCIA: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:alura-shows' did not find a matching property. fev 07, 2023 9:06:46 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Server version: Apache Tomcat/8.0.36 fev 07, 2023 9:06:46 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Server built: Jun 9 2016 13:55:50 UTC fev 07, 2023 9:06:46 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Server number: 8.0.36.0 fev 07, 2023 9:06:46 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: OS Name: Windows 10 fev 07, 2023 9:06:46 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: OS Version: 10.0 fev 07, 2023 9:06:46 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Architecture: amd64 fev 07, 2023 9:06:46 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Java Home: C:\Program Files\Java\jdk1.8.0_202\jre fev 07, 2023 9:06:46 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: JVM Version: 1.8.0_202-b08 fev 07, 2023 9:06:46 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: JVM Vendor: Oracle Corporation fev 07, 2023 9:06:46 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: CATALINA_BASE: C:\Users\Ranie\eclipse-workspace.metadata.plugins\org.eclipse.wst.server.core\tmp7

fev 07, 2023 9:06:46 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: CATALINA_HOME: D:\JavaWorkSpace\seguranca\apache\apache-tomcat-8.0.36 fev 07, 2023 9:06:46 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Dcatalina.base=C:\Users\Ranie\eclipse-workspace.metadata.plugins\org.eclipse.wst.server.core\tmp7 fev 07, 2023 9:06:46 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Dcatalina.home=D:\JavaWorkSpace\seguranca\apache\apache-tomcat-8.0.36 fev 07, 2023 9:06:46 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Dwtp.deploy=C:\Users\Ranie\eclipse-workspace.metadata.plugins\org.eclipse.wst.server.core\tmp7\wtpwebapps fev 07, 2023 9:06:46 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Djava.endorsed.dirs=D:\JavaWorkSpace\seguranca\apache\apache-tomcat-8.0.36\endorsed fev 07, 2023 9:06:46 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Dfile.encoding=Cp1252 fev 07, 2023 9:06:46 PM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Xmx512M fev 07, 2023 9:06:46 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFORMAÇÕES: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.8.0_202\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Users/Ranie/.p2/pool/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955/jre/bin/server;C:/Users/Ranie/.p2/pool/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955/jre/bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;D:\JavaWorkSpace\oradata\STEPALL_BDOG\18.0.0\dbhomeXE\bin;C:\SAP\ASE-16_0\jobscheduler\bin;C:\SAP\ASE-16_0\dll;C:\SAP\ASE-16_0\bin;C:\SAP\COCKPIT-4\bin;C:\SAP\DataAccess64\ADONET\dll;C:\SAP\DataAccess\ADONET\dll;C:\SAP\DataAccess64\ODBC\dll;C:\SAP\DataAccess\ODBC\dll;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn;C:\Oracle\product\11.2.0\client_x64\network\admin;C:\Windows\SysWOW64\ora112\network\admin;C:\Oracle\product\11.2.0\client_x64\BIN;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn;C:\Program Files\Microsoft SQL Server Migration Assistant for Sybase\bin;C:\Program Files\dotnet;C:\Users\Ranie.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm;C:\Program Files\Azure Data Studio\bin;C:\maven\apache-maven-3.8.2-bin\bin;C:\Program Files\MongoDB\Server\5.0\bin;C:\Program Files\PuTTY;C:\Program Files\nodejs;C:\Program Files (x86)\dotnet;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\gradle\bin;C:\Program Files\Git\cmd;C:\Users\Ranie\anaconda3;C:\Users\Ranie\anaconda3\Library\mingw-w64\bin;C:\Users\Ranie\anaconda3\Library\usr\bin;C:\Users\Ranie\anaconda3\Library\bin;C:\Users\Ranie\anaconda3\Scripts;C:\Users\Ranie\AppData\Local\Microsoft\WindowsApps;C:\Users\Ranie.dotnet\tools;C:\Program Files\JetBrains\PyCharm 2018.3.2\bin;C:\Users\Ranie\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\JetBrains\PyCharm Community Edition 2020.3.3\bin;C:\Users\Ranie.dotnet\tools;C:\Users\Ranie\AppData\Roaming\npm;C:\Windows\System32;;. fev 07, 2023 9:06:47 PM org.apache.coyote.AbstractProtocol init INFORMAÇÕES: Initializing ProtocolHandler ["http-nio-8080"] fev 07, 2023 9:06:48 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector INFORMAÇÕES: Using a shared selector for servlet write/read fev 07, 2023 9:06:48 PM org.apache.coyote.AbstractProtocol init INFORMAÇÕES: Initializing ProtocolHandler ["ajp-nio-8009"] fev 07, 2023 9:06:48 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector INFORMAÇÕES: Using a shared selector for servlet write/read fev 07, 2023 9:06:48 PM org.apache.catalina.startup.Catalina load INFORMAÇÕES: Initialization processed in 1884 ms fev 07, 2023 9:06:48 PM org.apache.catalina.core.StandardService startInternal

INFORMAÇÕES: Starting service Catalina fev 07, 2023 9:06:48 PM org.apache.catalina.core.StandardEngine startInternal INFORMAÇÕES: Starting Servlet Engine: Apache Tomcat/8.0.36 fev 07, 2023 9:06:49 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. fev 07, 2023 9:06:49 PM org.apache.coyote.AbstractProtocol start INFORMAÇÕES: Starting ProtocolHandler ["http-nio-8080"] fev 07, 2023 9:06:49 PM org.apache.coyote.AbstractProtocol start INFORMAÇÕES: Starting ProtocolHandler ["ajp-nio-8009"] fev 07, 2023 9:06:49 PM org.apache.catalina.startup.Catalina start INFORMAÇÕES: Server startup in 1457 ms

tentei executar o mvn "clean package spring-boot:repackage -X" , mas ele retorna isso:

[ERROR] No plugin found for prefix 'spring-boot' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\Ranie\.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'spring-boot' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\Ranie\.m2\repository), central (https://repo.maven.apache.org/maven2)]
    at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolve (DefaultPluginPrefixResolver.java:95)
    at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.findPluginForPrefix (MojoDescriptorCreator.java:266)
    at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor (MojoDescriptorCreator.java:220)
    at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments (DefaultLifecycleTaskSegmentCalculator.java:104)
    at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments (DefaultLifecycleTaskSegmentCalculator.java:83)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:89)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException

Olá, Ranieri

Sobre o erro "[ERROR] No plugin found for prefix 'spring-boot' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\Ranie.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]"

Tente adicionar no seu pom.xml:

<repositories>
    <repository>
        <id>spring-releases</id>
        <url>https://repo.spring.io/libs-release</url>
    </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <id>spring-releases</id>
        <url>https://repo.spring.io/libs-release</url>
    </pluginRepository>
</pluginRepositories>

e confirme se você tem o parent do spring boot corretamente configurado conforme exemplo:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.2.7.RELEASE</version>
 </parent>