If it helps here is my dependency tree


From: Tathagata Roy
Sent: Thursday, August 27, 2020 8:35 AM
To: user <[email protected]>
Subject: RE: Hibernate 2nd Level query cache with Ignite

Thanks for responding @Evgenii

Attaching the logs for both. There is no signification info in the ignite 
server. In application logs all logs after line 6629 is when application was 
able to reconnect with server after the server restart

From: Evgenii Zhuravlev 
<[email protected]<mailto:[email protected]>>
Sent: Wednesday, August 26, 2020 4:58 PM
To: user <[email protected]<mailto:[email protected]>>
Subject: Re: Hibernate 2nd Level query cache with Ignite

Hi,

Can you please share full logs from client and server nodes?

Thanks,
Evgenii

ср, 26 авг. 2020 г. в 14:26, Tathagata Roy 
<[email protected]<mailto:[email protected]>>:
Hi,

I am trying to do a POC on hibernate 2nd level cache with Apache Ignite. With 
this configuration I was able to make it work

spring.jpa.properties.hibernate.cache.use_second_level_cache=true
spring.jpa.properties.hibernate.cache.use_query_cache=true
spring.jpa.properties.hibernate.generate_statistics=false
spring.jpa.properties.hibernate.cache.region.factory_class=org.apache.ignite.cache.hibernate.HibernateRegionFactory
spring.jpa.properties.org.apache.ignite.hibernate.default_access_type=READ_ONLY



<dependency>
     <groupId>org.gridgain</groupId>
     <artifactId>ignite-hibernate_5.3</artifactId>
     <version>8.7.23</version>
     <exclusions>
         <exclusion>
             <groupId>org.hibernate</groupId>
             <artifactId>hibernate-core</artifactId>
         </exclusion>
     </exclusions>
 </dependency>



@Bean
@ConditionalOnMissingBean
public IgniteConfiguration igniteConfiguration(DiscoverySpi discoverySpi, 
CommunicationSpi communicationSpi) {
    IgniteConfiguration igniteConfiguration = new IgniteConfiguration();
    igniteConfiguration.setClientMode(clientMode);
    igniteConfiguration.setMetricsLogFrequency(0);

    igniteConfiguration.setGridLogger(new Slf4jLogger());

    igniteConfiguration.setDiscoverySpi(discoverySpi);
    igniteConfiguration.setCommunicationSpi(communicationSpi);
    igniteConfiguration.setFailureDetectionTimeout(failureDetectionTimeout);

    CacheConfiguration<String, ?> cc = new CacheConfiguration<>();
    cc.setName(“Entity1”);
    cc.setCacheMode(CacheMode.REPLICATED);



    CacheConfiguration<String, ?> cc1 = new CacheConfiguration<>();
    cc1.setName(“default-query-results-region”);
    cc1.setCacheMode(CacheMode.REPLICATED);



    CacheConfiguration<String, ?> cc2 = new CacheConfiguration<>();
    cc2.setName(“default-update-timestamps-region”);
    cc2.setCacheMode(CacheMode.REPLICATED);

    igniteConfiguration.setCacheConfiguration(cc);



    return igniteConfiguration;
}




I am testing this with external ignite node, but if the external ig node is 
restarted , I see the error when trying to access Entity1

"errorMessage": "class 
org.apache.ignite.internal.processors.cache.CacheStoppedException: Failed to 
perform cache operation (cache is stopped): Entity1; nested exception is 
java.lang.IllegalStateException: class 
org.apache.ignite.internal.processors.cache.CacheStoppedException: Failed to 
perform cache operation (cache is stopped): Entity1",

It looks like the issue is as reported here ,

https://stackoverflow.com/questions/46053089/ignite-cache-reconnection-issue-cache-is-stopped<https://urldefense.proofpoint.com/v2/url?u=https-3A__stackoverflow.com_questions_46053089_ignite-2Dcache-2Dreconnection-2Dissue-2Dcache-2Dis-2Dstopped&d=DwMFaQ&c=dqndFQAGz2cg7ln6ll1EqkpBLZllP_GH8-2iqGbTww0&r=UMGFmU3WkANZKXxHI2sMIQI1g3U2qKPxMiWWjmYk4LE&m=aUplBu9VdZkboQjxew1KTmPlCoAsCi0f9YHRcc7unIY&s=TfRyCsMCDPOcfYDdNRBwggxoY8goZ_q4XfJWDHY8JTI&e=>
https://issues.apache.org/jira/browse/IGNITE-5789<https://urldefense.proofpoint.com/v2/url?u=https-3A__issues.apache.org_jira_browse_IGNITE-2D5789&d=DwMFaQ&c=dqndFQAGz2cg7ln6ll1EqkpBLZllP_GH8-2iqGbTww0&r=UMGFmU3WkANZKXxHI2sMIQI1g3U2qKPxMiWWjmYk4LE&m=aUplBu9VdZkboQjxew1KTmPlCoAsCi0f9YHRcc7unIY&s=GWBUi2BHTLsW0NvGljjEezzCbTzUbaJHvfTvnFfYqQc&e=>


Are there any other way without restaring the client application we can make it 
work?
[INFO] com.rj.funcauth:entfunctionalauth:war:2.0.0-SNAPSHOT
[INFO] +- mypackage:rj-funcauth-api:jar:2.0.0-SNAPSHOT:compile
[INFO] |  +- mypackage:rjdf-web:jar:3.3-SNAPSHOT:compile
[INFO] |  |  +- mypackage:rjdf-cluster-messaging-api:jar:3.3-SNAPSHOT:compile
[INFO] |  |  +- org.springframework:spring-webmvc:jar:5.1.8.RELEASE:compile
[INFO] |  |  |  \- org.springframework:spring-web:jar:5.1.8.RELEASE:compile
[INFO] |  |  +- 
org.springframework.boot:spring-boot-starter-security:jar:2.1.6.RELEASE:compile
[INFO] |  |  |  +- 
org.springframework.security:spring-security-config:jar:5.1.5.RELEASE:compile
[INFO] |  |  |  \- 
org.springframework.security:spring-security-web:jar:5.1.5.RELEASE:compile
[INFO] |  |  +- 
org.springframework.ldap:spring-ldap-core:jar:2.3.2.RELEASE:compile
[INFO] |  |  +- 
org.springframework.security:spring-security-ldap:jar:5.1.5.RELEASE:compile
[INFO] |  |  |  \- 
org.springframework.security:spring-security-core:jar:5.1.5.RELEASE:compile
[INFO] |  |  +- org.slf4j:slf4j-api:jar:1.7.26:compile
[INFO] |  |  +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] |  |  +- com.google.guava:guava:jar:23.0:compile
[INFO] |  |  |  +- com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO] |  |  |  +- 
com.google.errorprone:error_prone_annotations:jar:2.0.18:compile
[INFO] |  |  |  +- com.google.j2objc:j2objc-annotations:jar:1.1:compile
[INFO] |  |  |  \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.14:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.9:compile
[INFO] |  |  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.9.9:compile
[INFO] |  |  +- org.aspectj:aspectjweaver:jar:1.9.4:compile
[INFO] |  |  +- org.aspectj:aspectjrt:jar:1.9.4:compile
[INFO] |  |  +- commons-lang:commons-lang:jar:2.6:compile
[INFO] |  |  +- org.apache.httpcomponents:httpclient:jar:4.5.9:compile
[INFO] |  |  |  +- org.apache.httpcomponents:httpcore:jar:4.4.11:compile
[INFO] |  |  |  \- commons-codec:commons-codec:jar:1.11:compile
[INFO] |  |  +- 
de.codecentric:spring-boot-admin-starter-client:jar:2.1.6:compile
[INFO] |  |  |  \- de.codecentric:spring-boot-admin-client:jar:2.1.6:compile
[INFO] |  |  +- io.springfox:springfox-swagger2:jar:2.9.2:compile
[INFO] |  |  |  +- io.swagger:swagger-annotations:jar:1.5.20:compile
[INFO] |  |  |  +- io.swagger:swagger-models:jar:1.5.20:compile
[INFO] |  |  |  +- io.springfox:springfox-spi:jar:2.9.2:compile
[INFO] |  |  |  |  \- io.springfox:springfox-core:jar:2.9.2:compile
[INFO] |  |  |  +- io.springfox:springfox-schema:jar:2.9.2:compile
[INFO] |  |  |  +- io.springfox:springfox-swagger-common:jar:2.9.2:compile
[INFO] |  |  |  +- io.springfox:springfox-spring-web:jar:2.9.2:compile
[INFO] |  |  |  +- com.fasterxml:classmate:jar:1.4.0:compile
[INFO] |  |  |  +- 
org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] |  |  |  +- 
org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
[INFO] |  |  |  \- org.mapstruct:mapstruct:jar:1.2.0.Final:compile
[INFO] |  |  +- io.springfox:springfox-swagger-ui:jar:2.9.2:compile
[INFO] |  |  \- com.unboundid:unboundid-ldapsdk:jar:4.0.11:compile
[INFO] |  \- ma.glasnost.orika:orika-core:jar:1.5.2:compile
[INFO] |     +- org.javassist:javassist:jar:3.22.0-GA:compile
[INFO] |     +- com.thoughtworks.paranamer:paranamer:jar:2.8:compile
[INFO] |     +- 
com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:jar:1.4.2:compile
[INFO] |     \- com.carrotsearch:java-sizeof:jar:0.0.4:compile
[INFO] +- mypackage:rj-funcauth-common:jar:2.0.0-SNAPSHOT:compile
[INFO] |  +- mypackage:rjdf-core:jar:3.3-SNAPSHOT:compile
[INFO] |  |  +- 
org.springframework.boot:spring-boot-starter-web:jar:2.1.6.RELEASE:compile
[INFO] |  |  |  +- 
org.springframework.boot:spring-boot-starter-json:jar:2.1.6.RELEASE:compile
[INFO] |  |  |  |  +- 
com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.9:compile
[INFO] |  |  |  |  +- 
com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.9:compile
[INFO] |  |  |  |  \- 
com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.9:compile
[INFO] |  |  |  \- 
org.hibernate.validator:hibernate-validator:jar:6.0.17.Final:compile
[INFO] |  |  +- 
org.springframework.boot:spring-boot-starter-actuator:jar:2.1.6.RELEASE:compile
[INFO] |  |  |  +- 
org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.1.6.RELEASE:compile
[INFO] |  |  |  |  \- 
org.springframework.boot:spring-boot-actuator:jar:2.1.6.RELEASE:compile
[INFO] |  |  |  \- io.micrometer:micrometer-core:jar:1.1.5:compile
[INFO] |  |  |     +- org.hdrhistogram:HdrHistogram:jar:2.1.9:compile
[INFO] |  |  |     \- org.latencyutils:LatencyUtils:jar:2.0.3:compile
[INFO] |  |  +- org.jolokia:jolokia-core:jar:1.6.1:compile
[INFO] |  |  |  \- com.googlecode.json-simple:json-simple:jar:1.1.1:compile
[INFO] |  |  +- org.reflections:reflections:jar:0.9.11:compile
[INFO] |  |  +- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] |  |  +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] |  |  +- 
com.github.ulisesbocchio:jasypt-spring-boot-starter:jar:1.17:compile
[INFO] |  |  |  \- com.github.ulisesbocchio:jasypt-spring-boot:jar:1.17:compile
[INFO] |  |  +- ch.qos.logback.contrib:logback-jackson:jar:0.1.5:compile
[INFO] |  |  |  \- ch.qos.logback.contrib:logback-json-core:jar:0.1.5:compile
[INFO] |  |  \- ch.qos.logback.contrib:logback-json-classic:jar:0.1.5:compile
[INFO] |  \- org.projectlombok:lombok:jar:1.18.2:compile
[INFO] +- mypackage:rj-funcauth-domain:jar:2.0.0-SNAPSHOT:compile
[INFO] |  \- mypackage:rjdf-caching-ignite:jar:3.3-SNAPSHOT:compile
[INFO] |     +- mypackage:rjdf-caching-commons:jar:3.3-SNAPSHOT:compile
[INFO] |     \- 
org.springframework.boot:spring-boot-starter-cache:jar:2.1.6.RELEASE:compile
[INFO] |        \- 
org.springframework:spring-context-support:jar:5.1.8.RELEASE:compile
[INFO] +- mypackage:rj-funcauth-manager:jar:2.0.0-SNAPSHOT:compile
[INFO] |  \- org.gridgain:ignite-spring-data:jar:8.7.23:compile
[INFO] |     +- org.gridgain:ignite-indexing:jar:8.7.23:compile
[INFO] |     |  +- org.apache.lucene:lucene-core:jar:7.4.0:compile
[INFO] |     |  +- org.apache.lucene:lucene-analyzers-common:jar:7.4.0:compile
[INFO] |     |  \- org.apache.lucene:lucene-queryparser:jar:7.4.0:compile
[INFO] |     |     +- org.apache.lucene:lucene-queries:jar:7.4.0:compile
[INFO] |     |     \- org.apache.lucene:lucene-sandbox:jar:7.4.0:compile
[INFO] |     \- 
org.springframework.data:spring-data-commons:jar:2.1.9.RELEASE:compile
[INFO] +- mypackage:rj-funcauth-ri:jar:2.0.0-SNAPSHOT:compile
[INFO] |  +- mypackage:rjdf-data:jar:3.3-SNAPSHOT:compile
[INFO] |  |  +- javax.inject:javax.inject:jar:1:compile
[INFO] |  |  +- org.springframework:spring-context:jar:5.1.8.RELEASE:compile
[INFO] |  |  +- org.jasypt:jasypt:jar:1.9.2:compile
[INFO] |  |  +- com.sun.xml.bind:jaxb-impl:jar:2.2.11:compile
[INFO] |  |  +- com.sun.xml.bind:jaxb-core:jar:2.2.11:compile
[INFO] |  |  \- 
org.springframework.boot:spring-boot-starter-jdbc:jar:2.1.1.RELEASE:compile
[INFO] |  +- 
org.springframework.boot:spring-boot-starter-data-jpa:jar:2.1.1.RELEASE:compile
[INFO] |  |  +- 
org.springframework.boot:spring-boot-starter-aop:jar:2.1.6.RELEASE:compile
[INFO] |  |  +- javax.transaction:javax.transaction-api:jar:1.3:compile
[INFO] |  |  +- org.hibernate:hibernate-core:jar:5.3.10.Final:compile
[INFO] |  |  |  +- javax.persistence:javax.persistence-api:jar:2.2:compile
[INFO] |  |  |  +- antlr:antlr:jar:2.7.7:compile
[INFO] |  |  |  +- org.jboss:jandex:jar:2.0.5.Final:compile
[INFO] |  |  |  +- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] |  |  |  +- org.dom4j:dom4j:jar:2.1.1:compile
[INFO] |  |  |  \- 
org.hibernate.common:hibernate-commons-annotations:jar:5.0.4.Final:compile
[INFO] |  |  +- 
org.springframework.data:spring-data-jpa:jar:2.1.9.RELEASE:compile
[INFO] |  |  |  \- org.springframework:spring-orm:jar:5.1.8.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-aspects:jar:5.1.8.RELEASE:compile
[INFO] |  +- com.zaxxer:HikariCP:jar:3.2.0:compile
[INFO] |  +- org.gridgain:ignite-hibernate_5.3:jar:8.7.23:compile
[INFO] |  |  \- org.gridgain:ignite-hibernate-core:jar:8.7.23:compile
[INFO] |  +- org.gridgain:ignite-core:jar:8.7.23:compile
[INFO] |  |  +- javax.cache:cache-api:jar:1.1.1:compile
[INFO] |  |  +- org.jetbrains:annotations:jar:16.0.3:compile
[INFO] |  |  \- org.gridgain:ignite-shmem:jar:8.7.3:compile
[INFO] |  +- org.gridgain:ignite-slf4j:jar:8.7.23:compile
[INFO] |  +- org.gridgain:ignite-spring:jar:8.7.23:compile
[INFO] |  |  +- org.gridgain:ignite-indexing:jar:8.7.23:compile
[INFO] |  |  +- org.springframework:spring-core:jar:5.1.8.RELEASE:compile
[INFO] |  |  |  \- org.springframework:spring-jcl:jar:5.1.8.RELEASE:compile
[INFO] |  |  +- org.springframework:spring-aop:jar:5.1.8.RELEASE:compile
[INFO] |  |  +- org.springframework:spring-beans:jar:5.1.8.RELEASE:compile
[INFO] |  |  +- org.springframework:spring-expression:jar:5.1.8.RELEASE:compile
[INFO] |  |  +- org.springframework:spring-tx:jar:5.1.8.RELEASE:compile
[INFO] |  |  +- org.springframework:spring-jdbc:jar:5.1.8.RELEASE:compile
[INFO] |  |  \- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] |  \- org.gridgain:ignite-h2:jar:8.7.23:compile
[INFO] |     \- org.locationtech.jts:jts-core:jar:1.15.0:compile
[INFO] +- javax.xml.ws:jaxws-api:jar:2.2.1:compile
[INFO] |  +- javax.xml.bind:jaxb-api:jar:2.2:compile
[INFO] |  |  +- javax.xml.stream:stax-api:jar:1.0-2:compile
[INFO] |  |  \- javax.activation:activation:jar:1.1:compile
[INFO] |  +- javax.xml.soap:saaj-api:jar:1.3.1:compile
[INFO] |  +- javax.annotation:jsr250-api:jar:1.0:compile
[INFO] |  \- javax.jws:jsr181-api:jar:1.0.0.MR1-redhat-8:compile
[INFO] +- javax.servlet:javax.servlet-api:jar:4.0.1:provided
[INFO] +- 
org.springframework.boot:spring-boot-devtools:jar:2.1.6.RELEASE:runtime 
(optional)
[INFO] |  +- org.springframework.boot:spring-boot:jar:2.1.6.RELEASE:compile
[INFO] |  \- 
org.springframework.boot:spring-boot-autoconfigure:jar:2.1.6.RELEASE:compile
[INFO] +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- com.oracle:ojdbc8:jar:12.2.0.1:compile
[INFO] +- mypackage:rjdf-test:pom:3.3-SNAPSHOT:test
[INFO] |  +- junit:junit:jar:4.12:test
[INFO] |  +- org.jmockit:jmockit:jar:1.12:test
[INFO] |  +- org.mockito:mockito-core:jar:2.23.4:test
[INFO] |  |  +- net.bytebuddy:byte-buddy:jar:1.9.13:compile
[INFO] |  |  +- net.bytebuddy:byte-buddy-agent:jar:1.9.13:test
[INFO] |  |  \- org.objenesis:objenesis:jar:2.6:test
[INFO] |  +- org.springframework:spring-test:jar:5.1.8.RELEASE:test
[INFO] |  +- 
org.springframework.boot:spring-boot-starter-test:jar:2.1.6.RELEASE:test
[INFO] |  |  +- 
org.springframework.boot:spring-boot-starter:jar:2.1.6.RELEASE:compile
[INFO] |  |  |  +- 
org.springframework.boot:spring-boot-starter-logging:jar:2.1.6.RELEASE:compile
[INFO] |  |  |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.11.2:compile
[INFO] |  |  |  |  |  \- org.apache.logging.log4j:log4j-api:jar:2.11.2:compile
[INFO] |  |  |  |  \- org.slf4j:jul-to-slf4j:jar:1.7.26:compile
[INFO] |  |  |  +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] |  |  |  \- org.yaml:snakeyaml:jar:1.23:runtime
[INFO] |  |  +- org.springframework.boot:spring-boot-test:jar:2.1.6.RELEASE:test
[INFO] |  |  +- 
org.springframework.boot:spring-boot-test-autoconfigure:jar:2.1.6.RELEASE:test
[INFO] |  |  +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] |  |  |  \- net.minidev:json-smart:jar:2.3:test
[INFO] |  |  |     \- net.minidev:accessors-smart:jar:1.2:test
[INFO] |  |  |        \- org.ow2.asm:asm:jar:5.0.4:test
[INFO] |  |  +- org.assertj:assertj-core:jar:3.11.1:test
[INFO] |  |  +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO] |  |  |  \- 
com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] |  |  \- org.xmlunit:xmlunit-core:jar:2.6.2:test
[INFO] |  \- org.codehaus.janino:janino:jar:3.0.8:compile
[INFO] |     \- org.codehaus.janino:commons-compiler:jar:3.0.8:compile
[INFO] \- 
org.springframework.boot:spring-boot-starter-undertow:jar:2.1.6.RELEASE:provided
[INFO]    +- io.undertow:undertow-core:jar:2.0.21.Final:provided
[INFO]    |  +- org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile
[INFO]    |  +- org.jboss.xnio:xnio-api:jar:3.3.8.Final:provided
[INFO]    |  \- org.jboss.xnio:xnio-nio:jar:3.3.8.Final:provided
[INFO]    +- io.undertow:undertow-servlet:jar:2.0.21.Final:provided
[INFO]    |  \- 
org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec:jar:1.0.2.Final:provided
[INFO]    +- io.undertow:undertow-websockets-jsr:jar:2.0.21.Final:provided
[INFO]    |  \- 
org.jboss.spec.javax.websocket:jboss-websocket-api_1.1_spec:jar:1.1.4.Final:provided
[INFO]    \- org.glassfish:javax.el:jar:3.0.0:provided

Reply via email to