Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1229

Anonymous access to ModeShape repository cannot be disabled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 2.6.0.Beta2, 2.5.1.GA
    • None
    • JCR
    • None

      I have a repository that has a disabled anonymous access using <anonymousUserRoles jcr:PrimaryType="mode:option" mode:value=""/> as described in documentation. The attempt to obtain such repository ends with exception

      2011-07-21 13:08:55,303 DEBUG [org.modeshape.jcr.JcrRepositoryFactory] (Thread-35) Could not load repository named 'test-secured'
      javax.jcr.RepositoryException: Error starting the "test-secured" repository (check the configuration): Error starting the "test-secured" repository (check the configuration): null
              at org.modeshape.jcr.JcrEngine$JcrRepositoryHolder.getRepository(JcrEngine.java:824)
              at org.modeshape.jcr.JcrEngine.getRepository(JcrEngine.java:365)
              at org.modeshape.jboss.managed.JNDIManagedRepositories.getRepository(JNDIManagedRepositories.java:87)
              at org.modeshape.jcr.JcrRepositoryFactory.getRepository(JcrRepositoryFactory.java:153)
              at org.jboss.soa.modeshape.factory.RepositoryReferenceFactory.getServerRepository(RepositoryReferenceFactory.java:79)
              at org.jboss.soa.modeshape.factory.RepositoryReferenceFactory.getRepository(RepositoryReferenceFactory.java:31)
              at org.jboss.soa.modeshape.qa.tests.AuthenticationTest.logWithoutCredentials(AuthenticationTest.java:27)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:616)
              at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:641)
              at org.testng.internal.Invoker.invokeMethod(Invoker.java:677)
              at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:850)
              at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1154)
              at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:137)
              at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:121)
              at org.testng.TestRunner.runWorkers(TestRunner.java:1108)
              at org.testng.TestRunner.privateRun(TestRunner.java:737)
              at org.testng.TestRunner.run(TestRunner.java:596)
              at org.testng.SuiteRunner.runTest(SuiteRunner.java:315)
              at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:310)
              at org.testng.SuiteRunner.privateRun(SuiteRunner.java:272)
              at org.testng.SuiteRunner.run(SuiteRunner.java:221)
              at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
              at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
              at org.testng.TestNG.runSuitesSequentially(TestNG.java:1027)
              at org.testng.TestNG.runSuitesLocally(TestNG.java:964)
              at org.testng.TestNG.run(TestNG.java:896)
              at org.jboss.soa.esb.qa.framework.incontainer.TestNGRunner.runTestsWithConfigFile(TestNGRunner.java:67)
              at org.jboss.soa.esb.qa.framework.incontainer.TestNGRunner.run(TestNGRunner.java:77)
              at java.lang.Thread.run(Thread.java:636)
      Caused by: javax.jcr.RepositoryException: Error starting the "test-secured" repository (check the configuration): null
              at org.modeshape.jcr.JcrEngine$RepositoryInitializer.call(JcrEngine.java:902)
              at org.modeshape.jcr.JcrEngine$RepositoryInitializer.call(JcrEngine.java:874)
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
              at java.util.concurrent.FutureTask.run(FutureTask.java:166)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
              ... 1 more
      Caused by: java.lang.NullPointerException
              at org.modeshape.jcr.JcrEngine.doCreateJcrRepository(JcrEngine.java:433)
              at org.modeshape.jcr.JcrEngine$RepositoryInitializer.call(JcrEngine.java:891)
              ... 6 more
      

      Whenever I put any string into value attribute, then the repository can be accessed.

              rhauch Randall Hauch (Inactive)
              jpechane Jiri Pechanec
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: