将Hazelcast从2.5升级到3.1

将Hazelcast从2.5升级到3.1,hazelcast,Hazelcast,我用的是Hazelcast 2.5。最近,我们注意到生产服务器上的“明显死锁”问题。在某些地方,我们发现升级到Hazelcast 3.0或更高版本可以解决这个问题。现在,当我尝试升级到3.1时,ApplicationContext.xml中出现以下错误,它不再识别名称空间“hz” 升级到3.1之前的applicationContext-hazelcast.xml内容(删除了一些名称空间) 升级到3.1后的applicationContext-hazelcast.xml内容(删除了一些名称空间

我用的是Hazelcast 2.5。最近,我们注意到生产服务器上的“明显死锁”问题。在某些地方,我们发现升级到Hazelcast 3.0或更高版本可以解决这个问题。现在,当我尝试升级到3.1时,ApplicationContext.xml中出现以下错误,它不再识别名称空间“hz”

升级到3.1之前的applicationContext-hazelcast.xml内容(删除了一些名称空间)


升级到3.1后的applicationContext-hazelcast.xml内容(删除了一些名称空间)


错误消息:

Multiple annotations found at this line:
    - schema_reference.4: Failed to read schema document 'http://www.hazelcast.com/schema/spring/hazelcast-spring-3.1.xsd', because 1) could not find the document; 2) the document could not be read; 3) 
     the root element of the document is not <xsd:schema>.
    - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'hz:hazelcast'.
在此行找到多个批注:
-架构\u引用。4:未能读取架构文档'http://www.hazelcast.com/schema/spring/hazelcast-spring-3.1.xsd,因为1)找不到该文档;2) 文件无法读取;3) 
文档的根元素不是。
-cvc复杂类型.2.4.c:匹配的通配符是严格的,但找不到元素“hz:hazelcast”的声明。

我怎样才能做到这一点呢?

你说得对,看起来下载3.1 XSD时出现了问题。当我尝试使用hazelcast-spring-3.1时,我得到了一个htp403

Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: http://www.hazelcast.com/schema/spring/hazelcast-spring-3.1.xsd
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:637)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:189)
at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:582)
at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:685)
at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaDOMParser.parse(SchemaDOMParser.java:530)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:2175)
... 31 more
当我升级到使用hazelcast-spring-3.2时,一切都适合我,我可以通过springbean获得一个hazelcast实例。你能试着升级到3.2吗?如果对你有效的话,请告诉我。与此同时,我将在github.com/hazelcast上提出一个关于3.1版本的问题

Multiple annotations found at this line:
    - schema_reference.4: Failed to read schema document 'http://www.hazelcast.com/schema/spring/hazelcast-spring-3.1.xsd', because 1) could not find the document; 2) the document could not be read; 3) 
     the root element of the document is not <xsd:schema>.
    - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'hz:hazelcast'.
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: http://www.hazelcast.com/schema/spring/hazelcast-spring-3.1.xsd
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:637)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:189)
at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:582)
at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:685)
at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaDOMParser.parse(SchemaDOMParser.java:530)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:2175)
... 31 more