0

重新启动tomcat7时出现此错误:

15:07:00.314 [pool-2-thread-1] ERROR    
org.springframework.web.context.ContextLoader - Context initialization 
failed
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:  
Line 2 in XML document from ServletContext resource [/WEB-INF/spring-
configuration/ticketRegistry.xml] is invalid; nested exception is 
org.xml.sax.SAXParseException; systemId: http://hazelcast.com/schema
/spring/hazelcast-spring-3.1.xsd; lineNumber: 2; columnNumber: 35; 
s4s-elt-character: Non-whitespace characters are not allowed in schema 
elements other than 'xs:appinfo' and 'xs:documentation'. Saw '301 Moved 
Permanently'. 

错误所指文件的内容是:

   <?xml version="1.0" encoding="UTF-8"?>
   <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
                       https://hazelcast.com/schema/spring/hazelcast-spring-3.1.xsd">

<hz:hazelcast id="hazelcast">
    <hz:config>
        <hz:properties>
            <hz:property name="hazelcast.logging.type">slf4j</hz:property>
            <hz:property name="hazelcast.max.no.heartbeat.seconds">5</hz:property>
        </hz:properties>
        <hz:network port="5701" port-auto-increment="true">
            <hz:join>
                <hz:multicast enabled="false"/>
                <hz:tcp-ip enabled="true">
                    <hz:members>${hz.cluster.members}</hz:members>
                </hz:tcp-ip>
            </hz:join>
        </hz:network>
        <hz:map name="tickets"
                        max-idle-seconds="${tgt.timeToKillInSeconds:7200}"
                        max-size-policy="USED_HEAP_PERCENTAGE"
                        max-size="85"
                        eviction-policy="LRU"
                        eviction-percentage="10"/>
    </hz:config>
</hz:hazelcast>

<cas:hazelcast-ticket-registry hazelcast-instance="hazelcast"
                               tgt-entries-ttl-seconds="${tgt.maxTimeToLiveInSeconds:28800}"
                               st-entries-ttl-seconds="${st.timeToKillInSeconds:10}"/>

我尝试将此文件复制并粘贴到服务器并在本地调用它。

我试过添加行 xmlns= https://hazelcast.com/schema/spring/hazelcast-spring-3.1.xsd

它们都产生基本相同的根错误。

我该如何解决这个问题?

4

0 回答 0