Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ignite won't start with spring-boot 2.0.5 - h2 property NESTED_JOINS doesn't exist

I am using Ignite 2.6 and It is running well as a standalone Java application but it is not working with spring boot. I am getting this error

  [20:44:18,520][SEVERE][exchange-worker-#37][GridDhtPartitionsExchangeFuture] Failed to reinitialize local partitions (preloading will be stopped): GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=8, minorTopVer=0], discoEvt=DiscoveryEvent [evtNode=TcpDiscoveryNode [id=ee3f7ea5-e448-4659-8148-232db27efde6, addrs=[0:0:0:0:0:0:0:1, 127.0.0.1, 192.168.0.52, 2406:7400:5c:13e0:44bc:65c7:241c:3804, 2406:7400:5c:13e0:d1cb:e1a9:15c5:c8ae], sockAddrs=[/2406:7400:5c:13e0:44bc:65c7:241c:3804:0, /0:0:0:0:0:0:0:1:0, /127.0.0.1:0, /192.168.0.52:0, /2406:7400:5c:13e0:d1cb:e1a9:15c5:c8ae:0], discPort=0, order=8, intOrder=0, lastExchangeTime=1538666050349, loc=true, ver=2.6.0#20180710-sha1:669feacc, isClient=true], topVer=8, nodeId8=ee3f7ea5, msg=null, type=NODE_JOINED, tstamp=1538666058292], nodeId=ee3f7ea5, evt=NODE_JOINED]
class org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to initialize DB connection: jdbc:h2:mem:ee3f7ea5-e448-4659-8148-232db27efde6;LOCK_MODE=3;MULTI_THREADED=1;DB_CLOSE_ON_EXIT=FALSE;DEFAULT_LOCK_TIMEOUT=10000;FUNCTIONS_IN_SCHEMA=true;OPTIMIZE_REUSE_RESULTS=0;QUERY_CACHE_SIZE=0;RECOMPILE_ALWAYS=1;MAX_OPERATION_MEMORY=0;NESTED_JOINS=0;BATCH_JOINS=1;ROW_FACTORY="org.apache.ignite.internal.processors.query.h2.opt.GridH2PlainRowFactory";DEFAULT_TABLE_ENGINE=org.apache.ignite.internal.processors.query.h2.opt.GridH2DefaultTableEngine
    at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$1.initialValue(IgniteH2Indexing.java:330)
    at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$1.initialValue(IgniteH2Indexing.java:298)
    at java.lang.ThreadLocal.setInitialValue(Unknown Source)
    at java.lang.ThreadLocal.get(Unknown Source)
    at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$1.get(IgniteH2Indexing.java:300)
    at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$1.get(IgniteH2Indexing.java:298)
    at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.connectionForThread(IgniteH2Indexing.java:524)
    at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeStatement(IgniteH2Indexing.java:592)
    at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.createSchema(IgniteH2Indexing.java:561)
    at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.registerCache(IgniteH2Indexing.java:2760)
    at org.apache.ignite.internal.processors.query.GridQueryProcessor.registerCache0(GridQueryProcessor.java:1594)
    at org.apache.ignite.internal.processors.query.GridQueryProcessor.onCacheStart0(GridQueryProcessor.java:799)
    at org.apache.ignite.internal.processors.query.GridQueryProcessor.onCacheStart(GridQueryProcessor.java:860)
    at org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1212)
    at org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1964)
    at org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCachesOnLocalJoin(GridCacheProcessor.java:1830)
    at org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.initCachesOnLocalJoin(GridDhtPartitionsExchangeFuture.java:792)
    at org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:674)
    at org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2419)
    at org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2299)
    at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.h2.jdbc.JdbcSQLException: Unsupported connection setting "NESTED_JOINS" [90113-197]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:357)
    at org.h2.message.DbException.get(DbException.java:179)
    at org.h2.message.DbException.get(DbException.java:155)
    at org.h2.engine.ConnectionInfo.readSettingsFromURL(ConnectionInfo.java:268)
    at org.h2.engine.ConnectionInfo.<init>(ConnectionInfo.java:76)
    at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:103)
    at org.h2.Driver.connect(Driver.java:69)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$1.initialValue(IgniteH2Indexing.java:327)
    ... 21 more

Does Ignite 2.6 have support for h2 DB(version 1.4.197) which is there by default in spring-boot 2

like image 414
Sandeep Patel Avatar asked Oct 04 '18 17:10

Sandeep Patel


2 Answers

This is a known issue:

https://issues.apache.org/jira/browse/IGNITE-8197

Spring Boot parent POM files specify h2.version=1.4.197. We've been able to work around it by forcefully downgrading H2 in our gradle files (we're using Spring Boot 2.0.2, fwiw):

ext['h2.version'] = '1.4.196'
like image 197
Mike Avatar answered Sep 24 '22 04:09

Mike


try this:

<properties>
    <h2.version>1.4.197</h2.version>
</properties>

put this in the pom file. the default from springboot 2.1.6.RELEASE is 1.4.199 which will cause problems.

like image 20
truthseeker Avatar answered Sep 24 '22 04:09

truthseeker