Search code examples
springherokuspring-social

Has anyone been able to run the Spring Social Showcase on Heroku?


I have downloaded Spring Social Showcase from git hub and have no problem running it on my localhost. When I try to run it on Heroku I get an application error. Checking the logs I see a

Error H14 - No web processes running

The heroku documentation states:

This is most likely the result of scaling your web processes down to zero through the client.

$ heroku ps:scale web=0

Use the heroku ps command to determine the state of your web processes.

When I run the heroku ps commnad nothing is returned. I then attempted to set the web=1 with the following command:

$ heroku ps:scale web=1

This returns the following:

Scaling web processes... failed
 !    Record not found

I have two questions at this point:

  1. Has anyone been able to get the Spring Social Showcase to run on Heroku?
  2. Does anyone know what might be causing my application to fail on Heroku while running without problems locally?

Solution

  • This is working now on Heroku. After adding the Procfile, checking the pom.xml for the web app runner plugin and commenting out the tomcat-maven-plugin, I ran

    mvn clean package

    and deployed to Heroku once again. I received the no processes running error again. This time when I ran

    $ heroku ps:scale web=1

    it did not fail but started the web process. I then executed

    heroku open

    and the application launched successfully.

    This is the plugin I commented out:

    <!--
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>tomcat-maven-plugin</artifactId>
            <version>1.0-beta-1</version>
        </plugin>
    -->
    

    This is the plugin I added:

    <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>2.3</version>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>copy</goal>
                            </goals>
                            <configuration>
                                <artifactItems>
                                    <artifactItem>
                                        <groupId>com.github.jsimone</groupId>
                                        <artifactId>webapp-runner</artifactId>
                                        <version>7.0.30.1</version>
                                        <destFileName>webapp-runner.jar</destFileName>
                                    </artifactItem>
                                </artifactItems>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>