java.lang.NoClassDefFoundError: org/springframework/web/servlet/tags/MessageTag

Stack Overflow | Mrunal | 3 months ago
  1. 0

    java.lang.NoClassDefFoundError: org/springframework/web/servlet/tags/MessageTag

    Stack Overflow | 3 months ago | Mrunal
    java.lang.NoClassDefFoundError: org/springframework/web/servlet/tags/MessageTag
  2. 0

    The tests in the *Web Service Inbound Gateway Sample* fail to run. +*InboundGatewayTests*+ While trying to run _org.springframework.integration.samples.ws.InboundGatewayTests_, it failed with: {noformat} java.lang.NoSuchMethodError: org.springframework.beans.BeanUtils.instantiateClass(Ljava/lang/Class;Ljava/lang/Class;)Ljava/lang/Object; at org.springframework.test.context.ContextLoaderUtils.resolveContextLoader(ContextLoaderUtils.java:87) at org.springframework.test.context.ContextLoaderUtils.buildMergedContextConfiguration(ContextLoaderUtils.java:298) at org.springframework.test.context.TestContext.<init>(TestContext.java:100) at org.springframework.test.context.TestContextManager.<init>(TestContextManager.java:117) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTestContextManager(SpringJUnit4ClassRunner.java:119) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.<init>(SpringJUnit4ClassRunner.java:108) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31) at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57) at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57) at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.<init>(JUnit4TestReference.java:29) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.<init>(JUnit4TestClassReference.java:25) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:40) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:30) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) {noformat} &nbsp; +*InContainerTests*+ For running the other test, _org.springframework.integration.samples.ws.InContainerTests_ (referring to the sample's [readme|https://github.com/SpringSource/spring-integration-samples/blob/master/basic/ws-inbound-gateway/README.md]): * Created war with _mvn clean package_ * Deployed the war file on Apache Tomcat 6.0.32 * Ran the test The test failed with: {noformat} org.springframework.ws.client.WebServiceTransportException: Internal Server Error [500] at org.springframework.ws.client.core.WebServiceTemplate.handleError(WebServiceTemplate.java:663) at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:587) at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:537) at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:492) at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:436) at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:421) at org.springframework.integration.samples.ws.InContainerTests.testWebServiceRequestAndResponse(InContainerTests.java:53) 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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) {noformat} From the tomcat's catalina.log, I found that the deployment of war failed with: {noformat} SEVERE: Error deploying web application archive ws-inbound-gateway-2.1.0.BUILD-SNAPSHOT.war java.lang.NoClassDefFoundError: org/springframework/web/servlet/FrameworkServlet at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2818) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1095) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4420) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4733) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) 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:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) {noformat} To avoid the deployment error, I added two dependencies spring-webmvc-3.1.0.RELEASE, spring-context-3.1.0.RELEASE to _ws-inbound-gateway/pom.xml_. After deploying the newly built war, again the test failed with: {noformat} org.springframework.ws.client.WebServiceTransportException: Internal Server Error [500] at org.springframework.ws.client.core.WebServiceTemplate.handleError(WebServiceTemplate.java:663) at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:587) at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:537) at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:492) at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:436) at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:421) at org.springframework.integration.samples.ws.InContainerTests.testWebServiceRequestAndResponse(InContainerTests.java:53) 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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) {noformat}

    Spring JIRA | 5 years ago | Nihar Rochan
    java.lang.NoClassDefFoundError: org/springframework/web/servlet/FrameworkServlet
  3. 0

    The tests in the *Web Service Inbound Gateway Sample* fail to run. +*InboundGatewayTests*+ While trying to run _org.springframework.integration.samples.ws.InboundGatewayTests_, it failed with: {noformat} java.lang.NoSuchMethodError: org.springframework.beans.BeanUtils.instantiateClass(Ljava/lang/Class;Ljava/lang/Class;)Ljava/lang/Object; at org.springframework.test.context.ContextLoaderUtils.resolveContextLoader(ContextLoaderUtils.java:87) at org.springframework.test.context.ContextLoaderUtils.buildMergedContextConfiguration(ContextLoaderUtils.java:298) at org.springframework.test.context.TestContext.<init>(TestContext.java:100) at org.springframework.test.context.TestContextManager.<init>(TestContextManager.java:117) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTestContextManager(SpringJUnit4ClassRunner.java:119) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.<init>(SpringJUnit4ClassRunner.java:108) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31) at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57) at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57) at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.<init>(JUnit4TestReference.java:29) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.<init>(JUnit4TestClassReference.java:25) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:40) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:30) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) {noformat} &nbsp; +*InContainerTests*+ For running the other test, _org.springframework.integration.samples.ws.InContainerTests_ (referring to the sample's [readme|https://github.com/SpringSource/spring-integration-samples/blob/master/basic/ws-inbound-gateway/README.md]): * Created war with _mvn clean package_ * Deployed the war file on Apache Tomcat 6.0.32 * Ran the test The test failed with: {noformat} org.springframework.ws.client.WebServiceTransportException: Internal Server Error [500] at org.springframework.ws.client.core.WebServiceTemplate.handleError(WebServiceTemplate.java:663) at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:587) at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:537) at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:492) at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:436) at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:421) at org.springframework.integration.samples.ws.InContainerTests.testWebServiceRequestAndResponse(InContainerTests.java:53) 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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) {noformat} From the tomcat's catalina.log, I found that the deployment of war failed with: {noformat} SEVERE: Error deploying web application archive ws-inbound-gateway-2.1.0.BUILD-SNAPSHOT.war java.lang.NoClassDefFoundError: org/springframework/web/servlet/FrameworkServlet at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2818) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1095) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4420) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4733) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) 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:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) {noformat} To avoid the deployment error, I added two dependencies spring-webmvc-3.1.0.RELEASE, spring-context-3.1.0.RELEASE to _ws-inbound-gateway/pom.xml_. After deploying the newly built war, again the test failed with: {noformat} org.springframework.ws.client.WebServiceTransportException: Internal Server Error [500] at org.springframework.ws.client.core.WebServiceTemplate.handleError(WebServiceTemplate.java:663) at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:587) at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:537) at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:492) at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:436) at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:421) at org.springframework.integration.samples.ws.InContainerTests.testWebServiceRequestAndResponse(InContainerTests.java:53) 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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) {noformat}

    Spring JIRA | 5 years ago | Nihar Rochan
    java.lang.NoClassDefFoundError: org/springframework/web/servlet/FrameworkServlet
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    This probably doesn't affect customers much, but it affects me during development and may happen very occasionally to customers doing an upgrade. If you have a Web browser open and editing a page, then it sends out draft requests to Confluence periodically. If this happens while Confluence is being set up, then the following errors occur. {noformat} 2009-03-25 13:06:21,469 ERROR [http-8080-Processor25] [org.directwebremoting.spring.SpringCreator] error Error java.lang.InstantiationException: DWR can't find a spring config. See the logs for solutions at org.directwebremoting.spring.SpringCreator.getInstance(SpringCreator.java:141) at org.directwebremoting.spring.SpringCreator.getType(SpringCreator.java:106) at org.directwebremoting.impl.DefaultCreatorManager.addCreator(DefaultCreatorManager.java:118) at org.directwebremoting.impl.DefaultCreatorManager.addCreator(DefaultCreatorManager.java:100) at org.directwebremoting.impl.DwrXmlConfigurator.loadCreate(DwrXmlConfigurator.java:274) at org.directwebremoting.impl.DwrXmlConfigurator.loadAllows(DwrXmlConfigurator.java:224) at org.directwebremoting.impl.DwrXmlConfigurator.configure(DwrXmlConfigurator.java:170) at org.directwebremoting.impl.ContainerUtil.configureFromDefaultDwrXml(ContainerUtil.java:262) at org.directwebremoting.impl.ContainerUtil.configureContainerFully(ContainerUtil.java:419) at org.directwebremoting.servlet.DwrServlet.init(DwrServlet.java:79) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:791) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:127) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:613) {noformat} The exception isn't propagated to the top, so the Servlet Container believes that the Servlet has been successfully initialised, so all calls to DWR once Confluence actually is set up (until it's restarted) are broken. Furthermore, the premature calls to the Spring container made by the DWRServlet's initialisation method can cause various things to break. Eg I just gave it a try and the Advanced Macros plugin wasn't enabled. {noformat} 2009-03-25 17:14:48,183 ERROR [http-8080-Processor19] [com.atlassian.plugin.DefaultPluginManager] addPlugins Unable to start the following plugins: confluence.macros.advanced -- referer: http://localhost:8080/confluence/setup/setuplicense.action | url: /confluence/setup/setupembeddeddb-default.action | userName: anonymous | action: setupembeddeddb-default 2009-03-25 17:14:51,437 ERROR [http-8080-Processor21] [[Catalina].[localhost].[/confluence].[dwr-invoker]] invoke Servlet.service() for servlet dwr-invoker threw exception java.lang.NoClassDefFoundError: org/springframework/web/servlet/support/RequestContextUtils at org.directwebremoting.spring.SpringCreator.getBeanFactory(SpringCreator.java:174) at org.directwebremoting.spring.SpringCreator.getInstance(SpringCreator.java:132) at org.directwebremoting.spring.SpringCreator.getType(SpringCreator.java:106) at org.directwebremoting.dwrp.BaseCallMarshaller.findMethod(BaseCallMarshaller.java:221) at org.directwebremoting.dwrp.BaseCallMarshaller.marshallInbound(BaseCallMarshaller.java:127) at org.directwebremoting.servlet.PlainCallHandler.handle(PlainCallHandler.java:44) at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101) at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) {noformat}

    Atlassian JIRA | 8 years ago | Don Willis [Atlassian]
    java.lang.NoClassDefFoundError: org/springframework/web/servlet/support/RequestContextUtils

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoClassDefFoundError

      org/springframework/web/servlet/tags/MessageTag

      at com.ibm._jsp._Default._jspx_meth_s_message_2()
    2. com.ibm._jsp
      _Default._jspService
      1. com.ibm._jsp._Default._jspx_meth_s_message_2(_Default.java:2670)
      2. com.ibm._jsp._Default._jspService(_Default.java:637)
      2 frames
    3. com.ibm.ws
      HttpJspBase.service
      1. com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99)
      1 frame
    4. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
      1 frame
    5. WebSphere
      ServletWrapperImpl.handleRequest
      1. com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1658)
      2. com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:940)
      3. com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:503)
      4. com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181)
      4 frames
    6. com.ibm.wsspi
      GenericServletWrapper.handleRequest
      1. com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:121)
      1 frame
    7. com.ibm.ws
      AbstractJSPExtensionServletWrapper.handleRequest
      1. com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:259)
      1 frame
    8. WebSphere
      WebAppRequestDispatcher.include
      1. com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:711)
      1 frame
    9. com.ibm.wps
      Servlet.doGet
      1. com.ibm.wps.services.dispatcher.DispatcherServiceImpl.handleRequest(DispatcherServiceImpl.java:93)
      2. com.ibm.wps.services.dispatcher.DispatcherServiceImpl.include(DispatcherServiceImpl.java:53)
      3. com.ibm.wps.services.dispatcher.Dispatcher.include(Dispatcher.java:50)
      4. com.ibm.wps.engine.templates.themes.Default.doDispatch(Default.java:294)
      5. com.ibm.wps.engine.templates.themes.Default.render(Default.java:247)
      6. com.ibm.wps.engine.templates.ThemeTemplate.render(ThemeTemplate.java:65)
      7. com.ibm.wps.engine.phases.WPRenderPhase.processRendering(WPRenderPhase.java:504)
      8. com.ibm.wps.engine.phases.WPBaseRenderPhase.execute(WPBaseRenderPhase.java:248)
      9. com.ibm.wps.state.phases.AbstractRenderPhase.next(AbstractRenderPhase.java:106)
      10. com.ibm.wps.engine.phases.WPAbstractRenderPhase.next(WPAbstractRenderPhase.java:100)
      11. com.ibm.wps.engine.Servlet.callPortal(Servlet.java:959)
      12. com.ibm.wps.engine.Servlet.doGet(Servlet.java:681)
      12 frames
    10. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
      1 frame
    11. com.ibm.wps
      Servlet.service
      1. com.ibm.wps.engine.Servlet.doFilter(Servlet.java:1433)
      2. com.ibm.wps.resolver.servlet.ContentHandlerCleanup.doFilter(ContentHandlerCleanup.java:672)
      3. com.ibm.wps.resolver.servlet.AbstractFilter.doFilter(AbstractFilter.java:93)
      4. com.ibm.wps.engine.Servlet.service(Servlet.java:1421)
      4 frames
    12. WebSphere
      WebAppFilterChain.doFilter
      1. com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1658)
      2. com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1598)
      3. com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:149)
      3 frames
    13. com.ibm.wps
      ExtensionFilter.doFilter
      1. com.ibm.wps.engine.ExtensionFilter$ExtendedFilterChain.doFilter(ExtensionFilter.java:91)
      2. com.ibm.wps.engine.ExtensionFilter.doFilter(ExtensionFilter.java:178)
      2 frames
    14. WebSphere
      WebAppFilterChain.doFilter
      1. com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
      2. com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:125)
      2 frames
    15. com.ibm.wps
      ExtendedLocaleFilter.doFilter
      1. com.ibm.wps.engine.ExtendedLocaleFilter.doFilter(ExtendedLocaleFilter.java:113)
      1 frame
    16. WebSphere
      WebAppFilterChain.doFilter
      1. com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
      2. com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:125)
      2 frames
    17. com.ibm.wps
      FriendlySelectionFilter.doFilter
      1. com.ibm.wps.resolver.friendly.servlet.FriendlySelectionFilter.doFilter(FriendlySelectionFilter.java:191)
      1 frame
    18. WebSphere
      WebAppFilterChain.doFilter
      1. com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
      2. com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:125)
      2 frames
    19. com.ibm.wps
      URLAnalyzer.doFilter
      1. com.ibm.wps.mappingurl.impl.URLAnalyzer.doFilter(URLAnalyzer.java:448)
      1 frame
    20. WebSphere
      WebAppFilterChain.doFilter
      1. com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
      2. com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:125)
      2 frames
    21. com.ibm.wps
      VirtualPortalFilter.doFilter
      1. com.ibm.wps.engine.VirtualPortalFilter.doFilter(VirtualPortalFilter.java:88)
      1 frame
    22. WebSphere
      WebAppFilterChain.doFilter
      1. com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
      2. com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:125)
      2 frames
    23. com.ibm.wps
      StateCleanup.doFilter
      1. com.ibm.wps.state.filter.StateCleanup.doFilter(StateCleanup.java:95)
      1 frame
    24. WebSphere
      WSWebContainer.handleRequest
      1. com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
      2. com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:125)
      3. com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:80)
      4. com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
      5. com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:935)
      6. com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:503)
      7. com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181)
      8. com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
      9. com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:875)
      10. com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)
      10 frames
    25. com.ibm.ws
      WCChannelLink.ready
      1. com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
      1 frame
    26. WebSphere
      AioReadCompletionListener.futureCompleted
      1. com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:453)
      2. com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:515)
      3. com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:306)
      4. com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:277)
      5. com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
      6. com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
      7. com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
      7 frames
    27. com.ibm.io
      ResultHandler$2.run
      1. com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
      2. com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
      3. com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
      4. com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
      5. com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
      6. com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
      6 frames
    28. com.ibm.ws
      ThreadPool$Worker.run
      1. com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1646)
      1 frame