gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-04 08:21:20 25 4
gpt4 key购买 nike

Spring 3.0.5 Web 应用程序在 tomcat 中运行良好...不会在 JBoss EAP 5.1 中启动

我有一个使用 Eclipse Spring 3.05 制作的非常简单的 Web 应用程序,它在 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)

最佳答案

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

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

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

关于java - Spring 3.0.5 Webapp 在 tomcat 中运行良好...不会在 JBoss EAP 5.1 中启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9490167/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com