ignite启动报异常

版权声明: https://blog.csdn.net/hzy52013/article/details/82831103

异常:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'getIgnite' defined in class path resource [com/hzy/config/IgniteConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ignite.Ignite]: Factory method 'getIgnite' threw exception; nested exception is class org.apache.ignite.IgniteException: Cache mode mismatch (fix cache mode in cache configuration or set -DIGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK=true system property) [cacheName=hzy, localCacheMode=PARTITIONED, remoteCacheMode=REPLICATED, rmtNodeId=575ec8a8-e7bc-4c9f-90b4-e77195040fbd]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]

    at com.hzy.app_8181.main(app_8181.java:10) [classes/:na]

原因:抛出的异常说的很明确,本地缓存使用的分区模式,远程缓存使用的是复制模式。由于这里启动的是客户端,连接远程的服务端,所以缓存模式必须保持一致。

解决方案:将远程的缓存模式与本地的缓存模式保持一致,

猜你喜欢

转载自blog.csdn.net/hzy52013/article/details/82831103