Ric
Ric

Reputation: 33

Heroku - Spring Boot App - Process exited with status 1

trying to run a 'hello world' Spring Boot App (that runs ok locally) I got this message:

2018-10-20T06:32:21.827918+00:00 heroku[web.1]: State changed from crashed to starting
2018-10-20T06:32:24.676953+00:00 heroku[web.1]: Starting process with command `java -Dserver.port=35016 $JAVA_OPTS -jar target/das-boot-0.0.1-SNAPSHOT.jar`
2018-10-20T06:32:27.138742+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
2018-10-20T06:32:27.142496+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx300m -Xss512k -XX:CICompilerCount=2 -Dfile.encoding=UTF-8 
2018-10-20T06:32:27.266974+00:00 app[web.1]: no main manifest attribute, in target/das-boot-0.0.1-SNAPSHOT.jar
2018-10-20T06:32:27.324779+00:00 heroku[web.1]: Process exited with status 1
2018-10-20T06:32:27.343816+00:00 heroku[web.1]: State changed from starting to crashed

You can find the code on github for more details (https://github.com/ricgonmen/das-boot).

I have try to run it with and without Procfile but nothing change. I don't know how to get more information about the crash to solve it. Any suggestion?

Thanks!

Upvotes: 3

Views: 1565

Answers (1)

Bas de Groot
Bas de Groot

Reputation: 676

This seems to be your issue: no main manifest attribute, in target/das-boot-0.0.1-SNAPSHOT.jar.

Can you try by adding this to the plugins section of your pom.xml ?

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <version>2.0.6.RELEASE</version>
            <executions>
                <execution>
                    <goals>
                        <goal>repackage</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

More information can be found here: Spring Boot Maven Plugin

Upvotes: 1

Related Questions