【问题标题】:Jboss EAP 6.2 startup error on adding <tx:annotation-driven/>Jboss EAP 6.2 在添加 <tx:annotation-driven/> 时启动错误
【发布时间】:2015-03-17 23:16:25
【问题描述】:

我们正在使用以下技术堆栈:

JbossEAP 6.2 + Spring 3.2.4 + RestEasy 2.3.7 + MyBatis 3.1.1 + MyBatis-Spring 1.2.0。

我们计划使用声明式事务,在添加 applicationContext.xml 文件后,我们得到以下错误:

请告诉我们如何解决它。

原因:org.springframework.beans.NotWritablePropertyException:bean 类 [org.springframework.transaction.interceptor.TransactionInterceptor] 的属性“transactionManagerBeanName”无效:Bean 属性“transactionManagerBeanName”不可写或设置方法无效。 setter 的参数类型是否与 getter 的返回类型匹配? 在 org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1042) [spring-beans-3.2.4.RELEASE.jar:3.2.4.RELEASE] 在 org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:902) [spring-beans-3.2.4.RELEASE.jar:3.2.4.RELEASE] 在 org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75) [spring-beans-3.2.4.RELEASE.jar:3.2.4.RELEASE] 在 org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:57) [spring-beans-3.2.4.RELEASE.jar:3.2.4.RELEASE] 在 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1420) [spring-beans-3.2.4.RELEASE.jar:3.2.4.RELEASE] ... 25 更多

注意:

我们使用以下监听器: org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap org.jboss.resteasy.plugins.spring.SpringContextLoaderListener

【问题讨论】:

  • 我们是否需要更新 jboss-deployment-structure.xml 以包含/排除任何库?

标签: mybatis spring-3 jboss-eap-6


【解决方案1】:

对不起,我错误地包含了 spring-dao,删除它并且可以正常工作!

【讨论】:

    猜你喜欢
    • 2014-10-25
    • 1970-01-01
    • 1970-01-01
    • 2017-01-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-07-28
    相关资源
    最近更新 更多