org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pom' defined in class path resource [ApplicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'pomTxManager' of bean class [org.springframework.transaction.interceptor.TransactionProxyFactoryBean]: Bean property 'pomTxManager' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'pomTxManager' of bean class [org.springframework.transaction.interceptor.TransactionProxyFactoryBean]: Bean property 'pomTxManager' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
Spring 实现。提示以上错误。'pomTxManager' 为事物管理器id。pom为业务代理bean。
请教高手

解决方案 »

  1.   

    应该在bean里定义pomTxManager的setter方法吧
      

  2.   

    你可以到spring API里面去查查BeanCreationException这个错误。
      

  3.   

    Does the parameter type of the setter match the return type of the getter? 
    pom、'pomTxManager'去看看这个属性的get和set方法的返回值跟你定义的是否一致?
      

  4.   

    ApplicationContext中有没有配置pom,配置的pom是否与引用处的Bean类的类型一致.
      

  5.   

    ApplicationContext中你看看你的pom bean里面的属性pomTxManager有没有get和set方法