Simple Infinispan Configuration Problem
duncanmcintyre May 25, 2012 11:19 AMI have a JCR performance test suite which I am trying to run against Infinispan 3 Alpha4. The suite runs fine as long as I give it an empty repository configuration. When I try to use a configuration with Infinispan and BDB it dies on startup with an NPE:
Error: Error while starting 'modeshape_test_repo' repository: java.lang.NullPointerException
Exception in thread "main" javax.jcr.RepositoryException: Error while starting 'modeshape_test_repo' repository: java.lang.NullPointerException
at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:566)
at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:528)
at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:138)
at com.mom.jcrperf.TestableRepository.initialise(TestableRepository.java:85)
at com.mom.jcrperf.AbstractTestRunner.runSuite(AbstractTestRunner.java:181)
at com.mom.jcrperf.AbstractTestRunner.run(AbstractTestRunner.java:82)
at com.mom.jcrperf.TestRunner.main(TestRunner.java:22)
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
at org.modeshape.jcr.JcrRepository$RepositorySessionEnvironment.currentTransaction(JcrRepository.java:1531)
at org.modeshape.jcr.JcrRepository$RepositorySessionEnvironment.createMonitor(JcrRepository.java:1537)
at org.modeshape.jcr.cache.document.WritableSessionCache.save(WritableSessionCache.java:330)
at org.modeshape.jcr.cache.document.WritableSessionCache.save(WritableSessionCache.java:294)
at org.modeshape.jcr.cache.RepositoryCache.<init>(RepositoryCache.java:128)
at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:1004)
at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:901)
at org.modeshape.jcr.JcrRepository.doStart(JcrRepository.java:337)
at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:564)
... 6 more
Caused by: java.lang.NullPointerException
at org.modeshape.jcr.JcrRepository$RepositorySessionEnvironment.currentTransaction(JcrRepository.java:1529)
... 14 more
The config files I am using are simple:
repository.json
{
"name" : "modeshape_test_repo",
"workspaces" : {
"predefined" : ["otherWorkspace"],
"default" : "default",
"allowCreation" : true
},
"security" : {
"anonymous" : {
"roles" : ["readonly","readwrite","admin"],
"useOnFailedLogin" : false
}
},
"storage" : {
"cacheConfiguration" : "/home/duncan/perf-tests/configurations/modeshape-3/infinispan-bdb.xml",
"cacheName" : "modeshape_test_repo",
"transactionManagerLookup" : "org.infinispan.transaction.lookup.GenericTransactionManagerLookup",
"binaryStorage" : {
"minimumBinarySizeInBytes" : 4096,
"type" : "file",
"directory" : "/home/duncan/perf-tests/disk-repository"
}
}
}
infinispan-bdb.xml
<?xml version="1.0" encoding="UTF-8"?>
<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:5.1 http://www.infinispan.org/schemas/infinispan-config-5.1.xsd"
xmlns="urn:infinispan:config:5.1">
<global />
<default />
<namedCache name="modeshape_test_repo">
<loaders passivation="false" shared="false" preload="false">
<loader class="org.infinispan.loaders.bdbje.BdbjeCacheStore"
fetchPersistentState="false"
purgeOnStartup="false">
<properties>
<property name="location" value="/home/duncan/perf-tests/disk-repository/bdb" />
</properties>
</loader>
</loaders>
</namedCache>
</infinispan>
The database is being created in /home/duncan/perf-tests/disk-repository/bdb, so BDB is starting up properly. I'm stuck trying to figure out what might be broken.