Search code examples
warningshazelcast

WARNING: Name of the hazelcast schema location is incorrect, using default


The warning level logs we receive while starting our application are below,

[main()] starting... [OK] Sep 03, 2019 1:38:17 PM com.hazelcast.config.AbstractXmlConfigHelper WARNING: Name of the hazelcast schema location is incorrect, using default WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.hazelcast.internal.networking.nio.SelectorOptimizer (file:/home/abc/def/ghe/lib/thirdparty/hazelcast-3.12.jar) to field sun.nio.ch.SelectorImpl.selectedKeys WARNING: Please consider reporting this to the maintainers of com.hazelcast.internal.networking.nio.SelectorOptimizer WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release

How can ignore these WARNING logs or how can change log level INFO?

Or is there any way you know?


Solution

  • This warning would be thrown, if you have a version mismatch between the XSD version in your hazelcast.xml file and the version of hazelcast (hazelcast jar file) you use in your application.

    Recently, one of the tester complaint about same warning. While investigation I have found that her hazelcast.xml file has some different version of XSD as given below :

    <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 hazelcast-config- 
       3.6.xsd">
    

    Whereas in my machine, I was not getting that warning therefore, I just copy my namespace header as given below in her hazelcast.xml file and it fixed the problem for her.

    <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.12.xsd"> 
    

    So please make sure you use the same version of XSD url in your hazelcast.xml file as hazelcast jar version.