Skip to content

Instantly share code, notes, and snippets.

@Amit-Hora
Created April 8, 2014 11:42
Show Gist options
  • Save Amit-Hora/10112933 to your computer and use it in GitHub Desktop.
Save Amit-Hora/10112933 to your computer and use it in GitHub Desktop.
Infinispan with MongoDb as cache store giving exception
I tried using Mongo Db as Infinispan Cache store but facing exception Kindly find the code below
ConfigurationBuilder config = new ConfigurationBuilder();
MongoDBCacheStore strgBuilder=new MongoDBCacheStore();
ConfigurationBuilder b = new ConfigurationBuilder();
b.persistence().addStore(MongoDBCacheStoreConfigurationBuilder.class)
.host( "localhost" )
.port( 27017 )
.timeout( 1500 )
.acknowledgment( 0 )
.username( "" )
.password( "" )
.database( "infinispan_cachestore" )
.collection( "entries" );
/*DefaultCacheManager manager=new DefaultCacheManager(b.build());
Cache ch=manager.getCache();
ch.put("username","sogani");*/
final Configuration configcache = b.build();
MongoDBCacheStoreConfiguration store = (MongoDBCacheStoreConfiguration) configcache.persistence().stores().get(0);
Exception
java.lang.NoSuchMethodException: org.infinispan.loaders.mongodb.configuration.MongoDBCacheStoreConfigurationBuilder.<init>(org.infinispan.configuration.cache.PersistenceConfigurationBuilder)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment