`

spring加载错误,由版本问题造成

 
阅读更多
今天升级了spring的jar包,并且把activemq一起升级,出现一些错误
编译不过的代码是
	 <bean id="pooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory">
		<property name="maxConnections" value="50" />
		<property name="maximumActiveSessionPerConnection" value="2000" />
		<property name="idleTimeout" value="300000"></property>
		<property name="connectionFactory" ref="jmsConnectionFactory" />
	</bean>  


严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pooledConnectionFactory' defined in file [C:\Users\fengqinyun\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\myex\WEB-INF\classes\META-INF\spring\applicationContext-jms.xml]: Initialization of bean failed; nested exception is java.lang.reflect.MalformedParameterizedTypeException
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:529)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
	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.deployDescriptor(HostConfig.java:675)
	at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
	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:1065)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
	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:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.reflect.MalformedParameterizedTypeException
	at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.validateConstructorArguments(ParameterizedTypeImpl.java:42)
	at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.<init>(ParameterizedTypeImpl.java:35)
	at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.make(ParameterizedTypeImpl.java:77)
	at sun.reflect.generics.factory.CoreReflectionFactory.makeParameterizedType(CoreReflectionFactory.java:86)
	at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:122)
	at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31)
	at sun.reflect.generics.repository.MethodRepository.getReturnType(MethodRepository.java:50)
	at java.lang.reflect.Method.getGenericReturnType(Method.java:236)
	at org.springframework.core.GenericTypeResolver.resolveReturnType(GenericTypeResolver.java:99)
	at org.springframework.beans.GenericTypeAwarePropertyDescriptor.getPropertyType(GenericTypeAwarePropertyDescriptor.java:129)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.isExcludedFromDependencyCheck(AbstractAutowireCapableBeanFactory.java:1295)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.filterPropertyDescriptorsForDependencyCheck(AbstractAutowireCapableBeanFactory.java:1277)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.filterPropertyDescriptorsForDependencyCheck(AbstractAutowireCapableBeanFactory.java:1253)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1111)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
	... 35 more
2013-10-20 21:14:30 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2013-10-20 21:14:30 org.apache.catalina.core.StandardContext start
严重: Context [/myex] startup failed due to previous errors
2013-10-20 21:14:30.872 [main] ERROR org.springframework.web.context.ContextLoader.initWebApplicationContext - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pooledConnectionFactory' defined in file [C:\Users\fengqinyun\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\myex\WEB-INF\classes\META-INF\spring\applicationContext-jms.xml]: Initialization of bean failed; nested exception is java.lang.reflect.MalformedParameterizedTypeException
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:529) ~[spring-beans-3.2.4.RELEASE.jar:3.2.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) ~[spring-beans-3.2.4.RELEASE.jar:3.2.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) ~[spring-beans-3.2.4.RELEASE.jar:3.2.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) ~[spring-beans-3.2.4.RELEASE.jar:3.2.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) ~[spring-beans-3.2.4.RELEASE.jar:3.2.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) ~[spring-beans-3.2.4.RELEASE.jar:3.2.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628) ~[spring-beans-3.2.4.RELEASE.jar:3.2.4.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) ~[spring-context-3.2.4.RELEASE.jar:3.2.4.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) ~[spring-context-3.2.4.RELEASE.jar:3.2.4.RELEASE]
	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389) ~[spring-web-3.2.4.RELEASE.jar:3.2.4.RELEASE]
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294) ~[spring-web-3.2.4.RELEASE.jar:3.2.4.RELEASE]
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) [spring-web-3.2.4.RELEASE.jar:3.2.4.RELEASE]
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206) [catalina.jar:6.0.36]
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705) [catalina.jar:6.0.36]
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799) [catalina.jar:6.0.36]
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) [catalina.jar:6.0.36]
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601) [catalina.jar:6.0.36]
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675) [catalina.jar:6.0.36]
	at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601) [catalina.jar:6.0.36]
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502) [catalina.jar:6.0.36]
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317) [catalina.jar:6.0.36]
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324) [catalina.jar:6.0.36]
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) [catalina.jar:6.0.36]
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065) [catalina.jar:6.0.36]
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) [catalina.jar:6.0.36]
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) [catalina.jar:6.0.36]
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) [catalina.jar:6.0.36]
	at org.apache.catalina.core.StandardService.start(StandardService.java:525) [catalina.jar:6.0.36]
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) [catalina.jar:6.0.36]
	at org.apache.catalina.startup.Catalina.start(Catalina.java:595) [catalina.jar:6.0.36]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_43]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_43]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_43]
	at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_43]
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) [bootstrap.jar:6.0.36]
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) [bootstrap.jar:6.0.36]
Caused by: java.lang.reflect.MalformedParameterizedTypeException: null
	at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.validateConstructorArguments(ParameterizedTypeImpl.java:42) ~[na:1.6.0_43]
	at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.<init>(ParameterizedTypeImpl.java:35) ~[na:1.6.0_43]
	at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.make(ParameterizedTypeImpl.java:77) ~[na:1.6.0_43]
	at sun.reflect.generics.factory.CoreReflectionFactory.makeParameterizedType(CoreReflectionFactory.java:86) ~[na:1.6.0_43]
	at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:122) ~[na:1.6.0_43]
	at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31) ~[na:1.6.0_43]
	at sun.reflect.generics.repository.MethodRepository.getReturnType(MethodRepository.java:50) ~[na:1.6.0_43]
	at java.lang.reflect.Method.getGenericReturnType(Method.java:236) ~[na:1.6.0_43]
	at org.springframework.core.GenericTypeResolver.resolveReturnType(GenericTypeResolver.java:99) ~[spring-core-3.2.4.RELEASE.jar:3.2.4.RELEASE]
	at org.springframework.beans.GenericTypeAwarePropertyDescriptor.getPropertyType(GenericTypeAwarePropertyDescriptor.java:129) ~[spring-beans-3.2.4.RELEASE.jar:3.2.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.isExcludedFromDependencyCheck(AbstractAutowireCapableBeanFactory.java:1295) ~[spring-beans-3.2.4.RELEASE.jar:3.2.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.filterPropertyDescriptorsForDependencyCheck(AbstractAutowireCapableBeanFactory.java:1277) ~[spring-beans-3.2.4.RELEASE.jar:3.2.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.filterPropertyDescriptorsForDependencyCheck(AbstractAutowireCapableBeanFactory.java:1253) ~[spring-beans-3.2.4.RELEASE.jar:3.2.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1111) ~[spring-beans-3.2.4.RELEASE.jar:3.2.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) ~[spring-beans-3.2.4.RELEASE.jar:3.2.4.RELEASE]
	... 35 common frames omitted


搞了半天没弄明白,各种google,百度,到最后受到了启发。
https://issues.apache.org/jira/browse/AMQ-4189
解决方法:如下:
commons-pool-1.5.4.jar  换成commons-pool-1.6.jar 问题解决 
分享到:
评论

相关推荐

    spring.xls

    spring的IOC: ... * 由spring容器调用init方法 * 在构造函数之后执行 * 销毁 * 如果是单例,则必须返回ClassPathXmlApplicationContext该容器,才能执行销毁工作 * 如果是多例,容器不负责销毁

    SpringBoot常见错误及解决方法1

    解决 Spring Boot 中的常见错误需要了解 Spring Boot 的配置加载过程和优先级问题。 配置加载过程 Spring Boot 的配置加载有着约定俗成的步骤: 1. 从 resources 目录下加载 application.properties/application....

    spring mvc log4j

    - 日志框架的作用:记录应用程序运行过程中的信息,如错误、警告、调试信息等,帮助开发者追踪和定位问题。 - Log4j 特点:配置灵活、性能高效、支持多种输出方式(文件、控制台、数据库等)。 2. **Spring MVC ...

    Spring Cloud微服务架构的构建:分布式配置中心(加密解密功能)

    6. 需要一个断路器,及时处理服务调用时的超时和错误,防止由于其中一个服务的问题而导致整体系统的瘫痪。 7. 还需要一个监控功能,监控每个服务调用花费的时间等。 在微服务架构中,我们通常都会采用 DevOps 的...

    ssh(structs,spring,hibernate)框架中的上传下载

    其中Hibernate 2相关的封装类位于org.springframework.orm.hibernate2.*包中,而Hibernate 3.0的封装类位于org.springframework.orm.hibernate3.*包中,需要根据您所选用Hibernate版本进行正确选择。  3、Lob字段...

    SpringBatchMybatis:用mybatis使用spring batch的例子

    通过查询SQL,每次读取一定数量的数据,避免一次性加载大量数据造成内存压力。 - **ItemProcessor**:定义自定义的处理器类,处理每个Item的数据,可以利用MyBatis的Service层进行业务逻辑处理。 - **ItemWriter**:...

    浅谈BeanPostProcessor加载次序及其对Bean造成的影响分析

    理解BeanPostProcessor的加载次序和它对Bean的影响是优化Spring应用的关键。正确的配置可以避免意外的错误,提高系统性能和可维护性。在实际开发中,需要注意BPP的依赖关系,确保它们正确地参与到Bean的生命周期中,...

    errors code

    本文将深入解析一个与Java Web应用开发相关的错误代码示例,该示例涉及到Struts、Spring、Hibernate框架以及Apache Tomcat服务器的配置和运行时问题。 ### 错误代码分析 #### Apache Tomcat Native Library未找到 ...

    SSM框架中测试单元的使用 spring整合Junit过程详解

    但是,这样做的原因是这样的:当我们在XML中配置了一个bean,Spring加载配置文件创建容器时,就会创建对象。测试类只是我们在测试功能时使用,而在项目中它并不参与程序逻辑,也不会解决需求上的问题,所以创建完了...

    java的常见问题及解决方法参照.pdf

    Java编程过程中会遇到各种问题,这些问题可能涉及到类加载、数据类型、XML解析、图形界面、网络通信等多个方面。...同时,保持库和框架的更新,避免使用不同版本的库造成冲突,也是避免此类问题的有效手段。

    MyEclipse报错说明

    无法从底层数据库获取连接,这可能是由于数据库URL配置错误、网络问题或数据库服务未启动等原因造成的。检查数据库连接参数和数据库服务器状态,确保所有服务正常运行。 11. **org/apache/commons/pool/impl/...

    SSH框架面试题.pdf

    懒加载问题主要发生在关联对象的加载上,如果不恰当使用可能会导致N+1查询问题,严重影响性能。解决方法包括合理设置懒加载策略、使用分页和批量加载等技术。 39. **在SSH框架中,Struts如何与Spring的事务管理...

    Spring Cloud Hystrix 服务容错保护的原理实现

    Spring Cloud Hystrix ...具体来说,我们需要在ribbon-consumer 工程的pom.xml的dependency节点下引入spring-cloud-starter-hystrix依赖,并在ribbon-consumer 工程的 主加载类 中添加 @EnableCircuitBreaker 注解。

    T03_SpringMVCExample:工作 - 使用 Log4j.jar 的 Spring

    4. **Spring自动配置**:Spring Boot提供对Log4j2的自动配置支持,只需要在类路径下放置Log4j2的配置文件,Spring Boot就会自动加载并使用。 5. **使用LoggerFactory**:在Spring应用中,我们通常使用`org.slf4j....

    Spring Boot+Vue前后端分离,如何避免前端页面 404

    在前后端分离的开发模式中,404错误页面的处理是常见的问题,尤其是在Spring Boot结合Vue进行开发时。404错误通常发生在用户尝试访问不存在的URL时,导致页面无法正常加载。以下是对该问题的详细分析和解决方案: 1...

    ssh2错误学习记录

    Tomcat服务器启动失败可能由多种原因造成,上述步骤提供了一个基本的解决流程:关闭MyEclipse,删除特定的配置文件,然后重启IDE。这种方法可以帮助消除部署项目的信息错误。 10. **JVM编译命令排除**: 如果遇到...

    互联网高频Java后端面试题20道(适合1~3年)V1.0.83.docx

    问题 18:请简述 Spring Cloud 的主要组件及其功能。答案:Spring Cloud 包含多个组件,用于构建分布式系统的基础设施。Eureka 提供服务注册与发现;Zuul 和 Ribbon 实现客户端负载均衡;Hystrix 提供断路器功能,...

    解决Springboot @Autowired 无法注入问题

    5. Spring配置问题:检查`application.properties`或`application.yml`配置文件,确保没有错误地禁用了自动扫描或组件扫描。 6. 使用`@Autowired`的类不是由Spring管理的:确保使用`@Component`或其他注解标记,...

Global site tag (gtag.js) - Google Analytics