简体   繁体   English

在Tomcat中部署war文件时的java.lang.reflect.MalformedParameterizedTypeException

[英]java.lang.reflect.MalformedParameterizedTypeException when deploying war file in Tomcat

I'm getting the below exception when deploying through tomcat version 7.0.4. 通过tomcat版本7.0.4进行部署时,我收到以下异常。 I'm using java 1.7. 我正在使用java 1.7。 Seems like it is working with jdk 1.6 properly though. 似乎它正在使用jdk 1.6正常。

2013-09-26 13:03:58,154 ERROR [org.springframework.web.context.ContextLoader] -
Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean wit
h name 'cxf' defined in class path resource [META-INF/cxf/cxf.xml]: Initializati
on of bean failed; nested exception is java.lang.reflect.MalformedParameterizedT
ypeException
        at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory$1.run(AbstractAutowireCapableBeanFactory.java:409)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:380)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:264)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:222)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe
an(AbstractBeanFactory.java:261)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:185)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:164)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.
getBeansOfType(DefaultListableBeanFactory.java:308)
        at org.springframework.context.support.AbstractApplicationContext.getBea
nsOfType(AbstractApplicationContext.java:947)
        at org.springframework.context.support.AbstractApplicationContext.regist
erListeners(AbstractApplicationContext.java:701)
        at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:377)

Had googled and found out that it has to do with version conflicts with spring jars. 曾经用Google搜索并发现它与弹簧罐的版本冲突有关。

I'm using the following spring jars. 我正在使用以下弹簧罐。

spring-2.5.5 - tried with 2.5.6 also
spring-aop-2.5.6
spring-beans-2.5.6
spring-context-2.5.6
spring-core-2.5.6
spring-jdbc-3.1.1.RELEASE - tried with 2.5.6 also
spring-orm-3.1.1.RELEASE - tried with 2.5.6 also
spring-transaction-3.1.1.RELEASE - tried with 2.5.6 also
spring-tx-3.1.1.RELEASE - tried with 2.5.6 also

Following are the cxf jars used.

cxf-api-2.6.0
cxf-bundle-jaxrs-2.6.0
cxf-rt-bindings-soap-2.6.0
cxf-rt-bindings-xml-2.6.0
cxf-rt-core-2.6.0
cxf-rt-databinding-jaxb-2.6.0
cxf-rt-frontend-jaxws-2.6.0
cxf-rt-frontend-simple-2.6.0
cxf-rt-transports-http-2.6.0
cxf-rt-ws-addr-2.6.0
cxf-rt-ws-policy-2.6.0

Tried by replacing spring-aop-2.5.6, spring-beans-2.5.6, spring-context-2.5.6 ,spring-core-2.5.6 with 3.1.1 also. 通过更换spring-aop-2.5.6,spring-beans-2.5.6,spring-context-2.5.6,spring-core-2.5.6和3.1.1来实现。 Didnt help. 没有帮助。

Had tried deleting metadata and checking out fresh project, clean build, etc.. but nothing seems to work. 曾尝试删除元数据并检查新项目,清理构建等。但似乎没有任何工作。 Could someone show me the way out of this. 有人能告诉我出路吗? Stuck with it for two days. 坚持了两天。

I got the same exception at running time. 我在运行时遇到了同样的异常。 After one day of research, I found my project is using spring 2.5.6. 经过一天的研究,我发现我的项目正在使用spring 2.5.6。 , which is the latest revision while my spring-jdbc is on 3.2.2.RELEASE. ,这是我的spring-jdbc在3.2.2.RELEASE上的最新版本。 I am not able to use spring-jdbc 2.5.6 as I am using some of features that are not available in 2.5.6. 我无法使用spring-jdbc 2.5.6,因为我正在使用2.5.6中没有的一些功能。 The way I solved this problem is simply moving spring-jdbc-3.2.2.RELEASE.jar ahead of spring-2.5.6.jar in CLASSPATH. 我解决这个问题的方法就是在CLASSPATH中的spring-2.5.6.jar之前移动spring-jdbc-3.2.2.RELEASE.jar。 The exception went way. 例外情况已经发生了。 Hope this is helpful to some folks out there. 希望这对一些人有帮助。

We had this exact same issue when moving from java 6 -> 7 and it turned out to be the commons-pool version. 从java 6 - > 7移动时,我们遇到了同样的问题,结果发现它是commons-pool版本。 Changed it from commons-pool-1.5.7.jar to commons-pool-1.6.jar and all was fine. 将它从commons-pool-1.5.7.jar改为commons-pool-1.6.jar,一切都很好。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 尝试向API发出请求的java.lang.reflect.MalformedParameterizedTypeException - java.lang.reflect.MalformedParameterizedTypeException trying to make request to an API JBoss AS 7在启动期间抛出'java.lang.reflect.MalformedParameterizedTypeException' - JBoss AS 7 throwing 'java.lang.reflect.MalformedParameterizedTypeException' during start 由于Grails中的java.lang.reflect.MalformedParameterizedTypeException而创建名称为'pluginManager'的bean时出错 - Error creating bean with name 'pluginManager' due to java.lang.reflect.MalformedParameterizedTypeException in Grails 如何在代码中查找语义格式错误的参数化类型的位置。 JBoss Weld抛出java.lang.reflect.MalformedParameterizedTypeException - How to find location of semantically malformed parameterized type in code. JBoss Weld throws java.lang.reflect.MalformedParameterizedTypeException java.lang.OutOfMemoryError:Java堆空间在Tomcat 7上部署.war - java.lang.OutOfMemoryError: Java heap space deploying .war on Tomcat 7 war文件未在Tomcat中部署 - war file not deploying in Tomcat 将WAR文件部署到Tomcat 7 - Deploying a WAR file to Tomcat 7 在tomcat上部署War文件时出错 - Error when deploying war file on tomcat java.lang.ClassNotFoundException 与 Tomcat WAR 文件 - java.lang.ClassNotFoundException with Tomcat WAR file 部署Applet时java.lang.reflect.invocationtargetexception错误 - java.lang.reflect.invocationtargetexception Error when Deploying Applet
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM