eclipse Jetty 启动问题:WebAppContext:Failed startup of context oejwWebAppContext{/,null}
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18595911/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Jetty Startup issue: WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/,null}
提问by user2743568
I′m trying to start a new project war with maven and spring into Spring Tool Suite IDE, I downloaded the project from Git Hub, the project was made on macs and I′m working in windows.
我正在尝试与 maven 和 Spring Tool Suite IDE 开始一个新的项目War,我从 Git Hub 下载了该项目,该项目是在 mac 上制作的,我正在 Windows 中工作。
This is what I′m getting when I try to start the Jetty server:
这是我尝试启动 Jetty 服务器时得到的:
2013-09-03 10:01:47.161:INFO:oejs.Server:jetty-8.1.12.v20130726
2013-09-03 10:01:47.179:INFO:oejdp.ScanningAppProvider:Deployment monitor C:\Users\HP\Documents\workspace-sts-3.3.0.RELEASE\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\webapps at interval 1
2013-09-03 10:01:47.183:INFO:oejdp.ScanningAppProvider:Deployment monitor C:\Users\HP\Documents\workspace-sts-3.3.0.RELEASE\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\contexts at interval 1
2013-09-03 10:01:47.187:INFO:oejd.DeploymentManager:Deployable added: C:\Users\HP\Documents\workspace-sts-3.3.0.RELEASE\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\contexts\moca-console.xml
2013-09-03 10:01:47.238:WARN:oejw.WebInfConfiguration:Web application not found C:\Users\HP\Documents\workspace-sts-3.3.0.RELEASE\.metadata\.plugins\org.eclipse.wst.server.core\tmp0/wtpwebapps/moca-console
2013-09-03 10:01:47.239:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/,null},C:\Users\HP\Documents\workspace-sts-3.3.0.RELEASE\.metadata\.plugins\org.eclipse.wst.server.core\tmp0/wtpwebapps/moca-console
java.io.FileNotFoundException: C:\Users\HP\Documents\workspace-sts-3.3.0.RELEASE\.metadata\.plugins\org.eclipse.wst.server.core\tmp0/wtpwebapps/moca-console
at org.eclipse.jetty.webapp.WebInfConfiguration.unpack(WebInfConfiguration.java:502)
at org.eclipse.jetty.webapp.WebInfConfiguration.preConfigure(WebInfConfiguration.java:71)
at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:457)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:493)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:39)
at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:494)
at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:141)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:145)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:56)
at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:615)
at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:540)
at org.eclipse.jetty.util.Scanner.scan(Scanner.java:403)
at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:337)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:121)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:555)
at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:230)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:81)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:58)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:96)
at org.eclipse.jetty.server.Server.doStart(Server.java:282)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.xml.XmlConfiguration.run(XmlConfiguration.java:1259)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1182)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.eclipse.jetty.start.Main.invokeMain(Main.java:473)
at org.eclipse.jetty.start.Main.start(Main.java:615)
at org.eclipse.jetty.start.Main.main(Main.java:96)
2013-09-03 10:01:47.277:INFO:oejs.AbstractConnector:Started [email protected]:8080
I have tried a bunch of possible solutions without success. Any suggestion will be welcome.
我尝试了一堆可能的解决方案,但都没有成功。欢迎任何建议。
回答by Angular University
It seems that your eclipse STS workspace is out of sync with the content published in the server. Try to clean the server, clean the working directory, clean all projects and Republish the project into the server.
您的 eclipse STS 工作区似乎与服务器中发布的内容不同步。尝试清理服务器,清理工作目录,清理所有项目并将项目重新发布到服务器中。
If this does not work, try these steps to regenerate your eclipse workspace:
如果这不起作用,请尝试以下步骤来重新生成 eclipse 工作区:
- close eclipse and do a maven clean install from the command line
- delete all eclipse related files: .project, .classpath and .settings
- reopen eclipse, and configure maven to use the same maven as the command line
- import the project using 'Import as Maven Project'
- scrap your Jetty and redownload a clean one
- Create a new Jetty server, point it to the new Jetty and add your application to it
- Republish the application and start the server
- 关闭 eclipse 并从命令行执行 maven 全新安装
- 删除所有与 Eclipse 相关的文件:.project、.classpath 和 .settings
- 重新打开eclipse,并配置maven与命令行使用相同的maven
- 使用“导入为 Maven 项目”导入项目
- 废弃你的码头并重新下载一个干净的
- 创建一个新的 Jetty 服务器,将其指向新的 Jetty 并将您的应用程序添加到其中
- 重新发布应用程序并启动服务器
回答by Deepak Agrawal
Yep it looks like problem with plugins. So just close STS. Deleting workspace or plugin's is not good idea. It can create problem to other projects.
是的,它看起来像插件的问题。所以只需关闭STS。删除工作区或插件不是个好主意。它可能会给其他项目带来问题。
And follow these steps-
并按照以下步骤-
- right click on project in project explorer.
- select maven->update->tick all enable check box's->press ok
- This will update all plugin's that are creating problem.
- 右键单击项目资源管理器中的项目。
- 选择 maven->update->tick all enable 复选框的->press ok
- 这将更新所有产生问题的插件。
Best of Luck
祝你好运