spring4.0+hessian4.0+tomcat7启动报createIdentityMapIfPossible(I)Ljava/util/Map

如题,报了如下错误

写道
java.lang.NoSuchMethodError: org.springframework.core.CollectionFactory.createIdentityMapIfPossible(I)Ljava/util/Map;
at org.springframework.aop.framework.AdvisedSupport.initDefaultAdvisorChainFactory(AdvisedSupport.java:120)
at org.springframework.aop.framework.AdvisedSupport.<init>(AdvisedSupport.java:103)
at org.springframework.aop.framework.ProxyCreatorSupport.<init>(ProxyCreatorSupport.java:47)
at org.springframework.aop.framework.ProxyFactory.<init>(ProxyFactory.java:40)
at org.springframework.remoting.support.RemoteExporter.getProxyForService(RemoteExporter.java:156)
at org.springframework.remoting.caucho.HessianExporter.prepare(HessianExporter.java:126)
at org.springframework.remoting.caucho.HessianExporter.afterPropertiesSet(HessianExporter.java:117)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:658)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:624)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:672)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:543)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:484)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
at javax.servlet.GenericServlet.init(GenericServlet.java:160)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)

 网上搜了下,有说是缺少包。我依赖的包如下:

junit-3.8.1.jar

hessian-4.0.38.jar

spring-webmvc-4.0.6.RELEASE.jar

spring-beans-4.0.6.RELEASE.jar

spring-context-4.0.6.RELEASE.jar

spring-core-4.0.6.RELEASE.jar

spring-expression-4.0.6.RELEASE.jar

spring-web-4.0.6.RELEASE.jar

spring-remoting-2.0.8.jar

aopalliance-1.0.jar

commons-logging-1.1.jar

log4j-1.2.12.jar

logkit-1.0.1.jar

avalon-framework-4.1.3.jar

spring-aop-2.0.8.jar

servlet-api-2.3.jar

spring-jms-4.0.6.RELEASE.jar

spring-tx-4.0.6.RELEASE.jar

spring-context-support-4.1.0.RELEASE.jar

 

不知道缺少哪个包,求帮助

chen_tq
chen_tq 问题已经找到,使用spring3的版本就没问题了
5 年多之前 回复

1个回答

手上暂时没什么包
不过你可以试试 cglib asm slf4j common-lang还有其他common包
另外配上log4j调到debug级别 看日志输出卡在什么地方
感觉你包是比较少
spring 会依赖很多扩展包 具体忘记了~
你可以试试没有 hessian ,单独一个spring容器的启动会不会提示少 根据cause by的报错信息去找包

chen_tq
chen_tq 多谢 happysoul 的回答。原因找到了,是spring4和hessian4不兼容,换成spring3的版本就可以了
5 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐