Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mukul4u2005 opened this issue Nov 28, 2018 · 1 comment

Comments

@mukul4u2005
Copy link

mukul4u2005 commented Nov 28, 2018

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

@jerrinot
Copy link
Owner

hi @mukul4u2005,

what is your Hazelcast version? I can see you are using 3.6 in your XSD. Your XML references this schema: <?xml version="1.0" encoding="UTF-8"?> <hazelcast-client xsi:schemaLocation="http://www.hazelcast.com/schema/client-config hazelcast-client-config-3.6.xsd"

I guess this schema does not have the override-java-serialization attribute. Can you try it with a new schema?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants