[英]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.