-
1. Re: Grails 2nd level cache
sannegrinovero Mar 9, 2013 6:42 PM (in response to pftylr)1 of 1 people found this helpfulI don't know which versions are suggested by grails, but all the Hibernate libraries you have chosen are not designed to work together: you can't mix random libraries.
For sure you have to remove: hibernate-commons-annotations-3.2.0.Final.jar
For the others it depends on other framework requirements; generally I would advise you to not use JBoss AS6 anymore but take JBoss AS 7.1 or even better to go with JBoss EAP 6.1:
in these versions all the libraries you need (except hibernate-search) are already aligned, known to be compatible and tested together. If you take that the version of Hibernate Search you need is 4.2.0.Final.
-
2. Re: Grails 2nd level cache
amanukyan Mar 11, 2013 12:46 PM (in response to pftylr)Hi Paul,
a question from my side: in the documentation related to infinispan plugin for grails URLs provided to the created quick starts (demos) - the section Plugin Test / Demo Applications .
Have you tried them? I've tried the one for Grails 2.0 and it worked properly (although for the application from the scratch I had the same error as you).
Maybe you can compare the configuration files (BuildConfig.groovy, Config.groovy, Datasource.groovy) to see what's the difference between your implementation and the provided one.
Regards,
Anna.
-
3. Re: Grails 2nd level cache
pftylr Mar 12, 2013 7:42 AM (in response to sannegrinovero)I've decided to replace using the grails plugin with a direct dependency so I can have more control over the version of infinispan included and its dependencies. However even trying different versions I still get the same ClassNotFoundException even though the class is there.
-
4. Re: Grails 2nd level cache
pftylr Mar 12, 2013 8:14 AM (in response to amanukyan)The demo does not have the level 2 caching configuration, but when its changed I still get the same ClassNotFoundException. Just wondering did you get it working after making the required changed to DataSource.groovy (ie adding cache.region.factory_class='org.hibernate.cache.infinispan.InfinispanRegionFactory'). What version of Grails did you use?
-
5. Re: Grails 2nd level cache
amanukyan Mar 12, 2013 9:14 AM (in response to pftylr)Hi Paul,
I've tried the demo for Grails < 2.0.0 (there the Datasource.groovy is changed properly). I've tried the demo with grails 1.3.7 and it worked like a charm. But for another demo, you are right - it still throws ClassNotFoundException, which I can't tell why it happens.
Anyway, I liked the idea of including the infinispan dependency directly into application as this way you will not be dependent on the plugin impl (plugin was not developed by us so I can't say why and what is wrong there).
Definetly the exception tells that the application doesn't see the hibernate-infinispan library. But should you add it as a dependency in BuildConfig.groovy or something else, I don't know.
Regards,
Anna.