1
resposta

Erro após o deploy

Após fazer o deploy no heroku, minha página fica aparecendo: HTTP Status 404 – Not Found

Você pode conferir todo o código em: https://github.com/EndrioFelipe/meaTeste

O log de erro do heroku

2019-10-07T23:09:43.221106+00:00 app[api]: Release v1 created by user endrio.souza@hotmail.com
2019-10-07T23:09:43.425168+00:00 app[api]: Release v2 created by user endrio.souza@hotmail.com
2019-10-07T23:09:43.425168+00:00 app[api]: Enable Logplex by user endrio.souza@hotmail.com
2019-10-07T23:10:02+00:00 app[api]: Build started by user endrio.souza@hotmail.com
2019-10-07T23:09:43.221106+00:00 app[api]: Initial release by user endrio.souza@hotmail.com
2019-10-07T23:10:39.27747+00:00 app[api]: Attach DATABASE (@ref:postgresql-shallow-31278) by user endrio.souza@hotmail.com
2019-10-07T23:10:39.27747+00:00 app[api]: Running release v3 commands by user endrio.souza@hotmail.com
2019-10-07T23:10:39.343767+00:00 app[api]: Release v4 created by user endrio.souza@hotmail.com
2019-10-07T23:10:39.343767+00:00 app[api]: @ref:postgresql-shallow-31278 completed provisioning, setting DATABASE_URL. by user endrio.souza@hotmail.com
2019-10-07T23:10:39.693718+00:00 app[api]: Scaled to web@1:Free by user endrio.souza@hotmail.com
2019-10-07T23:10:39.67342+00:00 app[api]: Deploy 1cd770e5 by user endrio.souza@hotmail.com
2019-10-07T23:10:39.67342+00:00 app[api]: Release v5 created by user endrio.souza@hotmail.com
2019-10-07T23:10:45.524029+00:00 heroku[web.1]: Starting process with command `java $JAVA_OPTS -jar -Dspring.profiles.active=prod target/dependency/webapp-runner.jar --port 50862 target/*.war`
2019-10-07T23:10:45+00:00 app[api]: Build succeeded
2019-10-07T23:10:48.310958+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
2019-10-07T23:10:48.323906+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx300m -Xss512k -XX:CICompilerCount=2 -Dfile.encoding=UTF-8
2019-10-07T23:10:49.788405+00:00 app[web.1]: Expanding mea.war into /app/target/tomcat.50862/webapps/expanded
2019-10-07T23:10:49.788502+00:00 app[web.1]: Adding Context  for /app/target/tomcat.50862/webapps/expanded
2019-10-07T23:10:51.851545+00:00 app[web.1]: Oct 07, 2019 11:10:51 PM org.apache.coyote.AbstractProtocol init
2019-10-07T23:10:51.85156+00:00 app[web.1]: INFO: Initializing ProtocolHandler ["http-nio-50862"]
2019-10-07T23:10:51.938468+00:00 app[web.1]: Oct 07, 2019 11:10:51 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
2019-10-07T23:10:51.938474+00:00 app[web.1]: INFO: Using a shared selector for servlet write/read
2019-10-07T23:10:52.028819+00:00 app[web.1]: Oct 07, 2019 11:10:52 PM org.apache.catalina.core.StandardService startInternal
2019-10-07T23:10:52.028826+00:00 app[web.1]: INFO: Starting service [Tomcat]
2019-10-07T23:10:52.030122+00:00 app[web.1]: Oct 07, 2019 11:10:52 PM org.apache.catalina.core.StandardEngine startInternal
2019-10-07T23:10:52.030127+00:00 app[web.1]: INFO: Starting Servlet Engine: Apache Tomcat/9.0.13
2019-10-07T23:10:52.516729+00:00 heroku[web.1]: State changed from starting to up
2019-10-07T23:10:52.886713+00:00 app[web.1]: Oct 07, 2019 11:10:52 PM org.apache.catalina.startup.ContextConfig getDefaultWebXmlFragment
2019-10-07T23:10:52.886729+00:00 app[web.1]: INFO: No global web.xml found
1 resposta

Como está seu pom.xml?

Tente alterar o plugin maven-dependency-plugin de forma que fique parecido com:

<build>
        <finalName>bitbank</finalName>
        <plugins>

            <plugin>
                <groupId>com.heroku.sdk</groupId>
                <artifactId>heroku-maven-plugin</artifactId>
                <version>2.0.10</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.github.jsimone</groupId>
                                    <artifactId>webapp-runner</artifactId>
                                    <version>9.0.24.0</version>
                                    <destFileName>webapp-runner.jar</destFileName>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <properties>
        <failOnMissingWebXml>false</failOnMissingWebXml>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>