-
1. Re: Newbie question
rhauch Mar 7, 2013 9:54 AM (in response to venexz)You need to configure Infinispan cache with some cache store, otherwise upon restart you will lose all of your content.** That example already includes a cache store that writes to a local instance of BerkleyDB Java Edition.
How are you building? Can you build all of the examples using "mvn clean install -s settings.xml"? If not, what errors do you get? Also, can you post more of the stack trace you're getting?
** Technically, a cache store is only required for local topologies and small clusters, like with the example. You can create larger clusters that don't use a cache store but instead rely upon some portion of your cluster always remaining accessible. See our clustering documentation for details.)
-
2. Re: Newbie question
venexz Mar 7, 2013 11:10 AM (in response to rhauch)i'm don't familiar with maven, i've used eclipse to compile.
I've installed maven, build was successful with "mvn clean install -s settings.xml"
In eclipse
javax.jcr.RepositoryException: Error while starting 'Persisted-Repository' repository: org.infinispan.CacheConfigurationException: Unable to instantiate class org.infinispan.loaders.bdbje.BdbjeCacheStore
at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:619)
at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:586)
at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:155)
at org.modeshape.example.filesystem.ModeShapeExample.main(ModeShapeExample.java:55)
Caused by: org.infinispan.config.ConfigurationException: org.infinispan.CacheConfigurationException: Unable to instantiate class org.infinispan.loaders.bdbje.BdbjeCacheStore
at org.infinispan.configuration.parsing.Parser.parse(Parser.java:116)
at org.infinispan.configuration.parsing.Parser.parse(Parser.java:94)
at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:369)
at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:341)
at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:328)
at org.modeshape.jcr.LocalEnvironment.createContainer(LocalEnvironment.java:201)
at org.modeshape.jcr.LocalEnvironment.getCacheContainer(LocalEnvironment.java:113)
at org.modeshape.jcr.RepositoryConfiguration.getCacheContainer(RepositoryConfiguration.java:983)
at org.modeshape.jcr.RepositoryConfiguration.getContentCacheContainer(RepositoryConfiguration.java:973)
at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:1045)
at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:961)
at org.modeshape.jcr.JcrRepository.doStart(JcrRepository.java:360)
at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:617)
... 3 more
Caused by: org.infinispan.CacheConfigurationException: Unable to instantiate class org.infinispan.loaders.bdbje.BdbjeCacheStore
at org.infinispan.util.Util.loadClass(Util.java:88)
at org.infinispan.util.Util.getInstance(Util.java:206)
at org.infinispan.configuration.parsing.Parser.parseLoader(Parser.java:461)
at org.infinispan.configuration.parsing.Parser.parseLoaders(Parser.java:439)
at org.infinispan.configuration.parsing.Parser.parseCache(Parser.java:210)
at org.infinispan.configuration.parsing.Parser.parseNamedCache(Parser.java:169)
at org.infinispan.configuration.parsing.Parser.doParse(Parser.java:140)
at org.infinispan.configuration.parsing.Parser.parse(Parser.java:105)
... 15 more
Caused by: java.lang.ClassNotFoundException: org.infinispan.loaders.bdbje.BdbjeCacheStore
at org.infinispan.util.Util.loadClassStrict(Util.java:136)
at org.infinispan.util.Util.loadClass(Util.java:86)
... 22 more
Caused by: java.lang.NoClassDefFoundError: com/sleepycat/collections/TransactionWorker
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.infinispan.util.Util.loadClassStrict(Util.java:125)
... 23 more
Caused by: java.lang.ClassNotFoundException: com.sleepycat.collections.TransactionWorker
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
-
3. Re: Newbie question
rhauch Mar 7, 2013 11:53 AM (in response to venexz)1 of 1 people found this helpfulOkay, so the build actually works, just not in Eclipse. That's probably becuase Eclipse doesn't know it's a Maven project. Make sure you have the M2Eclipse plugin that adds Maven support into your IDE. Then, remove and then re-import the project as a Maven project by selecting "File->Import" and in the dialog expand the "Maven" section and select the "Existing Maven Projets" importer, select "Next" and set the "Root Directory" to the folder containing all the examples. After you select the "Root Directory", the "Projects" area will list all of the examples plus a top-level "pom.xml". Be sure to deselect the top-level "pom.xml" and select all the others, and press "Finish".
See the documentation on how to use the Maven importer.
-
4. Re: Newbie question
venexz Mar 7, 2013 1:30 PM (in response to rhauch)this helps me alot, thank you very much!