{"action":"created","issue":{"url":"https://api.github.com/repos/hazelcast/hazelcast/issues/4374","labels_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/4374/labels{/name}","comments_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/4374/comments","events_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/4374/events","html_url":"https://github.com/hazelcast/hazelcast/issues/4374","id":53238209,"number":4374,"title":"Hazelcast instance name with Hibernate still creates multiple instances","user":{"login":"chandreshp","id":1607455,"avatar_url":"https://avatars.githubusercontent.com/u/1607455?v=3","gravatar_id":"","url":"https://api.github.com/users/chandreshp","html_url":"https://github.com/chandreshp","followers_url":"https://api.github.com/users/chandreshp/followers","following_url":"https://api.github.com/users/chandreshp/following{/other_user}","gists_url":"https://api.github.com/users/chandreshp/gists{/gist_id}","starred_url":"https://api.github.com/users/chandreshp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chandreshp/subscriptions","organizations_url":"https://api.github.com/users/chandreshp/orgs","repos_url":"https://api.github.com/users/chandreshp/repos","events_url":"https://api.github.com/users/chandreshp/events{/privacy}","received_events_url":"https://api.github.com/users/chandreshp/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hazelcast/hazelcast/labels/Team:%20Integration","name":"Team: Integration","color":"fbca04"},{"url":"https://api.github.com/repos/hazelcast/hazelcast/labels/Type:%20Defect","name":"Type: Defect","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/hazelcast/hazelcast/milestones/55","labels_url":"https://api.github.com/repos/hazelcast/hazelcast/milestones/55/labels","id":819785,"number":55,"title":"3.5","description":null,"creator":{"login":"sancar","id":570462,"avatar_url":"https://avatars.githubusercontent.com/u/570462?v=3","gravatar_id":"","url":"https://api.github.com/users/sancar","html_url":"https://github.com/sancar","followers_url":"https://api.github.com/users/sancar/followers","following_url":"https://api.github.com/users/sancar/following{/other_user}","gists_url":"https://api.github.com/users/sancar/gists{/gist_id}","starred_url":"https://api.github.com/users/sancar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sancar/subscriptions","organizations_url":"https://api.github.com/users/sancar/orgs","repos_url":"https://api.github.com/users/sancar/repos","events_url":"https://api.github.com/users/sancar/events{/privacy}","received_events_url":"https://api.github.com/users/sancar/received_events","type":"User","site_admin":false},"open_issues":85,"closed_issues":75,"state":"open","created_at":"2014-10-09T13:04:53Z","updated_at":"2015-01-27T08:35:54Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-01-02T05:28:49Z","updated_at":"2015-01-27T10:06:25Z","closed_at":null,"body":"I am using below setting in my grails-hibernate application:\r\ncache.hazelcast.instance_name = hc_cache\r\n\r\nWe have 3 databases configured and by default, Hazelcast creates 3 cache instances although the contents are the same across them. On specifying an instance name, it should be creating a single instance with the specified name but it still creates the three instances.\r\nI am using Hazelcast 3.2.6 and Grails 2.2.3"},"comment":{"url":"https://api.github.com/repos/hazelcast/hazelcast/issues/comments/71620324","html_url":"https://github.com/hazelcast/hazelcast/issues/4374#issuecomment-71620324","issue_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/4374","id":71620324,"user":{"login":"chandreshp","id":1607455,"avatar_url":"https://avatars.githubusercontent.com/u/1607455?v=3","gravatar_id":"","url":"https://api.github.com/users/chandreshp","html_url":"https://github.com/chandreshp","followers_url":"https://api.github.com/users/chandreshp/followers","following_url":"https://api.github.com/users/chandreshp/following{/other_user}","gists_url":"https://api.github.com/users/chandreshp/gists{/gist_id}","starred_url":"https://api.github.com/users/chandreshp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chandreshp/subscriptions","organizations_url":"https://api.github.com/users/chandreshp/orgs","repos_url":"https://api.github.com/users/chandreshp/repos","events_url":"https://api.github.com/users/chandreshp/events{/privacy}","received_events_url":"https://api.github.com/users/chandreshp/received_events","type":"User","site_admin":false},"created_at":"2015-01-27T10:06:25Z","updated_at":"2015-01-27T10:06:25Z","body":"I was trying to reproduce this issue using the demo code samples that come with hazelcast 3.4 but got below errors:\r\nA. Tried 'mvn exec:java -Dexec.mainClass=\"com.hazelcast.hibernate.CreateDB\"' on \"hazelcast-3.4\\code-samples\\hazelcast-integration\\hibernate-2ndlevel-cache\" on windows 7 and it gave below error even though it said \"BUILD SUCCESS\":\r\n[INFO] --- exec-maven-plugin:1.3.2:java (default-cli) @ hibernate-2ndlevel-cache ---\r\n[WARNING] Warning: killAfter is now deprecated. Do you need it ? Please comment on MEXEC-6.\r\n[WARNING] thread Thread[Timer-0,5,com.hazelcast.hibernate.CreateDB] was interrupted but is still alive after waiting at least 15000msecs\r\n[WARNING] thread Thread[Timer-0,5,com.hazelcast.hibernate.CreateDB] will linger despite being asked to die via interruption\r\n[WARNING] thread Thread[derby.rawStoreDaemon,5,derby.daemons] will linger despite being asked to die via interruption\r\n[WARNING] NOTE: 2 thread(s) did not finish despite being asked to  via interruption. This is not a problem with exec:java, it is a problem with the running\r\n code. Although not serious, it should be remedied.\r\n[WARNING] Couldn't destroy threadgroup org.codehaus.mojo.exec.ExecJavaMojo$IsolatedThreadGroup[name=com.hazelcast.hibernate.CreateDB,maxpri=10]\r\njava.lang.IllegalThreadStateException\r\n        at java.lang.ThreadGroup.destroy(ThreadGroup.java:775)\r\n        at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:328)\r\n        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)\r\n        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)\r\n        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)\r\n        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)\r\n        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)\r\n        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)\r\n        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)\r\n        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)\r\n        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)\r\n        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)\r\n        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)\r\n        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)\r\n        at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\r\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n        at java.lang.reflect.Method.invoke(Method.java:601)\r\n        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)\r\n        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)\r\n        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)\r\n        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] BUILD SUCCESS\r\n\r\nB. Tried '\"mvn exec:java -Dexec.mainClass=\"com.hazelcast.hibernate.ManageEmployee\"' and it gave below error:\r\nJan 27, 2015 3:29:34 PM org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>\r\nINFO: HHH000397: Using ASTQueryTranslatorFactory\r\nFailed to create sessionFactory object.java.lang.NoClassDefFoundError: org/hibernate/cache/QueryResultsRegion\r\n[WARNING]\r\njava.lang.reflect.InvocationTargetException\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\r\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n        at java.lang.reflect.Method.invoke(Method.java:601)\r\n        at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)\r\n        at java.lang.Thread.run(Thread.java:722)\r\nCaused by: java.lang.ExceptionInInitializerError\r\n        at com.hazelcast.hibernate.ManageEmployee.main(ManageEmployee.java:29)\r\n        ... 6 more\r\nCaused by: java.lang.NoClassDefFoundError: org/hibernate/cache/QueryResultsRegion\r\n        at java.lang.Class.forName0(Native Method)\r\n        at java.lang.Class.forName(Class.java:264)\r\n        at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:240)\r\n        at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.selectStrategyImplementor(StrategySelectorImpl.java:125)\r\n        at org.hibernate.cache.internal.RegionFactoryInitiator.initiateService(RegionFactoryInitiator.java:87)\r\n        at org.hibernate.cache.internal.RegionFactoryInitiator.initiateService(RegionFactoryInitiator.java:46)\r\n        at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:105)\r\n        at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:251)\r\n        at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:225)\r\n        at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)\r\n        at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:295)\r\n        at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2442)\r\n        at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2438)\r\n        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1855)\r\n        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1928)\r\n        at com.hazelcast.hibernate.ManageEmployee.main(ManageEmployee.java:26)\r\n        ... 6 more\r\nCaused by: java.lang.ClassNotFoundException: org.hibernate.cache.QueryResultsRegion\r\n        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)\r\n        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)\r\n        at java.security.AccessController.doPrivileged(Native Method)\r\n        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)\r\n        at java.lang.ClassLoader.loadClass(ClassLoader.java:423)\r\n        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)\r\n        ... 22 more\r\n\r\nThanks.\r\nPlease let me know where I may need to correct.\r\n"}}