【问题标题】:Anypoint Mule Studio 3.5: org.springframework.beans.NotWritablePropertyException while using Proxy serviceAnypoint Mule Studio 3.5:使用代理服务时出现 org.springframework.beans.NotWritablePropertyException
【发布时间】:2014-07-10 11:28:32
【问题描述】:

我的 mule.xml:

<?xml version="1.0" encoding="UTF-8"?>
<mule namespaces..>
    <flow name="smsFlow1" doc:name="smsFlow1">
        <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8084" path="send" doc:name="HTTP"/>
        <cxf:proxy-service payload="body" doc:name="CXF" serviceClass="com.sample.service.doService_Service" soapVersion="1.2"/>
        <logger message="#[payload]" level="INFO" doc:name="Logger"/>
    </flow>
</mule>

错误:

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'serviceClass' of bean class [org.mule.module.cxf.config.ProxyServiceFactoryBean]: Bean property 'serviceClass' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1427)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1132)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:271)
    ... 45 more
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'serviceClass' of bean class [org.mule.module.cxf.config.ProxyServiceFactoryBean]: Bean property 'serviceClass' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
    at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1042)
    at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:902)
    at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75)
    at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:57)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1424)
    ... 49 more

我在 mule 中创建代理服务时始终收到此错误,其中 wsdl 从类路径中引用

【问题讨论】:

  • 请注意,即使在 3.9.0 中也存在此问题。

标签: java spring mule-studio mule-component


【解决方案1】:

您似乎没有正确的 spring 导入。如果您不确定正确的命名空间和位置,只需从流程中删除 cxf 组件,然后重新添加即可。通过这样做,它将添加/导入正确的架构。

希望这会有所帮助。

【讨论】:

    【解决方案2】:

    这个问题似乎是由在proxy-service 模式下使用CXF 处理器引起的。显然这种模式不能使用/设置任何 Service Class 模型。因此,只需将 Service Class 字段留空即可。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-08-20
      • 1970-01-01
      • 1970-01-01
      • 2016-07-29
      • 2018-04-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多