[
https://issues.jboss.org/browse/WFLY-3181?page=com.atlassian.jira.plugin....
]
Akhbar Falafel updated WFLY-3181:
---------------------------------
Issue Type: Bug (was: Feature Request)
Hibernate Search w/ Infinispan - java.lang.Class cannot be cast to
java.util.Map
--------------------------------------------------------------------------------
Key: WFLY-3181
URL:
https://issues.jboss.org/browse/WFLY-3181
Project: WildFly
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: JPA / Hibernate
Affects Versions: 8.0.0.Final
Environment: Wildfly 8.0, OS X 10.9.2
Reporter: Akhbar Falafel
Assignee: Sanne Grinovero
When configuring Hibernate Search to use Infinispan as its directory provider, a
java.lang.ClassCastException occurs upon deployment of an application making use of
Hibernate Search.
Relevant portion of standalone-full-ha.xml:
{code:xml}
<cache-container name="hibernateSearch"
default-cache="LuceneIndexesData"
jndi-name="java:jboss/infinispan/hibernateSearch" start="EAGER"
statistics-enabled="true">
<transport lock-timeout="60000"/>
<replicated-cache name="LuceneIndexesMetadata"
start="EAGER" statistics-enabled="true" mode="SYNC">
<binary-keyed-jdbc-store shared="true"
preload="true" passivation="false" purge="false"
datasource="java:jboss/datasources/InfinispanDatasource">
<binary-keyed-table>
<id-column name="ID_COLUMN"
type="VARCHAR(255)"/>
<data-column name="DATUM"
type="BYTEA"/>
</binary-keyed-table>
</binary-keyed-jdbc-store>
</replicated-cache>
<replicated-cache name="LuceneIndexesData"
start="EAGER" statistics-enabled="true" mode="SYNC">
<binary-keyed-jdbc-store shared="true"
preload="true" passivation="false" purge="false"
datasource="java:jboss/datasources/InfinispanDatasource">
<binary-keyed-table>
<id-column name="ID_COLUMN"
type="VARCHAR(255)"/>
<data-column name="DATUM"
type="BYTEA"/>
</binary-keyed-table>
</binary-keyed-jdbc-store>
</replicated-cache>
<replicated-cache name="LuceneIndexesLocking"
start="EAGER" statistics-enabled="true" mode="SYNC"/>
</cache-container>
{code}
Relevant portion of persistence.xml:
{code:xml}
<!-- Hibernate Search properties - Infinispan -->
<property name="hibernate.search.infinispan.cachemanager_jndiname"
value="java:jboss/infinispan/hibernateSearch" />
<property name="hibernate.search.default.directory_provider"
value="infinispan" />
<property name="hibernate.search.infinispan.chunk_size"
value="300000000" />
<property name="hibernate.search.reader.strategy"
value="shared" />
<property name="hibernate.search.worker.execution" value="sync"
/>
<property name="hibernate.search.jmx_enabled" value="true"
/>
<property name="hibernate.search.autoregister_listeners"
value="true" />
{code}
Stack trace of Exception upon deployment:
{noformat}
12:35:09,837 DEBUG [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool]
(ServerService Thread Pool -- 62) InfinispanDS: returnConnection(3ea8c21b, false) [1/20]
12:35:09,837 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 62)
MSC000001: Failed to start service jboss.infinispan.hibernateSearch.LuceneIndexesData:
org.jboss.msc.service.StartException in service
jboss.infinispan.hibernateSearch.LuceneIndexesData: org.infinispan.commons.CacheException:
Unable to invoke method public void
org.infinispan.persistence.manager.PersistenceManagerImpl.preload() on object of type
PersistenceManagerImpl
at org.jboss.as.clustering.msc.AsynchronousService$1.run(AsynchronousService.java:91)
[wildfly-clustering-common-8.0.0.Final.jar:8.0.0.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_51]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
[jboss-threads-2.1.1.Final.jar:2.1.1.Final]
Caused by: org.infinispan.commons.CacheException: Unable to invoke method public void
org.infinispan.persistence.manager.PersistenceManagerImpl.preload() on object of type
PersistenceManagerImpl
at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:185)
at
org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:869)
at
org.infinispan.factories.AbstractComponentRegistry.invokeStartMethods(AbstractComponentRegistry.java:638)
at
org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:627)
at
org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:530)
at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:216)
at org.infinispan.CacheImpl.start(CacheImpl.java:675)
at
org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:553)
at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:516)
at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:398)
at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:412)
at
org.jboss.as.clustering.infinispan.DefaultCacheContainer.getCache(DefaultCacheContainer.java:103)
at
org.jboss.as.clustering.infinispan.DefaultCacheContainer.getCache(DefaultCacheContainer.java:94)
at
org.jboss.as.clustering.infinispan.subsystem.CacheService.start(CacheService.java:78)
at org.jboss.as.clustering.msc.AsynchronousService$1.run(AsynchronousService.java:86)
[wildfly-clustering-common-8.0.0.Final.jar:8.0.0.Final]
... 4 more
Caused by: java.lang.ClassCastException: java.lang.Class cannot be cast to java.util.Map
at
org.infinispan.persistence.jdbc.binary.JdbcBinaryStore.unmarshallBucket(JdbcBinaryStore.java:577)
at
org.infinispan.persistence.jdbc.binary.JdbcBinaryStore.process(JdbcBinaryStore.java:190)
at
org.infinispan.persistence.manager.PersistenceManagerImpl.preload(PersistenceManagerImpl.java:214)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[rt.jar:1.7.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[rt.jar:1.7.0_51]
at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_51]
at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:183)
... 18 more
12:35:09,837 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 66)
MSC000001: Failed to start service jboss.infinispan.hibernateSearch.LuceneIndexesMetadata:
org.jboss.msc.service.StartException in service
jboss.infinispan.hibernateSearch.LuceneIndexesMetadata:
org.infinispan.commons.CacheException: Unable to invoke method public void
org.infinispan.persistence.manager.PersistenceManagerImpl.preload() on object of type
PersistenceManagerImpl
at org.jboss.as.clustering.msc.AsynchronousService$1.run(AsynchronousService.java:91)
[wildfly-clustering-common-8.0.0.Final.jar:8.0.0.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_51]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
[jboss-threads-2.1.1.Final.jar:2.1.1.Final]
Caused by: org.infinispan.commons.CacheException: Unable to invoke method public void
org.infinispan.persistence.manager.PersistenceManagerImpl.preload() on object of type
PersistenceManagerImpl
at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:185)
at
org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:869)
at
org.infinispan.factories.AbstractComponentRegistry.invokeStartMethods(AbstractComponentRegistry.java:638)
at
org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:627)
at
org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:530)
at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:216)
at org.infinispan.CacheImpl.start(CacheImpl.java:675)
at
org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:553)
at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:516)
at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:398)
at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:412)
at
org.jboss.as.clustering.infinispan.DefaultCacheContainer.getCache(DefaultCacheContainer.java:103)
at
org.jboss.as.clustering.infinispan.DefaultCacheContainer.getCache(DefaultCacheContainer.java:94)
at
org.jboss.as.clustering.infinispan.subsystem.CacheService.start(CacheService.java:78)
at org.jboss.as.clustering.msc.AsynchronousService$1.run(AsynchronousService.java:86)
[wildfly-clustering-common-8.0.0.Final.jar:8.0.0.Final]
... 4 more
Caused by: java.lang.ClassCastException: java.lang.Class cannot be cast to java.util.Map
at
org.infinispan.persistence.jdbc.binary.JdbcBinaryStore.unmarshallBucket(JdbcBinaryStore.java:577)
at
org.infinispan.persistence.jdbc.binary.JdbcBinaryStore.process(JdbcBinaryStore.java:190)
at
org.infinispan.persistence.manager.PersistenceManagerImpl.preload(PersistenceManagerImpl.java:214)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[rt.jar:1.7.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[rt.jar:1.7.0_51]
at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_51]
at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:183)
... 18 more
{noformat}
--
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