Reputation: 345
This file is not changed from 8 months and today we got error on hz:client property related to :
Multiple annotations found at this line:
- cvc-complex-type.2.4.c: The matching wildcard is strict,
but no declaration can be found for element 'hz:client'.
- schema_reference.4: Failed to read schema document
'https://hazelcast.com/schema/spring/hazelcast-spring-3.7.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>.
When i check this https://hazelcast.com/schema/spring/hazelcast-spring-3.7.xsd schema is there but elements inside is starting with xs tags. What can i do to fix this issue or rewrite client config?
<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.hazelcast.com/schema/spring https://hazelcast.com/schema/spring/hazelcast-spring-3.6.xsd
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-interation-2.0.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<bean id="test" class="org.test.impl.TestImpl">
<property name="hazelcastInstance" ref="hazelcastClient" />
</bean>
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>file:///home/hazelcast.properties</value>
</list>
</property>
</bean>
<hz:client id="hazelcastClient">
<hz:group name="${hazelcast.server.user}" password="${hazelcast.server.password}"/>
<hz:network connection-attempt-limit="1000"
connection-attempt-period="3000"
connection-timeout="1000"
redo-operation="true"
smart-routing="true">
<hz:member>${hazelcast.server.url}:${hazelcast.server.port}</hz:member>
</hz:network>
</hz:client>
</beans>
Upvotes: 2
Views: 1866
Reputation: 345
I changed the schema with this one:
<?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"
xmlns:task="http://www.springframework.org/schema/task"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:int="http://www.springframework.org/schema/integration"
xmlns:util="http://www.springframework.org/schema/util"
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.7.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd">
And now is working but i still doesn`t know why . Can someone explain me?
Upvotes: 1