title: Java Spring MVC can't start app on Heroku. Error H10 (can't find webapp runner)
body: <p>I am trying to run my app on Heroku but it doesn't work. From logs I can see the below:</p>
  <blockquote>
  <p>2016-01-18T13:38:31.621218+00:00 heroku[web.1]: Process exited with
  status 1 2016-01-18T13:38:48.101117+00:00 app[web.1]: Error: Unable to
  access jarfile target/dependency/webapp-runner-8.0.30.1.jar</p>
  <p>2016-01-18T13:38:48.100249+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS
  defaults based on dyno size. Custom settings will override them.</p>
  <p>2016-01-18T13:38:48.700243+00:00 heroku[web.1]: State changed from
  starting to crashed 2016-01-18T13:43:12.241285+00:00 heroku[router]:
  at=error code=H10 desc=&quot;App crashed&quot; method=GET path=&quot;/&quot;
  host=macfol.herokuapp.com
  request_id=c6418015-843d-4f5a-8dde-83130e94a7c6 fwd=&quot;159.220.74.5&quot;
  dyno= connect= service= status=503 bytes=</p>
  </blockquote>
  <p>I have been unsuccessfully trying to modify both pom.xml as well as procfile in order that Heroku will finally find that .jar.</p>
  <p>There is the procfile:</p>
  <pre><code>web:    java $JAVA_OPTS -jar target/dependency/webapp-runner-8.0.30.1.jar --target/kamienica
  </code></pre>
  <p>And the pom.xml</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot;?&gt;
  &lt;project
      xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;
      xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
  
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;kamienica&lt;/groupId&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
      &lt;version&gt;1.0.0&lt;/version&gt;
      &lt;name&gt;Kamienica&lt;/name&gt;
  
      &lt;properties&gt;
          &lt;springframework.version&gt;4.0.6.RELEASE&lt;/springframework.version&gt;
          &lt;hibernate.version&gt;4.3.6.Final&lt;/hibernate.version&gt;
          &lt;mysql.version&gt;5.1.31&lt;/mysql.version&gt;
          &lt;joda-time.version&gt;2.3&lt;/joda-time.version&gt;
          &lt;testng.version&gt;6.9.4&lt;/testng.version&gt;
          &lt;mockito.version&gt;1.10.19&lt;/mockito.version&gt;
          &lt;h2.version&gt;1.4.187&lt;/h2.version&gt;
          &lt;dbunit.version&gt;2.2&lt;/dbunit.version&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;!-- Spring --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
              &lt;version&gt;${springframework.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
              &lt;version&gt;${springframework.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
              &lt;version&gt;${springframework.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-tx&lt;/artifactId&gt;
              &lt;version&gt;${springframework.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-orm&lt;/artifactId&gt;
              &lt;version&gt;${springframework.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Hibernate --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
              &lt;version&gt;${hibernate.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- jsr303 validation --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.validation&lt;/groupId&gt;
              &lt;artifactId&gt;validation-api&lt;/artifactId&gt;
              &lt;version&gt;1.1.0.Final&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
              &lt;version&gt;5.1.3.Final&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- MySQL --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;mysql&lt;/groupId&gt;
              &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
              &lt;version&gt;${mysql.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Joda-Time --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;joda-time&lt;/groupId&gt;
              &lt;artifactId&gt;joda-time&lt;/artifactId&gt;
              &lt;version&gt;${joda-time.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- To map JodaTime with database type --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jadira.usertype&lt;/groupId&gt;
              &lt;artifactId&gt;usertype.core&lt;/artifactId&gt;
              &lt;version&gt;3.0.0.CR1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Servlet+JSP+JSTL --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
              &lt;version&gt;3.1.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet.jsp&lt;/groupId&gt;
              &lt;artifactId&gt;javax.servlet.jsp-api&lt;/artifactId&gt;
              &lt;version&gt;2.3.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;jstl&lt;/artifactId&gt;
              &lt;version&gt;1.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;taglibs&lt;/groupId&gt;
              &lt;artifactId&gt;standard&lt;/artifactId&gt;
              &lt;version&gt;1.1.2&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Testing dependencies --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-test&lt;/artifactId&gt;
              &lt;version&gt;${springframework.version}&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.testng&lt;/groupId&gt;
              &lt;artifactId&gt;testng&lt;/artifactId&gt;
              &lt;version&gt;${testng.version}&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.mockito&lt;/groupId&gt;
              &lt;artifactId&gt;mockito-all&lt;/artifactId&gt;
              &lt;version&gt;${mockito.version}&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.h2database&lt;/groupId&gt;
              &lt;artifactId&gt;h2&lt;/artifactId&gt;
              &lt;version&gt;${h2.version}&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;dbunit&lt;/groupId&gt;
              &lt;artifactId&gt;dbunit&lt;/artifactId&gt;
              &lt;version&gt;${dbunit.version}&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- for rest --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
              &lt;version&gt;2.4.1.3&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-annotations&lt;/artifactId&gt;
              &lt;version&gt;2.4.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- Spring Security --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
              &lt;artifactId&gt;spring-security-web&lt;/artifactId&gt;
              &lt;version&gt;4.0.3.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
              &lt;artifactId&gt;spring-security-config&lt;/artifactId&gt;
              &lt;version&gt;4.0.3.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.github.jsimone&lt;/groupId&gt;
              &lt;artifactId&gt;webapp-runner&lt;/artifactId&gt;
              &lt;version&gt;8.0.30.1&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;spring-snapshot&lt;/id&gt;
              &lt;name&gt;Spring Snapshot Repository&lt;/name&gt;
              &lt;url&gt;http://repo.springsource.org/snapshot&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
      &lt;build&gt;
          &lt;pluginManagement&gt;
              &lt;plugins&gt;
  
  
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                      &lt;version&gt;3.3&lt;/version&gt;
                      &lt;configuration&gt;
                          &lt;source&gt;1.7&lt;/source&gt;
                          &lt;target&gt;1.7&lt;/target&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
  
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
                      &lt;version&gt;2.6&lt;/version&gt;
                      &lt;configuration&gt;
                          &lt;warSourceDirectory&gt;src/main/webapp&lt;/warSourceDirectory&gt;
                          &lt;warName&gt;Kamienica&lt;/warName&gt;
                          &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
  
  
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
                      &lt;version&gt;2.3&lt;/version&gt;
                      &lt;executions&gt;
                          &lt;execution&gt;
                              &lt;phase&gt;package&lt;/phase&gt;
                              &lt;goals&gt;
                                  &lt;goal&gt;copy&lt;/goal&gt;
                              &lt;/goals&gt;
                              &lt;configuration&gt;
                                  &lt;artifactItems&gt;
                                      &lt;artifactItem&gt;
                                          &lt;groupId&gt;com.github.jsimone&lt;/groupId&gt;
                                          &lt;artifactId&gt;webapp-runner&lt;/artifactId&gt;
                                          &lt;version&gt;8.0.24.0&lt;/version&gt;
                                          &lt;destFileName&gt;webapp-runner.jar&lt;/destFileName&gt;
                                      &lt;/artifactItem&gt;
                                  &lt;/artifactItems&gt;
                              &lt;/configuration&gt;
                          &lt;/execution&gt;
                      &lt;/executions&gt;
                  &lt;/plugin&gt;
  
              &lt;/plugins&gt;
          &lt;/pluginManagement&gt;
          &lt;finalName&gt;Kamienica&lt;/finalName&gt;
      &lt;/build&gt;
      &lt;artifactId&gt;Kamienica&lt;/artifactId&gt;
  &lt;/project&gt;
  </code></pre>
  <p>The &quot;missing&quot; jar can be found in maven dependencies.</p>
  <p>Appreciate your help</p>
  <p><strong>EDIT</strong>
  The procfile is now:</p>
  <blockquote>
  <p>web: java $JAVA_OPTS -jar target/dependency/webapp-runner.jar --port
  $PORT target/kamienica.war</p>
  </blockquote>
  <p>No result...</p>
  <p><strong>EDIT 2</strong></p>
  <p>There is some progress as it crashes elsewhere  ;)</p>
  <p><a href="https://i.stack.imgur.com/hxaX8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hxaX8.png" alt="enter image description here" /></a></p>
  <p><strong>EDIT 3</strong>
  It's working! Thank you all for making this possible. Finally my app is there. It took me 12 months to reach this point.
  Thank you again! :)</p>