- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我正在尝试在 jetty 服务器中托管我的 web 应用程序(spring)。我将我的 war 文件复制到 jetty 服务器中的“webapp”文件夹中。我不是要嵌入 jetty 服务器,而是要在 jetty 内托管应用程序(如 tomcat)。
我没有安装 jetty,我只是下载了 jetty7 zip 并解压以获取服务器。
我需要在 3 台 Linux 机器上进行设置。在一台机器中,服务器启动正常。没有问题。
但在另外两个中,当服务器启动时显示以下错误。
2013-04-24 18:52:59.540:INFO::started o.e.j.w.WebAppContext{/cpewebapp,file:/tmp/jetty-0.0.0.0-9080-cpewebapp.war-_cpewebapp-any-/webapp/},/home/manooja/jetty-hightide-7.4.0.v20110414/webapps/cpewebapp.war2013-04-24 18:52:59.648:WARN::FAILED spring: java.lang.NoClassDefFoundError: org/springframework/web/context/support/DefaultWebEnvironment2013-04-24 18:52:59.648:WARN::FAILED o.e.j.w.WebAppContext{/cpewebapp,file:/tmp/jetty-0.0.0.0-9080-cpewebapp.war-_cpewebapp-any-/webapp/},/home/manooja/jetty-hightide-7.4.0.v20110414/webapps/cpewebapp.war: java.lang.NoClassDefFoundError: org/springframework/web/context/support/DefaultWebEnvironment2013-04-24 18:52:59.649:WARN::Unable to reach node goal: startedjava.lang.NoClassDefFoundError: org/springframework/web/context/support/DefaultWebEnvironment at org.springframework.web.servlet.HttpServletBean.(HttpServletBean.java:90) at org.springframework.web.servlet.FrameworkServlet.(FrameworkServlet.java:96) at org.springframework.web.servlet.DispatcherServlet.(DispatcherServlet.java:128) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at java.lang.Class.newInstance0(Class.java:372) at java.lang.Class.newInstance(Class.java:325) at org.eclipse.jetty.servlet.ServletContextHandler$Context.createServlet(ServletContextHandler.java:606) at org.eclipse.jetty.servlet.ServletHolder.newInstance(ServletHolder.java:748) at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:426) at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:260) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58) at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:763) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:245) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1158) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:587) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:436) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58) at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:36) at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:180) at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:482) at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:135) at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:137) at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:50) at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:601) at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:531) at org.eclipse.jetty.util.Scanner.scan(Scanner.java:394) at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:329) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58) at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:114) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58) at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:543) at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:218) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58) at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:41) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:50) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:94) at org.eclipse.jetty.server.Server.doStart(Server.java:253) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58) at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1220) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1143) 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:477) at org.eclipse.jetty.start.Main.start(Main.java:623) at org.eclipse.jetty.start.Main.parseCommandLine(Main.java:273) at org.eclipse.jetty.start.Main.main(Main.java:81)Caused by: java.lang.ClassNotFoundException: org.springframework.web.context.support.DefaultWebEnvironment at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:420) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:373) at org.springframework.web.servlet.HttpServletBean.(HttpServletBean.java:90) at org.springframework.web.servlet.FrameworkServlet.(FrameworkServlet.java:96) at org.springframework.web.servlet.DispatcherServlet.(DispatcherServlet.java:128) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at java.lang.Class.newInstance0(Class.java:372) at java.lang.Class.newInstance(Class.java:325) at org.eclipse.jetty.servlet.ServletContextHandler$Context.createServlet(ServletContextHandler.java:606) at org.eclipse.jetty.servlet.ServletHolder.newInstance(ServletHolder.java:748) at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:426) at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:260) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58) at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:763) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:245) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1158) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:587) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:436) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58) at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:36) at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:180) at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:482) at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:135) at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:137) at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:50) at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:601) at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:531) at org.eclipse.jetty.util.Scanner.scan(Scanner.java:394) at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:329) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58) at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:114) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58) at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:543) at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:218) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58) at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:41) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:50) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:94) at org.eclipse.jetty.server.Server.doStart(Server.java:253) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58) at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1220) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1143) 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:477) at org.eclipse.jetty.start.Main.start(Main.java:623) at org.eclipse.jetty.start.Main.parseCommandLine(Main.java:273) at org.eclipse.jetty.start.Main.main(Main.java:81)2013-04-24 18:52:59.654:INFO::Deployable added: /home/manooja/jetty-hightide-7.4.0.v20110414/webapps/root2013-04-24 18:52:59.849:INFO::started o.e.j.w.WebAppContext{/,file:/home/manooja/jetty-hightide-7.4.0.v20110414/webapps/root/},/home/manooja/jetty-hightide-7.4.0.v20110414/webapps/root2013-04-24 18:52:59.861:INFO::Deployment monitor /home/manooja/jetty-hightide-7.4.0.v20110414/contexts at interval 12013-04-24 18:52:59.950:INFO::Started SelectChannelConnector@0.0.0.0:9080 STARTING
Kindly note that the default port have been changed to 9080.
I have an inkling that it might be some configuration change, as it is working fine in one machine.Could you please help me with a guidance to solve this?
java -jar start.jar --version
Active Options: [Server, client, ext, jmx, jsp, resources, websocket] Version Information on 25 entries in the classpath. Note: order presented here is how they would appear on the classpath. changes to the OPTIONS=[option,option,...] command line option will be reflected here. 0: 9.0.2.v20130417 | ${jetty.home}/lib/jetty-xml-9.0.2.v20130417.jar 1: 3.0.0.v201112011016 | ${jetty.home}/lib/servlet-api-3.0.jar 2: 9.0.2.v20130417 | ${jetty.home}/lib/jetty-http-9.0.2.v20130417.jar 3: 9.0.2.v20130417 | ${jetty.home}/lib/jetty-continuation-9.0.2.v20130417.jar 4: 9.0.2.v20130417 | ${jetty.home}/lib/jetty-server-9.0.2.v20130417.jar 5: 9.0.2.v20130417 | ${jetty.home}/lib/jetty-security-9.0.2.v20130417.jar 6: 9.0.2.v20130417 | ${jetty.home}/lib/jetty-servlet-9.0.2.v20130417.jar 7: 9.0.2.v20130417 | ${jetty.home}/lib/jetty-webapp-9.0.2.v20130417.jar 8: 9.0.2.v20130417 | ${jetty.home}/lib/jetty-deploy-9.0.2.v20130417.jar 9: 9.0.2.v20130417 | ${jetty.home}/lib/jetty-client-9.0.2.v20130417.jar 10: 9.0.2.v20130417 | ${jetty.home}/lib/jetty-jmx-9.0.2.v20130417.jar 11: 2.2.0.v201303151357 | ${jetty.home}/lib/jsp/com.sun.el-2.2.0.v201303151357.jar 12: 2.2.0.v201303151357 | ${jetty.home}/lib/jsp/javax.el-2.2.0.v201303151357.jar 13: 1.2.0.v201105211821 | ${jetty.home}/lib/jsp/javax.servlet.jsp.jstl-1.2.0.v201105211821.jar 14: 2.2.0.v201112011158 | ${jetty.home}/lib/jsp/javax.servlet.jsp-2.2.0.v201112011158.jar 15: 2.2.2.v201112011158 | ${jetty.home}/lib/jsp/org.apache.jasper.glassfish-2.2.2.v201112011158.jar 16: 1.2.0.v201112081803 | ${jetty.home}/lib/jsp/org.apache.taglibs.standard.glassfish-1.2.0.v201112081803.jar 17: 3.8.2.v20130121-145325 | ${jetty.home}/lib/jsp/org.eclipse.jdt.core-3.8.2.v20130121.jar 18: (dir) | ${jetty.home}/resources 19: 9.0.2.v20130417 | ${jetty.home}/lib/websocket/websocket-api-9.0.2.v20130417.jar 20: 9.0.2.v20130417 | ${jetty.home}/lib/websocket/websocket-common-9.0.2.v20130417.jar 21: 9.0.2.v20130417 | ${jetty.home}/lib/websocket/websocket-server-9.0.2.v20130417.jar 22: 9.0.2.v20130417 | ${jetty.home}/lib/websocket/websocket-servlet-9.0.2.v20130417.jar 23: 9.0.2.v20130417 | ${jetty.home}/lib/jetty-util-9.0.2.v20130417.jar 24: 9.0.2.v20130417 | ${jetty.home}/lib/jetty-io-9.0.2.v20130417.jar
dir ./WEB-INF/lib/
antlr-2.7.6.jar
aopalliance-1.0.jar
bcprov-jdk15on-148.jar
c3p0-0.9.1.jar
commons-collections-3.2.1.jar
commons-dbcp-1.3.jar
commons-lang-2.6.jar
commons-logging-1.1.1.jar
commons-pool-1.5.4.jar
cpewebapp.jar
displaytag-1.2.jar
dom4j-1.6.1.jar
gson-1.6.jar
hibernate-commons-annotations-3.2.0.Final.jar
hibernate-core-3.6.4.Final.jar
hibernate-entitymanager-3.6.4.Final.jar
hibernate-jpa-2.0-api-1.0.0.Final.jar
hibernate-validator-4.2.0.Final.jar
jackson-core-asl-1.8.0.jar
jackson-mapper-asl-1.8.0.jar
javassist-3.12.0.GA.jar
json.jar
jta.jar
log4j-1.2.16.jar
servlet-2.3.jar
slf4j-api-1.6.1.jar
slf4j-log4j12-1.6.1.jar
spring-aop-3.1.0.RELEASE.jar
spring-asm-3.1.0.RELEASE.jar
spring-beans-3.1.0.RELEASE.jar
spring-context-3.1.0.RELEASE.jar
spring-context-support-3.1.0.RELEASE.jar
spring-core-3.1.0.RELEASE.jar
spring-expression-3.1.0.RELEASE.jar
spring-jdbc-3.1.0.RELEASE.jar
spring-ldap-core-1.3.0.RELEASE.jar
spring-ldap-core-tiger-1.3.0.RELEASE.jar
spring-orm-3.1.0.RELEASE.jar
spring-oxm-3.1.0.RELEASE.jar
spring-security-config-3.1.0.RELEASE.jar
spring-security-core-3.1.0.RELEASE.jar
spring-security-ldap-3.1.0.RELEASE.jar
spring-security-web-3.1.0.RELEASE.jar
spring-tx-3.1.0.RELEASE.jar
spring-web-3.1.0.RELEASE.jar
spring-webmvc-3.1.0.M1.jar
spring-web-servlet-3.1.0.RELEASE.jar
sqlite-jdbc-3.7.2.jar
velocity-1.6.2.jar
velocity-tools-view-2.0.jar
最佳答案
正如 Stevie 在评论中指出的那样,问题是一个额外的 Jar 文件进入了 war 。
我从 WEB-INF/lib
中删除了 Jar,在我的例子中是 spring-webmvc-3.1.0.M1.jar
并重新启动了 jetty 。它启动了很好。
这没有引起注意,因为它在编译/构建期间出现(在 eclipse 中订购了 jar),也没有出现在我部署的第一台机器上。
非常感谢您的帮助。
关于java - 启动 jetty 服务器时出现 NoClassDefFoundError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16194256/
SQLite、Content provider 和 Shared Preference 之间的所有已知区别。 但我想知道什么时候需要根据情况使用 SQLite 或 Content Provider 或
警告:我正在使用一个我无法完全控制的后端,所以我正在努力解决 Backbone 中的一些注意事项,这些注意事项可能在其他地方更好地解决......不幸的是,我别无选择,只能在这里处理它们! 所以,我的
我一整天都在挣扎。我的预输入搜索表达式与远程 json 数据完美配合。但是当我尝试使用相同的 json 数据作为预取数据时,建议为空。点击第一个标志后,我收到预定义消息“无法找到任何内容...”,结果
我正在制作一个模拟 NHL 选秀彩票的程序,其中屏幕右侧应该有一个 JTextField,并且在左侧绘制弹跳的选秀球。我创建了一个名为 Ball 的类,它实现了 Runnable,并在我的主 Draf
这个问题已经有答案了: How can I calculate a time span in Java and format the output? (18 个回答) 已关闭 9 年前。 这是我的代码
我有一个 ASP.NET Web API 应用程序在我的本地 IIS 实例上运行。 Web 应用程序配置有 CORS。我调用的 Web API 方法类似于: [POST("/API/{foo}/{ba
我将用户输入的时间和日期作为: DatePicker dp = (DatePicker) findViewById(R.id.datePicker); TimePicker tp = (TimePic
放宽“邻居”的标准是否足够,或者是否有其他标准行动可以采取? 最佳答案 如果所有相邻解决方案都是 Tabu,则听起来您的 Tabu 列表的大小太长或您的释放策略太严格。一个好的 Tabu 列表长度是
我正在阅读来自 cppreference 的代码示例: #include #include #include #include template void print_queue(T& q)
我快疯了,我试图理解工具提示的行为,但没有成功。 1. 第一个问题是当我尝试通过插件(按钮 1)在点击事件中使用它时 -> 如果您转到 Fiddle,您会在“内容”内看到该函数' 每次点击都会调用该属
我在功能组件中有以下代码: const [ folder, setFolder ] = useState([]); const folderData = useContext(FolderContex
我在使用预签名网址和 AFNetworking 3.0 从 S3 获取图像时遇到问题。我可以使用 NSMutableURLRequest 和 NSURLSession 获取图像,但是当我使用 AFHT
我正在使用 Oracle ojdbc 12 和 Java 8 处理 Oracle UCP 管理器的问题。当 UCP 池启动失败时,我希望关闭它创建的连接。 当池初始化期间遇到 ORA-02391:超过
关闭。此题需要details or clarity 。目前不接受答案。 想要改进这个问题吗?通过 editing this post 添加详细信息并澄清问题. 已关闭 9 年前。 Improve
引用这个plunker: https://plnkr.co/edit/GWsbdDWVvBYNMqyxzlLY?p=preview 我在 styles.css 文件和 src/app.ts 文件中指定
为什么我的条形这么细?我尝试将宽度设置为 1,它们变得非常厚。我不知道还能尝试什么。默认厚度为 0.8,这是应该的样子吗? import matplotlib.pyplot as plt import
当我编写时,查询按预期执行: SELECT id, day2.count - day1.count AS diff FROM day1 NATURAL JOIN day2; 但我真正想要的是右连接。当
我有以下时间数据: 0 08/01/16 13:07:46,335437 1 18/02/16 08:40:40,565575 2 14/01/16 22:2
一些背景知识 -我的 NodeJS 服务器在端口 3001 上运行,我的 React 应用程序在端口 3000 上运行。我在 React 应用程序 package.json 中设置了一个代理来代理对端
我面临着一个愚蠢的问题。我试图在我的 Angular 应用程序中延迟加载我的图像,我已经尝试过这个2: 但是他们都设置了 src attr 而不是 data-src,我在这里遗漏了什么吗?保留 d
我是一名优秀的程序员,十分优秀!