RE: Hibernate 2nd Level query cache with Ignite
If it helps here is my dependency tree From: Tathagata Roy Sent: Thursday, August 27, 2020 8:35 AM To: user 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 mailto:e.zhuravlev...@gmail.com>> Sent: Wednesday, August 26, 2020 4:58 PM To: user mailto:user@ignite.apache.org>> 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 mailto:tathagata@raymondjames.com>>: 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 org.gridgain ignite-hibernate_5.3 8.7.23 org.hibernate hibernate-core @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 cc = new CacheConfiguration<>(); cc.setName(“Entity1”); cc.setCacheMode(CacheMode.REPLICATED); CacheConfiguration cc1 = new CacheConfiguration<>(); cc1.setName(“default-query-results-region”); cc1.setCacheMode(CacheMode.REPLICATED); CacheConfiguration 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=DwMFaQ=dqndFQAGz2cg7ln6ll1EqkpBLZllP_GH8-2iqGbTww0=UMGFmU3WkANZKXxHI2sMIQI1g3U2qKPxMiWWjmYk4LE=aUplBu9VdZkboQjxew1KTmPlCoAsCi0f9YHRcc7unIY=TfRyCsMCDPOcfYDdNRBwggxoY8goZ_q4XfJWDHY8JTI=> https://issues.apache.org/jira/browse/IGNITE-5789<https://urldefense.proofpoint.com/v2/url?u=https-3A__issues.apache.org_jira_browse_IGNITE-2D5789=DwMFaQ=dqndFQAGz2cg7ln6ll1EqkpBLZllP_GH8-2iqGbTww0=UMGFmU3WkANZKXxHI2sMIQI1g3U2qKPxMiWWjmYk4LE=aUplBu9VdZkboQjxew1KTmPlCoAsCi0f9YHRcc7unIY=GWBUi2BHTLsW0NvGljjEezzCbTzUbaJHvfTvnFfYqQc=> 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:
Hibernate 2nd Level query cache with Ignite
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 org.gridgain ignite-hibernate_5.3 8.7.23 org.hibernate hibernate-core @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 cc = new CacheConfiguration<>(); cc.setName("Entity1"); cc.setCacheMode(CacheMode.REPLICATED); CacheConfiguration cc1 = new CacheConfiguration<>(); cc1.setName("default-query-results-region"); cc1.setCacheMode(CacheMode.REPLICATED); CacheConfiguration 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://issues.apache.org/jira/browse/IGNITE-5789 Are there any other way without restaring the client application we can make it work?
RE: build failure for module hibernate 5.3
Thanks Evgenii for your response. Will look into gridgain version. Though not sure how it will behave with our existing ignite version 2.7.6 which is being used by other services which are already in production. So cannot change the entire version to gridgain version but hopefully gridgain version 8.7.23 is compatible with apache ignite 2.7.6 From: Evgenii Zhuravlev Sent: Tuesday, August 11, 2020 12:48 PM To: user Subject: Re: build failure for module hibernate 5.3 Hi, You can use it from this repository: https://gridgainsystems.com/nexus/content/repositories/external/org/gridgain/ignite-hibernate_5.3/<https://urldefense.proofpoint.com/v2/url?u=https-3A__gridgainsystems.com_nexus_content_repositories_external_org_gridgain_ignite-2Dhibernate-5F5.3_=DwMFaQ=dqndFQAGz2cg7ln6ll1EqkpBLZllP_GH8-2iqGbTww0=UMGFmU3WkANZKXxHI2sMIQI1g3U2qKPxMiWWjmYk4LE=k9Ll5Hgr5yLnhZ6lKNIaMigxs4Sw5p_U8RQOi0GVWgo=3I7-Kc9BmnTakFBeaT32WmLfYgZ_i8A951osF942pLY=> I believe there are no changes between these versions. Best Regards, Evgenii вт, 11 авг. 2020 г. в 10:53, Tathagata Roy mailto:tathagata@raymondjames.com>>: I am trying to do a poc on using apache ignite as hibernate 2nd level cache, following the example given https://apacheignite-mix.readme.io/v2.1/docs/hibernate-l2-cache#maven-configuration<https://urldefense.proofpoint.com/v2/url?u=https-3A__apacheignite-2Dmix.readme.io_v2.1_docs_hibernate-2Dl2-2Dcache-23maven-2Dconfiguration=DwMFaQ=dqndFQAGz2cg7ln6ll1EqkpBLZllP_GH8-2iqGbTww0=UMGFmU3WkANZKXxHI2sMIQI1g3U2qKPxMiWWjmYk4LE=k9Ll5Hgr5yLnhZ6lKNIaMigxs4Sw5p_U8RQOi0GVWgo=MkbdtukC-V_fJC9B_T8lnIcAd2dHECYoMpGxYVks1vw=>. Since we are using Hibernate 5.3.7 in Spring Boot, I need to use ignite-hibernate_5.3. Unfortunately this artifact id is not present in any public maven repository, hence as mentioned https://apacheignite.readme.io/docs/maven-setup#<https://urldefense.proofpoint.com/v2/url?u=https-3A__apacheignite.readme.io_docs_maven-2Dsetup-23=DwMFaQ=dqndFQAGz2cg7ln6ll1EqkpBLZllP_GH8-2iqGbTww0=UMGFmU3WkANZKXxHI2sMIQI1g3U2qKPxMiWWjmYk4LE=k9Ll5Hgr5yLnhZ6lKNIaMigxs4Sw5p_U8RQOi0GVWgo=fn6jIwYBP8pjIm-f_AAu2IuJx9oFrqnR1OHwKIozub8=> i need to build it locally and push it to my maven repository. When I am trying to build using the command mvn clean install -DskipTests -Plgpl -pl modules/hibernate -am I am getting the error The following artifacts could not be resolved: org.jacorb:jacorb:jar:2.2.3-jonas-patch-20071018, org.jacorb:jacorb-idl:jar:2.2.3-jonas-patch-20071018 I am not seeing any reference to the org.jacorb:jacorb , org.jacorb:jacorb-idl in any pom nor is it available in any public repository. This is happening for both 2.8.1 tag and also current SNAPSHOT What should be done to fix it, or is there some public repository where is can get ignite-hibernate_5.3?
build failure for module hibernate 5.3
I am trying to do a poc on using apache ignite as hibernate 2nd level cache, following the example given https://apacheignite-mix.readme.io/v2.1/docs/hibernate-l2-cache#maven-configuration. Since we are using Hibernate 5.3.7 in Spring Boot, I need to use ignite-hibernate_5.3. Unfortunately this artifact id is not present in any public maven repository, hence as mentioned https://apacheignite.readme.io/docs/maven-setup# i need to build it locally and push it to my maven repository. When I am trying to build using the command mvn clean install -DskipTests -Plgpl -pl modules/hibernate -am I am getting the error The following artifacts could not be resolved: org.jacorb:jacorb:jar:2.2.3-jonas-patch-20071018, org.jacorb:jacorb-idl:jar:2.2.3-jonas-patch-20071018 I am not seeing any reference to the org.jacorb:jacorb , org.jacorb:jacorb-idl in any pom nor is it available in any public repository. This is happening for both 2.8.1 tag and also current SNAPSHOT What should be done to fix it, or is there some public repository where is can get ignite-hibernate_5.3?