簡體   English   中英

Java Web App在Heroku上崩潰

[英]Java Web App Crashing on Heroku

我有一個現有的Java Web應用程序項目。 我將其轉換為Maven項目並將其部署在Heroku上。 該應用程序已成功部署,但未運行; 它崩潰了。 我無法從日志中找出原因。 我的Procfile看起來像這樣: 網絡:java $ JAVA_OPTS -cp target / classes:target / m2e-wtp / *。jar

我在日志中看到的只是該應用程序崩潰,錯誤代碼= H10,狀態為503。我非常感謝您提供幫助。以下是日志:

app[web.1]: See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
heroku[web.1]: State changed from starting to crashed
heroku[web.1]: Process exited with status 1
heroku[api]: Scale to web=1 by charan7j86@gmail.com
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fierce-woodland-8040.herokuapp.com request_id=9e462e2f-0e4f-4ef7-a503-e557fa46397a fwd="67.169.27.222" dyno= connect= service= status=503 bytes=
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fierce-woodland-8040.herokuapp.com request_id=fcfb168d-3c62-4c0b-92ba-0a0418cdc703 fwd="67.169.27.222" dyno= connect= service= status=503 bytes=
heroku[web.1]: State changed from crashed to starting
heroku[web.1]: Starting process with command `java -XX:+UseCompressedOops -cp target/classes:target/m2e-wtp/*.jar`
app[web.1]: Usage: java [-options] class [args...]
app[web.1]:            (to execute a class)
app[web.1]:    or  java [-options] -jar jarfile [args...]
app[web.1]:            (to execute a jar file)
app[web.1]: where options include:
app[web.1]:     -d32      use a 32-bit data model if available
app[web.1]:     -d64      use a 64-bit data model if available
app[web.1]:                   The default VM is server,
app[web.1]:     -server      to select the "server" VM
app[web.1]:                   because you are running on a server-class machine.
app[web.1]: 
app[web.1]:     -cp <class search path of directories and zip/jar files>
app[web.1]: 
app[web.1]:     -classpath <class search path of directories and zip/jar files>
app[web.1]:                   A : separated list of directories, JAR archives,
app[web.1]:                   and ZIP archives to search for class files.
app[web.1]:     -D<name>=<value>
app[web.1]:                   set a system property
app[web.1]:     -verbose:[class|gc|jni]
app[web.1]:                   enable verbose output
app[web.1]:     -version      print product version and exit
app[web.1]:     -version:<value>
app[web.1]:                   require the specified version to run
app[web.1]:     -showversion  print product version and continue
app[web.1]:     -jre-restrict-search | -no-jre-restrict-search
app[web.1]:                   include/exclude user private JREs in the version search
app[web.1]:     -? -help      print this help message
app[web.1]:     -X            print help on non-standard options
app[web.1]:     -ea[:<packagename>...|:<classname>]
app[web.1]:     -enableassertions[:<packagename>...|:<classname>]
app[web.1]:                   enable assertions with specified granularity
app[web.1]:     -disableassertions[:<packagename>...|:<classname>]
app[web.1]:     -da[:<packagename>...|:<classname>]
app[web.1]:     -esa | -enablesystemassertions
app[web.1]:                   disable assertions with specified granularity
app[web.1]:                   enable system assertions
app[web.1]:     -dsa | -disablesystemassertions
app[web.1]:                   disable system assertions
app[web.1]:     -agentlib:<libname>[=<options>]
app[web.1]:                   load native agent library <libname>, e.g. -agentlib:hprof
app[web.1]:                   see also, -agentlib:jdwp=help and -agentlib:hprof=help
app[web.1]:     -agentpath:<pathname>[=<options>]
app[web.1]:                   load native agent library by full pathname
app[web.1]:     -javaagent:<jarpath>[=<options>]
app[web.1]:                   load Java programming language agent, see java.lang.instrument
app[web.1]:     -splash:<imagepath>
app[web.1]:                   show splash screen with specified image
app[web.1]: See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
heroku[web.1]: Process exited with status 1
heroku[web.1]: State changed from starting to crashed

Procfile中的命令未指定Main類。 它應該看起來像:

 web: java $JAVA_OPTS -cp target/classes:target/m2e-wtp/*.jar com.foo.Main

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM