Created
April 8, 2014 11:42
-
-
Save Amit-Hora/10112933 to your computer and use it in GitHub Desktop.
Infinispan with MongoDb as cache store giving exception
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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