-
1. Re: Problems with SVN Connector
bcarothers Jan 27, 2010 12:42 PM (in response to camunda)Are you creating the folder directly in SVN or through the SVN connector? (Both should work, but I'm trying to localize the problem). Also, have you modified the cache settings for the connector?
I ran a quick local test at the connector level and things were working correctly, but that's not to say that the error couldn't be above the connector level.
Thanks
-
2. Re: Problems with SVN Connector
camunda Jan 27, 2010 12:56 PM (in response to bcarothers)I created everything in the SVN, at the moment I just try to read existing stuff.
Here is my configuration, nothing really special there:
<configuration xmlns:mode="http://www.modeshape.org/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"> <mode:sources jcr:primaryType="nt:unstructured"> <mode:source jcr:name="SVNStore" mode:classname="org.modeshape.connector.svn.SvnRepositorySource" mode:description="SVN repository (anonymous access)" mode:repositoryRootUrl="xxx" mode:defaultWorkspaceName="trunk" mode:predefinedWorkspaceNames="trunk" mode:creatingWorkspaceAllowed="false" mode:username="anonymous" mode:password="" /> </mode:sources> <mode:sequencers> </mode:sequencers> <mode:repositories> <mode:repository jcr:name="development svn" mode:source="SVNStore"> <mode:options jcr:primaryType="mode:options"> <jaasLoginConfigName jcr:primaryType="mode:option" mode:value="modeshape-jcr"/> </mode:options> </mode:repository> </mode:repositories> </configuration>
And there is not much more, the whole code looks like this (and I think you can guess what is inside the methods):
setupJaas(); JcrEngine engine = setupJcrEngine(); Session session = setupJcrSession(engine); print(session.getRootNode(), ""); tearDown(session, engine); engine.shutdown();
Thanks a lot for looking at it!
-
3. Re: Problems with SVN Connector
camunda Jan 27, 2010 1:11 PM (in response to camunda)And here the folder structure and the Stacktrace by the way. It seems if I debug through it, only the exception on the directory is thrown, the other stuff seems to work then, strange.
dir/ process.jpdl test.txt test.pdf empty.txt ERROR ON: dir javax.jcr.PathNotFoundException: No item exists at path jcr:primaryType relative to /dir in workspace "trunk" at org.modeshape.jcr.AbstractJcrNode.getProperty(AbstractJcrNode.java:543) at com.camunda.hemera.connect.SvnViaModeShapeTest.print(SvnViaModeShapeTest.java:163) at com.camunda.hemera.connect.SvnViaModeShapeTest.print(SvnViaModeShapeTest.java:193) at com.camunda.hemera.connect.SvnViaModeShapeTest.testBasicSvnAccess(SvnViaModeShapeTest.java:202) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) FILE -> process.jpdl -> FILE -> empty.txt IS EMPTY ERROR ON: test.txt javax.jcr.PathNotFoundException: No item exists at path jcr:primaryType relative to /test.txt in workspace "trunk" at org.modeshape.jcr.AbstractJcrNode.getProperty(AbstractJcrNode.java:543) at com.camunda.hemera.connect.SvnViaModeShapeTest.print(SvnViaModeShapeTest.java:163) at com.camunda.hemera.connect.SvnViaModeShapeTest.print(SvnViaModeShapeTest.java:193) at com.camunda.hemera.connect.SvnViaModeShapeTest.testBasicSvnAccess(SvnViaModeShapeTest.java:202) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) ERROR ON: test.pdf javax.jcr.PathNotFoundException: No item exists at path jcr:primaryType relative to /test.pdf in workspace "trunk" at org.modeshape.jcr.AbstractJcrNode.getProperty(AbstractJcrNode.java:543) at com.camunda.hemera.connect.SvnViaModeShapeTest.print(SvnViaModeShapeTest.java:163) at com.camunda.hemera.connect.SvnViaModeShapeTest.print(SvnViaModeShapeTest.java:193) at com.camunda.hemera.connect.SvnViaModeShapeTest.testBasicSvnAccess(SvnViaModeShapeTest.java:202) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) ERROR ON: jcr:system javax.jcr.PathNotFoundException: No item exists at path jcr:primaryType relative to /jcr:system in workspace "trunk" at org.modeshape.jcr.AbstractJcrNode.getProperty(AbstractJcrNode.java:543) at com.camunda.hemera.connect.SvnViaModeShapeTest.print(SvnViaModeShapeTest.java:163) at com.camunda.hemera.connect.SvnViaModeShapeTest.print(SvnViaModeShapeTest.java:193) at com.camunda.hemera.connect.SvnViaModeShapeTest.testBasicSvnAccess(SvnViaModeShapeTest.java:202) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
-
4. Re: Problems with SVN Connector
bcarothers Jan 27, 2010 2:43 PM (in response to camunda)The strangest thing about this is that the jcr:system node doesn't have a primary type either and that has nothing to do with SVN. I think that there may be a problem on startup.
Could you please upload your test case? I'd like to run it locally and see what's going on. Alternatively, could you see if your JcrEngine returns anything from getProblems() after you call start() on it?
Thanks
-
5. Re: Problems with SVN Connector
camunda Jan 29, 2010 4:51 AM (in response to bcarothers)No, there are no problems in the engine (it took me a couple of time to figure out that I need to check that, because in the beginning I had problems ;-)).
Attached my test case, just removed the repository URL for the public available code (you can use our Repos for testing if you want, just send me an email at bernd.ruecker@camunda.com).
Thanks
Bernd
PS: Sorry for the late reply, I was on a conference yesterday. Serge can proove it, I met him there ;-)
-
svn-connect.zip 7.9 KB
-
-
6. Re: Problems with SVN Connector
bcarothers Jan 29, 2010 6:09 AM (in response to camunda)Thanks for posting the test case - that was very helpful. The bug is actually in SessionCache. It looks like have a soft reference to a cached JcrProperty (which is good) and we assume that the reference wasn't garbage collected (which is not good). This also explains why a very similar test that we run didn't catch the bug. It's dependent on the whims of gc scheduling.
I will try to poke around on a fix today, but I might not be able to patch it in trunk until this weekend.
-
-
8. Re: Problems with SVN Connector
camunda Jan 29, 2010 6:34 AM (in response to bcarothers)Wow, that was quick! Thank's a lot for taking care of it. Weekend would be already perfect! -
9. Re: Problems with SVN Connector
bcarothers Feb 1, 2010 11:14 AM (in response to camunda)The patch has been applied to trunk. If you get a chance, please test this against the latest snapshot.
Thanks for catching this and please let us know if the fix works for you.
-
10. Re: Problems with SVN Connector
camunda Feb 2, 2010 1:11 PM (in response to bcarothers)Thanks!
But currently when I check out head it doesn't build, one test is failing (but I will try it anyway and build it with tests disabled):
------------------------------------------------------------------------------- Test set: org.modeshape.common.math.DurationTest ------------------------------------------------------------------------------- Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec <<< FAILURE! shouldRepresentTimeInProperFormat(org.modeshape.common.math.DurationTest) Time elapsed: 0.004 sec <<< FAILURE! org.junit.ComparisonFailure: expected:<00:00:02[.]000> but was:<00:00:02[,]000> at org.junit.Assert.assertEquals(Assert.java:99) at org.junit.Assert.assertEquals(Assert.java:117) at org.modeshape.common.math.DurationTest.shouldRepresentTimeInProperFormat(DurationTest.java:65) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59) at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98) at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79) at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87) at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77) at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42) at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88) at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51) at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27) at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37) at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) at org.apache.maven.surefire.Surefire.run(Surefire.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
-
11. Re: Problems with SVN Connector
rhauch Feb 2, 2010 1:16 PM (in response to camunda)Blast! We've had problems with this test in the past, especially with different locales, but I thought we had fixed it. Apparently not. Would you mind logging a JIRA for this? The test should not be comparing strings that rely upon locale-specific formatting rules.
You can get around it locally by just adding "@Ignore" to that whole test class.
-
12. Re: Problems with SVN Connector
camunda Feb 3, 2010 9:06 AM (in response to bcarothers)@Brian: That fix seems to work, my test case runs perfectly fine now :-) Thanks a lot!
@Randall: Sure, I created https://jira.jboss.org/jira/browse/MODE-656.
-
13. Re: Problems with SVN Connector
rhauch Feb 3, 2010 9:37 AM (in response to camunda)Glad that worked, and thanks for putting in that bug report! I'll get that fixed today. -
14. Re: Problems with SVN Connector
rhauch Feb 3, 2010 10:53 AM (in response to rhauch)Bernd, I've committed the fix for the test failure to trunk. Feel free to check my work, but I did test it locally by running with several different locales.