一尘不染

使用Tomcat 7,Spring 3和Camel 2.9.1加载Jar文件时出错

tomcat

在使用Spring(3.0.5.RELEASE)在Tomcat(apache-tomcat-7.0.26)上运行Camel(2.9.1)时,出现以下异常。

任何指针将不胜感激。谢谢。

Mar 12, 2012 3:03:48 PM org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(/Users/XXXX/Documents/apache- tomcat-7.0.26/webapps/myapp/WEB-INF/lib/geronimo-servlet_2.5_spec-1.1.2.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class [ http-bio-8080-exec-1] ContextLoader ERROR Context initialization failed java.lang.NoSuchMethodError: org.springframework.core.BridgeMethodResolver.isVisibilityBridgeMethodPair(Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;)Z at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.buildAutowiringMetadata(AutowiredAnnotationBeanPostProcessor.java:346)[spring- beans-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.findAutowiringMetadata(AutowiredAnnotationBeanPostProcessor.java:317)[spring- beans-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(AutowiredAnnotationBeanPostProcessor.java:216)[spring- beans-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:797)[spring- beans-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:492)[spring- beans-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)[spring- beans-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)[spring- beans-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)[spring- beans-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)[spring- beans-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)[spring- beans-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:722)[spring- context-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:410)[spring- context-3.0.7.RELEASE.jar:3.0.7.RELEASE] at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)[spring- web-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)[spring- web-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)[spring- web-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)[catalina.jar:7.0.26] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)[catalina.jar:7.0.26] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)[catalina.jar:7.0.26] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)[catalina.jar:7.0.26] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)[catalina.jar:7.0.26] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)[catalina.jar:7.0.26] at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:958)[catalina.jar:7.0.26] at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:536)[catalina.jar:7.0.26] at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1467)[catalina.jar:7.0.26] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_29] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_29] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_29] at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_29] at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)[tomcat- coyote.jar:7.0.26] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)[:1.6.0_29] at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)[:1.6.0_29] at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1436)[catalina.jar:7.0.26] at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:673)[catalina.jar:7.0.26] at org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:431)[catalina.jar:7.0.26] at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)[servlet- api.jar:] at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)[servlet-api.jar:] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)[catalina.jar:7.0.26] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)[catalina.jar:7.0.26] at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)[catalina.jar:7.0.26] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)[catalina.jar:7.0.26] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)[catalina.jar:7.0.26] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)[catalina.jar:7.0.26] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)[catalina.jar:7.0.26] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)[catalina.jar:7.0.26] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)[catalina.jar:7.0.26] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)[catalina.jar:7.0.26] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)[catalina.jar:7.0.26] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)[catalina.jar:7.0.26] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)[catalina.jar:7.0.26] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)[tomcat- coyote.jar:7.0.26] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)[tomcat- coyote.jar:7.0.26] at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)[tomcat- coyote.jar:7.0.26] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_29] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_29] at java.lang.Thread.run(Thread.java:680)[:1.6.0_29] Mar 12, 2012 3:03:50 PM org.apache.catalina.core.StandardContext startInternal SEVERE: Error listenerStart


阅读 252

收藏
2020-06-16

共1个答案

一尘不染

您的Spring jar文件之间存在版本不匹配,您正在使用 spring-web 3.0.5spring-beans 3.0.7
spring-context 3.0.7 和…。请使用一致版本的Spring jar文件,问题应该解决。

2020-06-16