-1

I am using the 11.0.7 Infinispan cache store which is configured with an XML file. I have imported that cache module in a Wildlfy server. I am using this dependency in my application. But when I try to fetch cache elements from cache, it gives me the exception ClassNotFound.

I have used this configuration:

<local-cache name="TaskStoreCache" statistics="false">
    <locking acquire-timeout="60000" />
    <persistence passivation="false">
        <rocksdb-store path=" C:\CacheStore\Data\TaskStoreCache" preload="false" shared="false" 
                       purge="false" read-only="false">
            <expiration path="C: \CacheStore\Expired\TaskStoreCache"/>
        </rocksdb-store>
    </persistence>
    <memory max-count="500"/>
    <encoding media-type="application/x-java-object"/> 
</local-cache>

And I used this serialization:

<serialization  marshaller="org.infinispan.commons.marshall.JavaSerializationMarshaller">
    <white-list>
        <regex>com.xyz.cache.*</regex>
        <regex>java.util.*</regex>                  
        <regex>java.lang.*</regex>  
    </white-list>
</serialization>

I am sure it is a class loading related issue. Please help me with that.

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263
  • it's not enough to say you got a `ClassNotFound` error, you must include the entire exception message, and even a part of the stacktrace. It would also help to explain how you are using the cache. Finally, you should not be using the same path for the main RocksDB store and for it's expiration DB. – Dan Berindei Jan 06 '21 at 16:33

1 Answers1

0

You should double-check how the dependency is wrapped into your application (war/ear), and make sure the scope is correct.

If you did not pack it within your application, the module has to be present on your wildfly and known to your application (e.g. jboss-deployment-structure.xml)

Kurt Agis
  • 1
  • 3