The 'myRepository' repository cannot be started because transactions are not enabled
anweibel Feb 20, 2013 12:27 PMI'm trying to use ModeShape from within a Play! application. When starting the application, I get the error below. I also added the configuration files below.
If I use this example infinispan configuration, I get the same exception:
Using JBossStandaloneJTAManagerLookup causes the same exception.
If I leave away the "storage" part in the repository configuration, the application starts up fine with the in-memory configuration. So I reckon that problem must be in how I configure infinispan?
Thanks for any hints..!
----------------
16:51:04,240 INFO ~ ModeShape version 3.1.0.Final 16:51:05,602 INFO ~ ISPN000078: Starting JGroups Channel 16:51:08,922 INFO ~ ISPN000094: Received new cluster view: [BANCLNT11-3518|0] [BANCLNT11-3518] 16:51:08,922 INFO ~ ISPN000079: Cache local address is BANCLNT11-3518, physical addresses are [127.0.0.1:7800] 16:51:08,927 INFO ~ ISPN000128: Infinispan version: Infinispan 'Brahma' 5.1.2.FINAL 17:10:46,459 ERROR ~ Failed to get a JCR sesison javax.jcr.RepositoryException: Error while starting 'myRepository' repository: The 'myRepository' repository cannot be started because transactions are not enabled. Please check your configuration. at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:613) at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:580) at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:149) at controllers.JCR.setJcrSession(JCR.java:39) at play.mvc.ActionInvoker.invoke(ActionInvoker.java:510) at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:484) at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:479) at play.mvc.ActionInvoker.handleBefores(ActionInvoker.java:328) at play.mvc.ActionInvoker.invoke(ActionInvoker.java:142) at Invocation.HTTP Request(Play!) Caused by: java.lang.IllegalStateException: The 'myRepository' repository cannot be started because transactions are not enabled. Please check your configuration. at org.modeshape.jcr.JcrRepository$RunningState.validateTransactionsEnabled(JcrRepository.java:1235) at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:1062) at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:966) at org.modeshape.jcr.JcrRepository.doStart(JcrRepository.java:354) at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:611) ... 9 more
------------
<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> <transport clusterName="infinispan-cluster"> <properties> <property name="configurationFile" value="jgroups-tcp.xml" /> </properties> </transport> </global> <namedCache name="clusteredCache"> <transaction transactionMode="TRANSACTIONAL" lockingMode="OPTIMISTIC" transactionManagerLookupClass="org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup" /> <clustering mode="replication"> <stateTransfer chunkSize="0" fetchInMemoryState="false" timeout="240000" /> <sync replTimeout="20000" /> </clustering> </namedCache> </infinispan>
--- repository-config.json ---------
{ "name" : "myRepository", "workspaces" : { "predefined" : ["otherWorkspace"], "default" : "default", "allowCreation" : true, "initialContent" : { "default" : "xmlImport/init.xml" } }, "storage" : { "cacheConfiguration" : "infinispan.xml", "cacheName" : "Repository", "binaryStorage" : { "minimumBinarySizeInBytes" : 4096, "minimumStringSize" : 4096, "type" : "file", "directory" : "infinispanBinaryStorage" } }, "node-types" : ["types.cnd"], "security" : { ... } }