Java 迁移到jre 1.8时,SpringBean创建属性不可写异常

Java 迁移到jre 1.8时,SpringBean创建属性不可写异常,java,spring,hazelcast,Java,Spring,Hazelcast,我在创建HazelCast的bean时遇到以下异常。当我将已安装的JRE版本更改为JRE 1.8时,会发生这种情况。然而,在jre 1.6中,我们没有得到错误。是否对jre 8进行了任何禁止使用此类配置的更改 错误: Invalid property 'name' of bean class [com.hazelcast.config.TopicConfig]: Bean property 'name' is not writable or has an invalid setter metho

我在创建
HazelCast
的bean时遇到以下异常。当我将已安装的JRE版本更改为
JRE 1.8
时,会发生这种情况。然而,在jre 1.6中,我们没有得到错误。是否对jre 8进行了任何禁止使用此类配置的更改

错误:

Invalid property 'name' of bean class [com.hazelcast.config.TopicConfig]: Bean property 'name' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

在第三方类
TopicConfig
的属性
name
setter
中,我们可以看到它正在返回
TopicConfig
的实例,而不是
void
返回类型。对
Java8
是否有任何更改,禁止在setter返回某些内容的情况下配置此类类型

这不是答案,而是显示代码示例。

我尝试了以下内容(Java 1.8.0µ,Spring 4.3.0.RELEASE),它构建主题bean没有任何问题:

public static void main(String[] args) {
  ApplicationContext context = new ClassPathXmlApplicationContext("spring.xml");
  ITopic topic = context.getBean("topic", ITopic.class);
}
spring.xml

<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:hz="http://www.hazelcast.com/schema/spring"
   xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.hazelcast.com/schema/spring
    http://www.hazelcast.com/schema/spring/hazelcast-spring-3.10.xsd">

  <hz:hazelcast id="instance">
    <hz:config>
        <hz:network port="5701" port-auto-increment="false">
            <hz:join>
                <hz:multicast enabled="false"/>
                <hz:tcp-ip enabled="true">
                    <hz:interface>127.0.0.1</hz:interface>
                </hz:tcp-ip>
            </hz:join>
        </hz:network>

        <hz:topic name="my-topic" />
    </hz:config>
  </hz:hazelcast>

  <hz:topic id="topic" instance-ref="instance" name="my-topic" />

</beans>

127.0.0.1

您的Spring版本是什么?这看起来是一个已经解决的问题:我已经使用2.5.6和4.0.0两个不同的spring版本完成了上述更改。在这两种情况下,我得到了相同的错误。