用的spring3,把工程部署到wildfly的时候,一直报错
16:42:52,281 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] (MSC service thread 1-3) Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@b32eacc: defining beans [org.springframework.aop.config.internalAutoProxyCreator,aspectBean,org.springframework.aop.aspectj.AspectJPointcutAdvisor#0,org.springframework.aop.aspectj.AspectJPointcutAdvisor#1,org.springframework.aop.aspectj.AspectJPointcutAdvisor#2,doDelete,doRestart,doUploadConf,deviceController,dispatchRules,loggerController,loginController,ruleController,SSHController,userController,wafConfController,confDaoImpl,confServiceImpl,deviceDaoImpl,deviceServiceImpl,LogDao,logServiceImpl,ruleDaoImpl,ruleServiceImpl,UserDao,userServiceImpl,wafConfDaoImpl,wafConfServiceImpl,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.validation.beanvalidation.LocalValidatorFactoryBean#0,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#0,org.springframework.web.servlet.handler.MappedInterceptor#0,org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver#0,org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver#0,org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver#0,org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0,org.springframework.web.servlet.handler.MappedInterceptor#1,viewResolver,jsltViewResolver,freemarkerResolver,multipartResolver,webPropertyConfig,freemarkerConfig,freemarkerConfiguration,fmXmlEscape,fmHtmlEscape,fmImgUrl,org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#0,exceptionResolver,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@5d3c2d78
16:42:52,305 ERROR [org.springframework.web.servlet.DispatcherServlet] (MSC service thread 1-3) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#0' defined in class path resource [conf/spring/richtext-servlet.xml]: Cannot create inner bean 'org.springframework.http.converter.json.MappingJacksonHttpMessageConverter#6cd426fe' of type [org.springframework.http.converter.json.MappingJacksonHttpMessageConverter] while setting bean property 'messageConverters' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.http.converter.json.MappingJacksonHttpMessageConverter#6cd426fe' defined in class path resource [conf/spring/richtext-servlet.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.http.converter.json.MappingJacksonHttpMessageConverter]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.codehaus.jackson.type.JavaType.<init>(Ljava/lang/Class;)V
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281) [spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120) [spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
这是XML中的配置
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
<property name="messageConverters">
<list >
<bean class="org.springframework.http.converter.StringHttpMessageConverter">
<property name = "supportedMediaTypes">
<list>
<value>text/plain;charset=UTF-8</value>
</list>
</property>