我在为Spring MVC编写代码后遇到这些错误。它是在Intellij IDEA上运行Google App Engine的maven项目。在我开始使用Spring MVC框架并为spring-servlet添加.xml文件之前,一切运行正常。任何人都可以帮我弄清楚这个错误意味着什么以及如何解决它?提前谢谢。
bad runtime process port ['']
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:268)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:284)
at com.google.appengine.tools.development.AutomaticInstanceHolder.startUp(AutomaticInstanceHolder.java:26)
at com.google.appengine.tools.development.AbstractModule.startup(AbstractModule.java:87)
at com.google.appengine.tools.development.Modules.startup(Modules.java:105)
at com.google.appengine.tools.development.devappserver2.DevAppServer2Impl.doStart(DevAppServer2Impl.java:250)
at ...
Feb 10, 2017 9:26:25 PM com.google.appengine.tools.development.devappserver2.RemoteApiDelegate log
SEVERE: [1486761985829000] javax.servlet.ServletContext log: unavailable
javax.servlet.UnavailableException: org.springframework.web.servlet.DispatcherServlet
at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:79)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:242)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
...
Feb 10, 2017 9:26:25 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed spring-web: java.lang.NullPointerException
Feb 10, 2017 9:26:25 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: Failed startup of context com.google.appengine.tools.development.DevAppEngineWebAppContext@fdefd3f{/,D:\CSE308Project\teambuildingexercise\todolist\target\todolist-1.0-SNAPSHOT}
java.lang.NullPointerException
at java.lang.Class.isAssignableFrom(Native Method)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:256)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
...
Feb 10, 2017 9:26:25 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Started SelectChannelConnector@localhost:54107
Feb 10, 2017 9:26:25 PM com.google.appengine.tools.development.AbstractModule startup
INFO: Module instance default is running at http://localhost:54107/
Feb 10, 2017 9:26:25 PM com.google.appengine.tools.development.AbstractModule startup
INFO: The admin console is running at http://localhost:54107/_ah/admin
Feb 10, 2017 4:26:25 PM com.google.appengine.tools.development.devappserver2.DevAppServer2Impl doStart
INFO: Dev App Server is now running
如果我的项目中有任何部分需要,请告诉我,我会发布更多内容。 (已经在jdk1.7上运行,仍然会得到相同的错误。)
答案 0 :(得分:0)
找到解决方案。这是一个依赖性问题。 确保在pom.xml中添加正确的依赖项。
<!-- Spring MVC Dependencies -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>4.3.6.RELEASE</version>
</dependency>