这是一个简单的spring boot应用程序。我的应用程序可以在本地工作,但在我将它作为war文件部署到heroku后就不工作了。当我在本地计算机上访问http://127.0.0.1:8080/时,得到的输出为
null
html prettyprint-override">Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Mon Nov 12 20:24:07 IST 2018
There was an unexpected error (type=Not Found, status=404).
No message available
null
当我访问http://127.0.0.1:8080/hello时,我得到的回复是简单的“嗨”。所以它在我的本地机器上按我的预期工作,但当我访问我的heroku应用程序时,我得到如下错误
null
HTTP Status 404 – Not Found
Type Status Report
Message /
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
Apache Tomcat/8.5.33
null
当我运行heroku日志时,我会得到以下信息
null
2018-11-12T14:39:45.448868+00:00 app[web.1]: Default: false
2018-11-12T14:39:45.448870+00:00 app[web.1]: --expand-war-file
2018-11-12T14:39:45.448871+00:00 app[web.1]: Expand the war file and set it as source
2018-11-12T14:39:45.448873+00:00 app[web.1]: Default: true
2018-11-12T14:39:45.448875+00:00 app[web.1]: --expanded-dir-name
2018-11-12T14:39:45.448876+00:00 app[web.1]: The name of the directory the WAR file will be expanded into.
2018-11-12T14:39:45.448878+00:00 app[web.1]: Default: expanded
2018-11-12T14:39:45.448879+00:00 app[web.1]: --help
2018-11-12T14:39:45.448881+00:00 app[web.1]:
2018-11-12T14:39:45.448883+00:00 app[web.1]: --max-threads
2018-11-12T14:39:45.448885+00:00 app[web.1]: Set the maximum number of worker threads
2018-11-12T14:39:45.448886+00:00 app[web.1]: Default: 0
2018-11-12T14:39:45.448888+00:00 app[web.1]: --memcached-transcoder-factory-class
2018-11-12T14:39:45.448890+00:00 app[web.1]: The class name of the factory that creates the transcoder to use for
2018-11-12T14:39:45.448892+00:00 app[web.1]: serializing/deserializing sessions to/from memcached.
2018-11-12T14:39:45.448894+00:00 app[web.1]: --path
2018-11-12T14:39:45.448895+00:00 app[web.1]: The context path
2018-11-12T14:39:45.448897+00:00 app[web.1]: Default: <empty string>
2018-11-12T14:39:45.448899+00:00 app[web.1]: --port
2018-11-12T14:39:45.448900+00:00 app[web.1]: The port that the server will accept http requests on.
2018-11-12T14:39:45.448902+00:00 app[web.1]: Default: 8080
2018-11-12T14:39:45.448904+00:00 app[web.1]: --proxy-base-url
2018-11-12T14:39:45.448905+00:00 app[web.1]: Set proxy URL if tomcat is running behind reverse proxy
2018-11-12T14:39:45.448907+00:00 app[web.1]: Default: <empty string>
2018-11-12T14:39:45.448908+00:00 app[web.1]: --scanBootstrapClassPath
2018-11-12T14:39:45.448910+00:00 app[web.1]: Set jar scanner scan bootstrap classpath.
2018-11-12T14:39:45.448912+00:00 app[web.1]: Default: false
2018-11-12T14:39:45.448914+00:00 app[web.1]: --session-store
2018-11-12T14:39:45.448915+00:00 app[web.1]: Session store to use (valid options are 'memcache' or 'redis')
2018-11-12T14:39:45.448917+00:00 app[web.1]: --session-store-ignore-pattern
2018-11-12T14:39:45.448918+00:00 app[web.1]: Request pattern to not track sessions for. Valid only with memcache
2018-11-12T14:39:45.448920+00:00 app[web.1]: session store. (default is '.*\.(png|gif|jpg|css|js)$'. Has no effect
2018-11-12T14:39:45.448922+00:00 app[web.1]: for 'redis')
2018-11-12T14:39:45.448923+00:00 app[web.1]: Default: .*\.(png|gif|jpg|css|js)$
2018-11-12T14:39:45.448925+00:00 app[web.1]: --session-store-locking-mode
2018-11-12T14:39:45.448926+00:00 app[web.1]: Session locking mode for use with memcache session store. (default is
2018-11-12T14:39:45.448928+00:00 app[web.1]: all. Has no effect for 'redis')
2018-11-12T14:39:45.448930+00:00 app[web.1]: Default: all
2018-11-12T14:39:45.448931+00:00 app[web.1]: --session-store-operation-timeout
2018-11-12T14:39:45.448932+00:00 app[web.1]: Operation timeout for the memcache session store. (default is 5000ms)
2018-11-12T14:39:45.448942+00:00 app[web.1]: Default: 5000
2018-11-12T14:39:45.448943+00:00 app[web.1]: --session-store-pool-size
2018-11-12T14:39:45.448945+00:00 app[web.1]: Pool size of the session store connections (default is 10. Has no effect
2018-11-12T14:39:45.448946+00:00 app[web.1]: for 'memcache')
2018-11-12T14:39:45.448948+00:00 app[web.1]: Default: 10
2018-11-12T14:39:45.448949+00:00 app[web.1]: --session-timeout
2018-11-12T14:39:45.448951+00:00 app[web.1]: The number of minutes of inactivity before a user's session is timed
2018-11-12T14:39:45.448953+00:00 app[web.1]: out.
2018-11-12T14:39:45.448954+00:00 app[web.1]: --shutdown-override
2018-11-12T14:39:45.448956+00:00 app[web.1]: Overrides the default behavior and casues Tomcat to ignore lifecycle
2018-11-12T14:39:45.448958+00:00 app[web.1]: failure events rather than shutting down when they occur.
2018-11-12T14:39:45.448959+00:00 app[web.1]: Default: false
2018-11-12T14:39:45.448961+00:00 app[web.1]: --temp-directory
2018-11-12T14:39:45.448962+00:00 app[web.1]: Define the temp directory, default value: ./target/tomcat.PORT
2018-11-12T14:39:45.448963+00:00 app[web.1]: --tomcat-users-location
2018-11-12T14:39:45.448965+00:00 app[web.1]: Location of the tomcat-users.xml file. (relative to the location of the
2018-11-12T14:39:45.448967+00:00 app[web.1]: webapp-runner jar file)
2018-11-12T14:39:45.448968+00:00 app[web.1]: --uri-encoding
2018-11-12T14:39:45.448970+00:00 app[web.1]: Set the URI encoding to be used for the Connector.
2018-11-12T14:39:45.448971+00:00 app[web.1]: --use-body-encoding-for-uri
2018-11-12T14:39:45.448982+00:00 app[web.1]: Set if the entity body encoding should be used for the URI.
2018-11-12T14:39:45.448984+00:00 app[web.1]: Default: false
2018-11-12T14:39:45.448986+00:00 app[web.1]: -A
2018-11-12T14:39:45.448987+00:00 app[web.1]: Allows setting HTTP connector attributes. For example: -Acompression=on
2018-11-12T14:39:45.448989+00:00 app[web.1]: Syntax: -Akey=value
2018-11-12T14:39:45.448990+00:00 app[web.1]: Default: {}
2018-11-12T14:39:45.448992+00:00 app[web.1]:
2018-11-12T14:39:45.589939+00:00 heroku[web.1]: State changed from starting to crashed
2018-11-12T14:39:48.987659+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=renamedforpostingonline.herokuapp.com request_id=4109dd6b-2f1b-4929-bda4-0bbf2aec78a5 fwd="157.33.247.100" dyno= connect= service= status=503 bytes= protocol=https
2018-11-12T14:42:21.455739+00:00 heroku[web.1]: State changed from crashed to starting
2018-11-12T14:42:21.170154+00:00 app[api]: Release v6 created by user surajdeshmukh023@gmail.com
2018-11-12T14:42:21.170154+00:00 app[api]: Remove WEBAPP_RUNNER_OPTS config vars by user surajdeshmukh023@gmail.com
2018-11-12T14:42:34.354293+00:00 heroku[web.1]: Starting process with command `java $JAVA_OPTS -jar webapp-runner.jar ${WEBAPP_RUNNER_OPTS} --port 33928 ./Pictures/demo-0.0.1-SNAPSHOT.war`
2018-11-12T14:42:36.764389+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
2018-11-12T14:42:36.771702+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx300m -Xss512k -XX:CICompilerCount=2 -Dfile.encoding=UTF-8
2018-11-12T14:42:38.015784+00:00 app[web.1]: Expanding demo-0.0.1-SNAPSHOT.war into /app/target/tomcat.33928/webapps/expanded
2018-11-12T14:42:38.015836+00:00 app[web.1]: Adding Context for /app/target/tomcat.33928/webapps/expanded
2018-11-12T14:42:38.636510+00:00 app[web.1]: Nov 12, 2018 2:42:38 PM org.apache.coyote.AbstractProtocol init
2018-11-12T14:42:38.636522+00:00 app[web.1]: INFO: Initializing ProtocolHandler ["http-nio-33928"]
2018-11-12T14:42:38.714487+00:00 app[web.1]: Nov 12, 2018 2:42:38 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
2018-11-12T14:42:38.714491+00:00 app[web.1]: INFO: Using a shared selector for servlet write/read
2018-11-12T14:42:38.739726+00:00 app[web.1]: Nov 12, 2018 2:42:38 PM org.apache.catalina.core.StandardService startInternal
2018-11-12T14:42:38.739730+00:00 app[web.1]: INFO: Starting service [Tomcat]
2018-11-12T14:42:38.741761+00:00 app[web.1]: Nov 12, 2018 2:42:38 PM org.apache.catalina.core.StandardEngine startInternal
2018-11-12T14:42:38.741765+00:00 app[web.1]: INFO: Starting Servlet Engine: Apache Tomcat/8.5.33
2018-11-12T14:42:38.896896+00:00 heroku[web.1]: State changed from starting to up
2018-11-12T14:42:39.262108+00:00 app[web.1]: Nov 12, 2018 2:42:39 PM org.apache.catalina.startup.ContextConfig getDefaultWebXmlFragment
2018-11-12T14:42:39.262120+00:00 app[web.1]: INFO: No global web.xml found
2018-11-12T14:42:39.456503+00:00 app[web.1]: Nov 12, 2018 2:42:39 PM org.apache.tomcat.util.descriptor.web.WebXml setVersion
2018-11-12T14:42:39.456506+00:00 app[web.1]: WARNING: Unknown version string [4.0]. Default version will be used.
2018-11-12T14:42:47.741228+00:00 app[web.1]: Nov 12, 2018 2:42:47 PM org.apache.jasper.servlet.TldScanner scanJars
2018-11-12T14:42:47.741240+00:00 app[web.1]: INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2018-11-12T14:42:48.068318+00:00 app[web.1]: Nov 12, 2018 2:42:48 PM org.apache.catalina.core.ApplicationContext log
2018-11-12T14:42:48.068331+00:00 app[web.1]: INFO: 1 Spring WebApplicationInitializers detected on classpath
2018-11-12T14:42:48.141385+00:00 app[web.1]: Nov 12, 2018 2:42:48 PM org.apache.coyote.AbstractProtocol start
2018-11-12T14:42:48.141389+00:00 app[web.1]: INFO: Starting ProtocolHandler ["http-nio-33928"]
2018-11-12T14:42:48.392581+00:00 heroku[router]: at=info method=GET path="/" host=renamedforpostingonline.herokuapp.com request_id=9d2b7791-e45e-4f78-bd41-f7541495a6c0 fwd="157.33.247.100" dyno=web.1 connect=0ms service=9026ms status=404 bytes=1230 protocol=https
2018-11-12T14:42:49.086720+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=renamedforpostingonline.herokuapp.com request_id=1beab1cb-39fb-4651-8eca-65204ce64a7f fwd="157.33.247.100" dyno=web.1 connect=0ms service=4ms status=404 bytes=1241 protocol=https
2018-11-12T14:43:04.308218+00:00 heroku[router]: at=info method=GET path="/" host=renamedforpostingonline.herokuapp.com request_id=d4d0709a-3f54-4066-bf16-46170e1f51d3 fwd="157.33.247.100" dyno=web.1 connect=2ms service=15ms status=404 bytes=1230 protocol=https
2018-11-12T14:43:04.826048+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=renamedforpostingonline.herokuapp.com request_id=2436a76f-720b-41fd-8c34-0fdbdb6fc6c5 fwd="157.33.247.100" dyno=web.1 connect=1ms service=7ms status=404 bytes=1241 protocol=https
null
我正在本地使用spring STS4进行开发
我也面临同样的问题。从我的springboot文件扩展SpringBootServletInitializer解决了这个问题。如下所述。
@SpringBootApplication
public class A extends SpringBootServletInitializer{
...
}
我部署了我的Rails应用程序,但当我打开它时,我在Web浏览器中收到此错误: 应用程序错误应用程序中发生错误,无法查看您的页面。如果您是应用程序所有者,请查看日志以了解详细信息。 以下是我的日志错误: 2018-03-19T04:48:12.360662 00:00 heroku[路由器]:at=错误代码=H10 desc=“应用程序崩溃”方法=获取路径=“/”主机=marmelade1。her
我正在尝试将我的应用程序部署到Heroku。它没有问题地推,但当我打开应用程序时,它说。 应用程序错误应用程序中出现错误,无法为您的页面提供服务。如果您是应用程序所有者,请查看日志以了解详细信息。您可以在Heroku CLI中使用命令Heroku logs--tail执行此操作 我的日志给了我以下错误 2020-06-17T22:33:21.630742+00:00 Heroku[router]:
尝试在Heroku云中部署Spring Boot应用程序,但编译java应用程序时出现错误,但在我的本地计算机中运行良好。
问题内容: 我正在尝试在Heroku上使用Flask开发我的第一个“大型”应用程序,并尝试将此处的基本教程与以下说明结合:https : //devcenter.heroku.com/articles/python与以下说明:http:// flask.pocoo.org/docs/patterns/packages/#larger- applications。它在本地与“先行启动”一起工作,但是
[错误]无法执行目标组织。阿帕奇。专家插件:maven编译器插件:3.8。1:在project Divi up后端上编译(默认编译):编译时出现致命错误:目标版本无效:15- 我得到了上面的错误,有人知道为什么会这样吗?
我一直使用Heroku从很长一段时间,它的工作很好。现在没有任何环境变化,赫鲁库不再为我工作了。我的应用程序在本地运行良好,但当我在heroku上部署它时,它会给应用程序带来错误。然后我创建了一个新的应用程序,在没有做任何更改的情况下,我在Heroku上部署了这个新的应用程序。它给出了完全相同的错误,这意味着问题不是我的应用程序,而是heroku或我部署应用程序的方式。 我使用create rea