Jetty部署web应用错误oejj.ObjectMBean

在Idea中Jetty部署web应用启动后有异常信息,详细错误信息如下:

2014-11-21 17:10:14.360:WARN:oejj.ObjectMBean:
java.lang.NoClassDefFoundError: org/eclipse/jetty/jmx/ObjectMBean
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:421)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383)
at org.eclipse.jetty.util.Loader.loadClass(Loader.java:100)
at org.eclipse.jetty.jmx.ObjectMBean.mbeanFor(ObjectMBean.java:125)
at org.eclipse.jetty.jmx.MBeanContainer.addBean(MBeanContainer.java:249)
at org.eclipse.jetty.util.component.Container.addBean(Container.java:182)
at org.eclipse.jetty.server.handler.AbstractHandler.setServer(AbstractHandler.java:80)
at org.eclipse.jetty.server.handler.HandlerWrapper.setServer(HandlerWrapper.java:132)
at org.eclipse.jetty.server.session.SessionHandler.setServer(SessionHandler.java:111)
at org.eclipse.jetty.server.handler.HandlerWrapper.setHandler(HandlerWrapper.java:81)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:246)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.deploy.ContextDeployer.deploy(ContextDeployer.java:359)
at org.eclipse.jetty.deploy.ContextDeployer.access$000(ContextDeployer.java:82)
at org.eclipse.jetty.deploy.ContextDeployer$ScannerListener.fileAdded(ContextDeployer.java:107)
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$1.run(Scanner.java:353)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by:
java.lang.ClassNotFoundException: org.eclipse.jetty.jmx.ObjectMBean
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:421)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:421)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383)
at org.eclipse.jetty.util.Loader.loadClass(Loader.java:100)
at org.eclipse.jetty.jmx.ObjectMBean.mbeanFor(ObjectMBean.java:125)
at org.eclipse.jetty.jmx.MBeanContainer.addBean(MBeanContainer.java:249)
at org.eclipse.jetty.util.component.Container.addBean(Container.java:182)
at org.eclipse.jetty.server.handler.AbstractHandler.setServer(AbstractHandler.java:80)
at org.eclipse.jetty.server.handler.HandlerWrapper.setServer(HandlerWrapper.java:132)
at org.eclipse.jetty.server.session.SessionHandler.setServer(SessionHandler.java:111)
at org.eclipse.jetty.server.handler.HandlerWrapper.setHandler(HandlerWrapper.java:81)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:246)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.deploy.ContextDeployer.deploy(ContextDeployer.java:359)
at org.eclipse.jetty.deploy.ContextDeployer.access$000(ContextDeployer.java:82)
at org.eclipse.jetty.deploy.ContextDeployer$ScannerListener.fileAdded(ContextDeployer.java:107)
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$1.run(Scanner.java:353)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)

虽然没有影响web的基本功能,但是有异常信息看着很不爽,找了半天没有找到解决办法,搜索了下发现资料也不多,据说是Jetty7早起版本的bug(https://bugs.eclipse.org/bugs/show_bug.cgi?id=355001),到7.5.0 release版本 就修复了,可我的已经是 Jetty8 …… 心里一万头草泥马奔腾而过

又搜索了半天终于找到一篇说去掉如下依赖的jar包就ok:

去掉该依赖,再重启项目果然没有异常信息了,具体原因还没有来得及深究。

本文介绍到此介绍。

—————–  EOF @Michael Sun —————–

原创文章,转载请注明: 转载自micmiu – 软件开发+生活点滴[ http://www.micmiu.com/ ]

本文链接地址: http://www.micmiu.com/exception/jetty-publish-web-error-objectmbean/

发表评论?

0 条评论。

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">