org.hibernate.cache.CacheException: No instance with name [hcinstance] could be found.

399 views
Skip to first unread message

Anil Kumar

unread,
Feb 3, 2021, 3:35:53 AM2/3/21
to Hazelcast
Hello,

I recently upgraded my jars from hazelcast-3.6.2 to hazelcast-3.12.11. with this configuration i'm getting the org.hibernate.cache.CacheException: No instance with name [hcinstance] could be found.

I have given the instance_name as hcinstace in my hibernate-cfg.xml.


Thanks
Anil

enes....@hazelcast.com

unread,
Feb 3, 2021, 7:53:30 AM2/3/21
to Hazelcast
Hi,

By configuring instance_name property in hibernate-cfg, you make Hazelcast L2C not attempt to create a new instance but use an existing one created within your application. So there must be a Hazelcast instance created before Hibernate attempts to create second level cache. If this is not your intent and you just want to create a new instance and give it a custom name, then remove this property from the hibernate configuration and set instance-name in Hazelcast configuration. 

Anil Kumar

unread,
Feb 3, 2021, 9:00:17 AM2/3/21
to haze...@googlegroups.com
Hello,

If i remove the <property name="hibernate.cache.hazelcast.instance_name">hcinstance</property> tag from the hibernate.cfg.xml file and added <instance-name>hcinstace</instace-name> in the hazelcast.xml file i'm getting Caused by: com.hazelcast.core.DuplicateInstanceNameException: HazelcastInstance with name 'hcinstance' already exists! error.

By seeing the above error I'm thinking there will be a hcinstace already created. So when i say please use the same instance in hibernate-cfg.xml i'm getting again  org.hibernate.cache.CacheException: No instance with name [hcinstance] could be found.

Please help me out.

Thanks
Anil

This message contains confidential information and is intended only for the individuals named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version. -Hazelcast

--
You received this message because you are subscribed to a topic in the Google Groups "Hazelcast" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hazelcast/FunBgtHweJc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hazelcast+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/f73241f7-e97d-48ee-ba5b-e1b410669615n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages