4 Replies Latest reply on Dec 20, 2012 12:38 PM by Josh Smith

    infinispan-cachestore-jdbc configuration in as7 ?

    Lukasz Kaleta Newbie

      Hi, I am trying to run infinispan-cachestore-jdbc (JdbcStringBasedCacheStore), it is installed as module.

       

      Mine configuration:

      standalone-preview.xml

       

      <local-cache name="localCache" start="EAGER">

        <eviction strategy="NONE" max-entries="100000000"/>

        <store class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore" passivation="false" preload="true" fetch-state="true" purge="false">

          <property name="stringsTableNamePrefix">ISPN_STRING_TABLE</property>

          <property name="idColumnName">ID_COLUMN</property>

          <property name="dataColumnName">DATA_COLUMN</property>

          <property name="timestampColumnName">TIMESTAMP_COLUMN</property>

          <property name="timestampColumnType">BIGINT</property>

          <property name="connectionFactoryClass">org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory</property>

          <property name="datasourceJndiLocation">java:jboss/datasources/PartsDS</property>

          <property name="idColumnType">VARCHAR(255)</property>

          <property name="dataColumnType">BINARY</property>

          <property name="dropTableOnExit">false</property>

          <property name="createTableOnStart">true</property>

        </store>

      </local-cache>

       

      Exception:

      19:52:17,436 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.infinispan.business-unit-cache-container.unit-alias: org.jboss.msc.service.StartException in service jboss.infinispan.cache-container.localCache: Failed to start service

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1780) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_25]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_25]

          at java.lang.Thread.run(Thread.java:662) [:1.6.0_25]

      Caused by: org.infinispan.CacheException: Unable to invoke method public void org.infinispan.loaders.CacheLoaderManagerImpl.start() on object

          at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:173)

          at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:890)

          at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:683)

          at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:581)

          at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:180)

          at org.infinispan.CacheImpl.start(CacheImpl.java:368)

          at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:575)

          at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:453)

          at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:467)

          at org.jboss.as.clustering.infinispan.DefaultEmbeddedCacheManager.getCache(DefaultEmbeddedCacheManager.java:84)

          at org.jboss.as.clustering.infinispan.DefaultEmbeddedCacheManager.getCache(DefaultEmbeddedCacheManager.java:73)

          at org.jboss.as.clustering.infinispan.subsystem.CacheService.start(CacheService.java:73)

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

          ... 3 more

      Caused by: java.lang.reflect.InvocationTargetException

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_25]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_25]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_25]

          at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_25]

          at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:170)

          ... 16 more

      Caused by: org.infinispan.CacheException: Unable to start cache loaders

          at org.infinispan.loaders.CacheLoaderManagerImpl.start(CacheLoaderManagerImpl.java:129)

          ... 21 more

      Caused by: java.lang.IllegalArgumentException: Cannot load null class!

          at org.infinispan.util.Util.getInstance(Util.java:206)

          at org.infinispan.loaders.jdbc.connectionfactory.ConnectionFactory.getConnectionFactory(ConnectionFactory.java:42)

          at org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore.start(JdbcStringBasedCacheStore.java:119)

          at org.infinispan.loaders.CacheLoaderManagerImpl.start(CacheLoaderManagerImpl.java:126)

          ... 21 more

      org.infinispan.util.Util.getInstance(Util.java:206) -> it lloks for 'connectionFactoryClass', so it seems mine configuration is wrong somehow, but I do not know how to set it up. Maybe someone have some suggestions ?

       

      Thanks!