0

我的 cache.xml 如下:

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gfe="http://www.springframework.org/schema/gemfire"
xmlns:p="http://www.springframework.org/schema/p" xmlns:util="http://www.springframework.org/schema/util"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:cache="http://www.springframework.org/schema/cache"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire-1.2.xsd
    http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
    http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">


<cache:annotation-driven />

<context:property-placeholder location="classpath:test-cache.properties"
    system-properties-mode="OVERRIDE" />

<util:properties id="gemfireProperties">
    <prop key="mcast-port">0</prop>
    <prop key="log-level">info</prop>
    <prop key="license-data-management">${license-data-management}</prop>
</util:properties>

<gfe:cache properties-ref="gemfireProperties" id="gemfireCache" />


<gfe:local-region id="pet-region">
    <gfe:cache-listener>
        <bean
            class="com.mycompany.cache.TestLoggingCacheListener" />
    </gfe:cache-listener>
</gfe:local-region>

我看到如下异常

schema_reference.4:未能读取架构文档“http://www.springframework.org/schema/gemfire/spring-gemfire-1.2.xsd”,因为 1) 找不到该文档;2) 文件无法读取;3) 文档的根元素不是 .

cvc-complex-type.2.4.c:匹配通配符是严格的,但找不到元素“gfe:cache”的声明。

我尝试更改为不同版本的 xsd,如下所示,但没有运气,我仍然看到问题。

http://www.springframework.org/schema/gemfire/spring-gemfire.xsd

http://www.springframework.org/schema/gemfire/spring-gemfire-1.1.xsd

http://www.springframework.org/schema/gemfire/spring-gemfire-1.2.xsd

经过以上所有尝试,当我更改为 1.1 版本时,我发现它现在引发了另一个问题

cvc-complex-type.2.4.c:匹配通配符是严格的,但找不到元素“gfe:local-region”的声明。

谁能帮我解决这个问题?

4

1 回答 1

1

我找到了解决方案。春季版本需要更改为 3.1.1,gemfire 需要更改为 6.6.2。我基本上是一个兼容性问题。

于 2012-12-19T17:06:07.417 回答