[hibernate-dev] After upgrading AS7 to use Hibernate 4.0.1, the second level cache is NPEing in org.hibernate.cache.infinispan.InfinispanRegionFactory.getCache (AS7-3290)

Galder Zamarreño galder at jboss.org
Fri Jan 13 03:24:03 EST 2012


On Jan 12, 2012, at 9:20 PM, Scott Marlow wrote:

> Do you know which JAR needs to see the extensions?  I need to make sure that they become visible to whichever jar needs to see them.

The extensions are loaded by the Infinispan Core jar, so that's the one I'd assume needs to see the Hibernate Infinispan 2LC jar

> 
> Currently, the AS7 org.jboss.as.jpa.hibernate.infinispan module is referencing the Infinispan 2LC Hibernate jar file, but that doesn't seem to be the right jar to expose the services to.
> 
> The AS7 module definitions (module.xml), has a way to express that when a module references another module, the service definitions should be imported also.  However, I think that I need to know which jar expects to see the ModuleCommandExtensions.  I think your telling me below, that Infinispan needs to see these, but I want to make sure.
> 
> 
> On 01/12/2012 01:32 PM, Galder Zamarreño wrote:
>> The NPE is noisy but what it means is that the custom commands that are now used for handling evict() calls are not being found.
>> 
>> These are looked up via service loader approach. These implementations are located within the Infinispan 2LC Hibernate jar file.
>> 
>> Within the jar, there should be a:
>> 
>> META-INF/services/org.infinispan.commands.module.ModuleCommandExtensions file containing:
>> 
>> org.hibernate.cache.infinispan.util.CacheCommandExtensions
>> 
>> Basically, the NPE comes from this not being loaded by the Infinispan internals. Let's chat online (IRC) if you need more details.
>> 
>> On Jan 12, 2012, at 7:16 PM, Scott Marlow wrote:
>> 
>>> I assume this is not expected to happen.  http://pastie.org/3173509 is the exception call stack and steps to recreate on as7 (with my https://github.com/scottmarlow/jboss-as/tree/AS7-3279 branch) are:
>>> 
>>> cd as7/testsuite/integration/basic
>>> mvn clean install -Dtest=org.jboss.as.test.integration.jpa.hibernate.SecondLevelCacheTestCase
>>> 
>>> Suggestions to fix?
>>> 
>>> Scott
>> 
>> --
>> Galder Zamarreño
>> Sr. Software Engineer
>> Infinispan, JBoss Cache
>> 
> 

--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache





More information about the hibernate-dev mailing list