[
https://issues.jboss.org/browse/ISPN-3032?page=com.atlassian.jira.plugin....
]
Mircea Markus updated ISPN-3032:
--------------------------------
Forum Reference:
http://infinispan.markmail.org/search/#query:+page:2+mid:bfmmzxy23teiruvi...
Use both context and class' class loader when reading component
metadata
------------------------------------------------------------------------
Key: ISPN-3032
URL:
https://issues.jboss.org/browse/ISPN-3032
Project: Infinispan
Issue Type: Enhancement
Reporter: Mircea Markus
Assignee: Mircea Markus
Priority: Minor
{quote}
Caused by: org.hibernate.search.SearchException: Unable to initialize
directory provider:
org.hibernate.search.test.integration.jbossas7.model.Member
at
org.hibernate.search.store.impl.DirectoryProviderFactory.createDirectoryProvider(DirectoryProviderFactory.java:87)
at
org.hibernate.search.indexes.impl.DirectoryBasedIndexManager.createDirectoryProvider(DirectoryBasedIndexManager.java:232)
at
org.hibernate.search.indexes.impl.DirectoryBasedIndexManager.initialize(DirectoryBasedIndexManager.java:100)
at
org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManager(IndexManagerHolder.java:227)
... 19 more
Caused by: org.infinispan.config.ConfigurationException:
org.infinispan.CacheException: Unable to load component metadata!
at
org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:386)
at
org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:341)
at
org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:328)
at
org.hibernate.search.infinispan.CacheManagerServiceProvider.start(CacheManagerServiceProvider.java:93)
at
org.hibernate.search.engine.impl.StandardServiceManager$ServiceProviderWrapper.startVirtual(StandardServiceManager.java:178)
at
org.hibernate.search.engine.impl.StandardServiceManager.requestService(StandardServiceManager.java:124)
at
org.hibernate.search.infinispan.impl.InfinispanDirectoryProvider.initialize(InfinispanDirectoryProvider.java:86)
at
org.hibernate.search.store.impl.DirectoryProviderFactory.createDirectoryProvider(DirectoryProviderFactory.java:84)
... 22 more
Caused by: org.infinispan.CacheException: Unable to load component metadata!
at
org.infinispan.factories.components.ComponentMetadataRepo.initialize(ComponentMetadataRepo.java:131)
at
org.infinispan.factories.GlobalComponentRegistry.<init>(GlobalComponentRegistry.java:103)
at
org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:381)
... 29 more
Caused by: java.lang.NullPointerException
at
org.infinispan.factories.components.ComponentMetadataRepo.readMetadata(ComponentMetadataRepo.java:53)
at
org.infinispan.factories.components.ComponentMetadataRepo.initialize(ComponentMetadataRepo.java:129)
... 31 more
{quote}
The exception above is caused by Infinispan using (by default) invocation context's
ClassLoader when trying to read the component metadata. In a modularized environment such
as AS7 this will cause the metadata not to be found (metadata is packaged in the same jar
as the infinispan class that reads it). In order to overcome this problem we should try
to use both class' ClassLoader and InvocationContxt's class loader when trying to
read the metadata.
Workaround: set the class loader on the GlobalConfiguration object:
{code:java}
GlobalConfiguration.classLoader( GlobalConfiguration.class.getClassLoder())
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira