Spring 3.0.5 Webapp在tomcat中运行良好....不会在JBoss EAP 5.1中启动

时间:2012-02-28 21:40:44

标签: java spring spring-mvc jboss5.x

Spring 3.0.5 Webapp在tomcat中运行良好....不会在JBoss EAP 5.1中启动

我有一个非常简单的webapp,我使用Eclipse,Spring 3.05在tomcat6.1中运行没有任何问题,我的公司正在转向Jboss EAP 5.1,我收到以下错误。

Jboss EAP 5.1 Error.
16:29:20,695 INFO  [STDOUT] [DEBUG,Configuration] processing association property references
16:29:20,695 INFO  [STDOUT] [DEBUG,Configuration] processing foreign key constraints
16:29:20,798 INFO  [STDOUT] [INFO,DefaultListableBeanFactory] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@784f63b5: defining beans [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,requestController,memberInquiryServiceImpl,articleDao,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.validation.beanvalidation.LocalValidatorFactoryBean#0,org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#0,org.springframework.web.servlet.handler.MappedInterceptor#0,jspViewResolver,dataSource,requestTrackerConfig,sessionFactory,hibernateTransactionManager]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@79063635
16:29:20,834 INFO  [STDOUT] [ERROR,DispatcherServlet] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.uftwf.service.MemberInquiryService org.uftwf.controller.RequestController.memberInquiryService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'memberInquiryServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.uftwf.dao.MemberInquiryDao org.uftwf.service.MemberInquiryServiceImpl.memberInquiryDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'articleDao': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.hibernate.SessionFactory org.uftwf.dao.MemberInquiryDaoImpl.sessionFactory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]: Invocation of init method failed; nested exception is org.hibernate.AnnotationException: java.lang.NoSuchMethodException: org.hibernate.validator.ClassValidator.<init>(java.lang.Class, java.util.ResourceBundle, org.hibernate.validator.MessageInterpolator, java.util.Map, org.hibernate.annotations.common.reflection.ReflectionManager)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:286)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1055)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)

1 个答案:

答案 0 :(得分:1)

您的代码中似乎正在使用Hibernate Validator,它与JBoss中捆绑的Hibernate Validator冲突,并且它们的版本不匹配。

每个JavaEE容器都有一些属性可以让类加载器在容器库之前搜索项目类中的类。

我不知道标签(在JBoss特定的部署描述符中),只需在JBoss文档中查找。