Hello,
I am interested in the composition of configuration elemens.
I use the <import resource= ... statement to compose my configuration as described in Mastering Hazelcast.
I follow straightly the example in Mastering Hazelcast applying the tip (You need to use the <import/> element on the top level of the XML hierarchy):
File hazelcast.xml
<hazelcast xmlns="
http://www.hazelcast.com/schema/config"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.hazelcast.com/schema/config http://www.hazelcast.com/schema/config/hazelcast-config-3.9.xsd">
<import resource="development-group-config.xml" />
<import resource="development-network-config.xml" />
<import resource="development-imap-config.xml" />
</hazelcast>
File development-group-config.xml
<hazelcast>
<group>
<name>dev</name>
<password>dev-pass</password>
</group>
</hazelcast>
File development-network-config.xml
<hazelcast>
<network>
<port auto-increment="true" port-count="100">5701</port>
<join>
<multicast enabled="true">
<multicast-group>224.2.2.3</multicast-group>
<multicast-port>54327</multicast-port>
</multicast>
</join>
</network>
</hazelcast>
File development-imap-config.xml
<map name="activities">
<in-memory-format>BINARY</in-memory-format>
<statistics-enabled>true</statistics-enabled>
<optimize-queries>true</optimize-queries>
</map>
Early in the parsing process the following exception is thrown:
Mai 08, 2018 11:37:56 PM com.hazelcast.config.XmlConfigLocator
INFORMATION: Loading 'hazelcast.xml' from classpath.
Exception in thread "main" com.hazelcast.config.InvalidConfigurationException: cvc-complex-type.2.4.a: invalid content was found starting with element 'group' gefunden. '{"
http://www.hazelcast.com/schema/config":import, "
http://www.hazelcast.com/schema/config":group, "
http://www.hazelcast.com/schema/config":license-key, "
http://www.hazelcast.com/schema/config":instance-name, "
http://www.hazelcast.com/schema/config":management-center, "
http://www.hazelcast.com/schema/config":properties, "
http://www.hazelcast.com/schema/config":wan-replication, "
http://www.hazelcast.com/schema/config":network, "
http://www.hazelcast.com/schema/config":partition-group, "
http://www.hazelcast.com/schema/config":executor-service, "
http://www.hazelcast.com/schema/config":durable-executor-service, "
http://www.hazelcast.com/schema/config":scheduled-executor-service, "
http://www.hazelcast.com/schema/config":event-journal, "
http://www.hazelcast.com/schema/config":queue, "
http://www.hazelcast.com/schema/config":map, "
http://www.hazelcast.com/schema/config":multimap, "
http://www.hazelcast.com/schema/config":replicatedmap, "
http://www.hazelcast.com/schema/config":cache, "
http://www.hazelcast.com/schema/config":list, "
http://www.hazelcast.com/schema/config":set, "
http://www.hazelcast.com/schema/config":topic, "
http://www.hazelcast.com/schema/config":reliable-topic, "
http://www.hazelcast.com/schema/config":jobtracker, "
http://www.hazelcast.com/schema/config":semaphore, "
http://www.hazelcast.com/schema/config":lock, "
http://www.hazelcast.com/schema/config":ringbuffer, "
http://www.hazelcast.com/schema/config":listeners, "
http://www.hazelcast.com/schema/config":serialization, "
http://www.hazelcast.com/schema/config":native-memory, "
http://www.hazelcast.com/schema/config":services, "
http://www.hazelcast.com/schema/config":security, "
http://www.hazelcast.com/schema/config":member-attributes, "
http://www.hazelcast.com/schema/config":quorum, "
http://www.hazelcast.com/schema/config":lite-member, "
http://www.hazelcast.com/schema/config":hot-restart-persistence, "
http://www.hazelcast.com/schema/config":user-code-deployment, "
http://www.hazelcast.com/schema/config":cardinality-estimator}' wird erwartet.
at com.hazelcast.config.AbstractXmlConfigHelper.schemaValidation(AbstractXmlConfigHelper.java:189)
at com.hazelcast.config.XmlConfigBuilder.parseAndBuildConfig(XmlConfigBuilder.java:235)
at com.hazelcast.config.XmlConfigBuilder.build(XmlConfigBuilder.java:216)
at com.hazelcast.config.XmlConfigBuilder.build(XmlConfigBuilder.java:209)
at com.hazelcast.instance.HazelcastInstanceFactory.newHazelcastInstance(HazelcastInstanceFactory.java:121)
at com.hazelcast.core.Hazelcast.newHazelcastInstance(Hazelcast.java:92)
at hazelcastPlay.TestHazel.main(TestHazel.java:34)
Does anybody know how to compose my configuration? I would be glad to get some help.
Desiree