2016-12-18 14 views
0

私は、Herokuに2日間Javaアプリケーションをデプロイしようとしています。 私は彼らのチュートリアルで人々がすることと同じことをすべてやっています。しかし、何かが間違っています。 どのように修正しますか?ここ Herokuにjava web appをデプロイする際の問題

が私のpom.xmlで

2016-12-18T19:07:22.740701+00:00 heroku[web.1]: Starting process with command `java $JAVA_OPTS -cp target/dependency/jetty-runner.jar --port 37825 target/*.war` 
2016-12-18T19:07:25.592632+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them. 
2016-12-18T19:07:25.599057+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx350m -Xss512k -Dfile.encoding=UTF-8 
2016-12-18T19:07:25.599116+00:00 app[web.1]: Unrecognized option: --port 
2016-12-18T19:07:25.599120+00:00 app[web.1]: Error: Could not create the Java Virtual Machine. 
2016-12-18T19:07:25.599120+00:00 app[web.1]: Error: A fatal exception has occurred. Program will exit. 
2016-12-18T19:08:20.220329+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fathomless-journey-44108.herokuapp.com request_id=229e3557-e7c8-4084-9000-c14e7b0128ad fwd="109.201.209.187" dyno= connect= service= status=503 bytes= 
2016-12-18T19:08:20.956253+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fathomless-journey-44108.herokuapp.com request_id=fe14db1e-c45f-4d80-9e47-d18e9d3d544d fwd="109.201.209.187" dyno= connect= service= status=503 bytes= 

プラグインHerokuのアプリケーションログで

<plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-dependency-plugin</artifactId> 
      <version>2.4</version> 
      <executions> 
       <execution> 
        <id>copy-dependencies</id> 
        <phase>package</phase> 
        <goals><goal>copy</goal></goals> 
        <configuration> 
         <artifactItems> 
          <artifactItem> 
           <groupId>org.eclipse.jetty</groupId> 
           <artifactId>jetty-runner</artifactId> 
           <version>9.2.7.v20150116</version> 
           <destFileName>jetty-runner.jar</destFileName> 
          </artifactItem> 
         </artifactItems> 
        </configuration> 
       </execution> 
      </executions> 
     </plugin> 

とProcfile

web: java $JAVA_OPTS -cp target/dependency/jetty-runner.jar --port $PORT target/*.war 
+0

「2016-12-18T19:07:25.599116 + 00:00 app [web.1]:認識できないオプション:--port " - エラーメッセージを読みます。 – duffymo

+0

私は見ていますが、私はそれをいかに修正するかを理解できません。 Googleはそれについて何も知らない –

+0

何もない?私はそれを疑います。 https://devcenter.heroku.com/articles/java-support – duffymo

答えて

1

私が展開しているだけでアプリケーションをNode.jsのherokuのプラグインなしの無料アカウント。そして、何私がしなければならなかったことは代わりにあなたはおそらく、これが問題になる

--port 37825 

で指定しているように見える静的なものでHerokuので割り当てられたポートを取ることですか?エラーはポート関連のようです。 "ダイナミックポートHerokuののJava" のためのgoogleしてみ

0

あなたProcfileは、おそらく次のようになります。

web: java $JAVA_OPTS -jar target/dependency/jetty-runner.jar --port $PORT target/*.war 

-jar代わり-cp

関連する問題