开发者

Jetty error: java.lang.NoClassDefFoundError: org/springframework/transaction/TransactionDefinition

0.0.M2 and Spring for a web application. The question is that the war file can be deployed on Tomcat and execute correctly on Tomcat. But it cannot work on jetty. I run jetty as standalone program. That is to say I just copy the war file into the webapp directory of jetty and use "java -jar start.jar"

HTTP ERROR 500

Problem accessing /IOServer/schema/loadschemalist.json. Reason:

org/springframework/transaction/TransactionDefinition

Caused by:

java.lang.NoClassDefFoundError: org/springframework/transaction/TransactionDefinition at com.fixflyer.service.aggregation.Aggregator.createMessageProcessor(Aggregator.java:47) at com.fixflyer.service.configuration.ConfigService.loadSchema(ConfigService.java:41) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:710) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:167) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:414) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:402) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716) at org.springframew开发者_如何学运维ork.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:563) at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:546) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:483) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:479) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:230) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:956) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:411) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:891) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:247) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:151) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114) at org.eclipse.jetty.server.Server.handle(Server.java:353) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:598) at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1076) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:805) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:427) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.ClassNotFoundException: org.springframework.transaction.TransactionDefinition 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 java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:417) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:370) ... 40 more

Caused by:

java.lang.ClassNotFoundException: org.springframework.transaction.TransactionDefinition 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 java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:417) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:370) at com.fixflyer.service.aggregation.Aggregator.createMessageProcessor(Aggregator.java:47) at com.fixflyer.service.configuration.ConfigService.loadSchema(ConfigService.java:41) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:710) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:167) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:414) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:402) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:563) at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:546) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:483) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:479) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:230) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:956) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:411) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:891) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:247) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:151) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114) at org.eclipse.jetty.server.Server.handle(Server.java:353) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:598) at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1076) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:805) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:427) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450) at java.lang.Thread.run(Thread.java:662)

Powered by Jetty://


Add this dependency

<dependency>
   <groupId>org.springframework</groupId>
   <artifactId>spring-tx</artifactId>
   <version>5.1.2.RELEASE</version>
</dependency>


I was facing this issue while running specific cucumber scenario test in IntelliJ, I had to remove "cucumber.api.spring" in Glue section in Edit Configuration.

Reference Link

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜