Skip to content

Exception in thread "main" com.hazelcast.config.InvalidConfigurationException: cvc-type.3.1.1: Element 'global-serializer' #27

@mukul4u2005

Description

@mukul4u2005

Nov 28, 2018 4:12:14 PM com.hazelcast.client.config.XmlClientConfigLocator
INFO: Loading 'hazelcast-client.xml' from classpath.
Nov 28, 2018 4:12:15 PM com.hazelcast.config.AbstractXmlConfigHelper
WARNING: Name of the hazelcast schema location incorrect using default
Exception in thread "main" com.hazelcast.config.InvalidConfigurationException: cvc-type.3.1.1: Element 'global-serializer' is a simple type, so it cannot have attributes, excepting those whose namespace name is identical to 'http://www.w3.org/2001/XMLSchema-instance' and whose [local name] is one of 'type', 'nil', 'schemaLocation' or 'noNamespaceSchemaLocation'. However, the attribute, 'override-java-serialization' was found.
at com.hazelcast.config.AbstractXmlConfigHelper.schemaValidation(AbstractXmlConfigHelper.java:189)
at com.hazelcast.client.config.XmlClientConfigBuilder.parseAndBuildConfig(XmlClientConfigBuilder.java:194)
at com.hazelcast.client.config.XmlClientConfigBuilder.build(XmlClientConfigBuilder.java:174)
at com.hazelcast.client.config.XmlClientConfigBuilder.build(XmlClientConfigBuilder.java:167)
at com.db.hz.subzero.HazelcastSubzeroClient.main(HazelcastSubzeroClient.java:16)

Hazelcast.xml:

`

<network>
    <join>
        <multicast enabled="false" />
        <tcp-ip enabled="true">
            <member>127.0.0.1:5701</member>
        </tcp-ip>
    </join>
</network>
<serialization>
<serializers>
    <global-serializer override-java-serialization="true">info.jerrinot.subzero.Serializer</global-serializer> 
`

Hazelcast-client.xml:

<?xml version="1.0" encoding="UTF-8"?> <hazelcast-client xsi:schemaLocation="http://www.hazelcast.com/schema/client-config hazelcast-client-config-3.6.xsd" xmlns="http://www.hazelcast.com/schema/client-config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <network> <cluster-members> <address>127.0.0.1:5701</address> </cluster-members> </network> <serialization> <serializers> <global-serializer override-java-serialization="true">info.jerrinot.subzero.Serializer</global-serializer> </serializers> </serialization> </hazelcast-client>

Its work fine if configure pro-grammatically, but fail with xml configuration . Hazelcast node is starting properly with this xml configuration, client is throwing error , please suggest ?

Thanks
Mukul

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions