1 2 Previous Next 26 Replies Latest reply on Jan 23, 2013 4:04 PM by vasilievip Go to original post
      • 15. Re: Content Management Interoperability Services(CMIS) interface for Modeshape.
        rhauch

        You still need the "storage" section of the configuration.

         

        Federation in ModeShape 3 is very different in some respects than in ModeShape 2. In particular, whereas ModeShape 2 could be configured to always federate all content from external sources, ModeShape 3 must always be configured with its own storage that it uses to store it's own (non-federated) content and the federated content is then projected onto the non-federated content.

         

        http://modeshape.files.wordpress.com/2013/01/federation.png

         

        Take a look at this very simple example of a test configuration that sets up a regular, persistent repository (via the "storage" section) and adds federation to it.

        • 16. Re: Content Management Interoperability Services(CMIS) interface for Modeshape.
          vasilievip

          Yeah, thanks

           

          Even with infinispan targeted to filesystem: https://github.com/vasilievip/modeshape-examples/commit/f6373b8ae1e158eb3c447b5a624a7ceba9f115ab,  I see the following exception (when running main method):

           

          javax.jcr.RepositoryException: Error while starting 'FederatedRepository' repository: No match found

                    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 org.modeshape.example.filesystem.ModeShapeExample.main(ModeShapeExample.java:59)

                    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:601)

                    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

          Caused by: java.lang.IllegalStateException: No match found

                    at java.util.regex.Matcher.group(Matcher.java:485)

                    at org.modeshape.jcr.RepositoryConfiguration$Federation$ProjectionConfiguration.<init>(RepositoryConfiguration.java:2004)

                    at org.modeshape.jcr.RepositoryConfiguration$Federation.getProjections(RepositoryConfiguration.java:1969)

                    at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:1053)

                    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)

                    ... 8 more

          • 17. Re: Content Management Interoperability Services(CMIS) interface for Modeshape.
            vasilievip

            If I debug the test all works a bit further but FileSystemConnector.fileFor throws exception because there is an "assert id.startsWith(DELIMITER);"  but Id coming as "eae0838e-23d3-49d3-b1ee-064b68302172"

            • 18. Re: Content Management Interoperability Services(CMIS) interface for Modeshape.
              rhauch

              That's a known problem with our 3.1.0.Final kit. Out of the box, the federated repository configuration doesn't work (the Git projection is using a variable that is not defined), so if you remove (or comment out) that repository from "standalone-modeshape.xml" the CMIS (and other web apps) should work.

               

               

              If I debug the test all works a bit further but FileSystemConnector.fileFor throws exception because there is an "assert id.startsWith(DELIMITER);"  but Id coming as "eae0838e-23d3-49d3-b1ee-064b68302172"

              Are you sure it's the FileSystemConnector and not the GitConnector? that is performing that assertion?

              • 19. Re: Content Management Interoperability Services(CMIS) interface for Modeshape.
                vasilievip

                Randall Hauch wrote:

                 

                That's a known problem with our 3.1.0.Final kit. Out of the box, the federated repository configuration doesn't work (the Git projection is using a variable that is not defined), so if you remove (or comment out) that repository from "standalone-modeshape.xml" the CMIS (and other web apps) should work.

                 

                Thanks

                 

                Randall Hauch wrote:

                If I debug the test all works a bit further but FileSystemConnector.fileFor throws exception because there is an "assert id.startsWith(DELIMITER);"  but Id coming as "eae0838e-23d3-49d3-b1ee-064b68302172"

                Are you sure it's the FileSystemConnector and not the GitConnector? that is performing that assertion?

                Yes, I assume this is not a git connector (see my code here https://github.com/vasilievip/modeshape-examples/commit/f6373b8ae1e158eb3c447b5a624a7ceba9f115ab ):

                step1.JPG

                step2.JPG

                • 20. Re: Content Management Interoperability Services(CMIS) interface for Modeshape.
                  vasilievip

                  Randall Hauch wrote:

                  Are you sure it's the FileSystemConnector and not the GitConnector? that is performing that assertion?

                  Should I file a bug or I run into misconfiguration?

                  • 21. Re: Content Management Interoperability Services(CMIS) interface for Modeshape.
                    rhauch

                    Should I file a bug or I run into misconfiguration?

                     

                    That depends. Did you change the repository configuration (e.g., in the "standalone-modeshape.xml") or use your own repository configuration? If you did either of these things, then yes, please log a bug and provide your repository configuration and describe the files you're accessing.

                     

                    However, if you're just using the out-of-the-box configuration and the "federatedRepository" repository, then you don't need to file a bug. It's actually described by MODE-1765 (which has a workaround).

                    • 22. Re: Content Management Interoperability Services(CMIS) interface for Modeshape.
                      vasilievip

                      For issue with "Error while starting 'FederatedRepository' repository: No match found" its clear, I mean issue with filesystem connector in federation, its getting UUID somehow, not sure why, looks like an issue as well.

                      • 23. Re: Content Management Interoperability Services(CMIS) interface for Modeshape.
                        rhauch

                        Ivan Vasyliev wrote:

                         

                        For issue with "Error while starting 'FederatedRepository' repository: No match found" its clear, I mean issue with filesystem connector in federation, its getting UUID somehow, not sure why, looks like an issue as well.

                        It is only an issue if you've modified the repository configuration, because as it currently in the kit the "federatedRepository" repository is incorrectly configured and will result in quite a few errors.

                         

                        However, as I said if you've modified the configuration at all and are having this problem, then it is potentially a new issue.

                        • 24. Re: Content Management Interoperability Services(CMIS) interface for Modeshape.
                          vasilievip

                          Hm, I'm not sure that I am on the same page here...

                          I went to modeshape-examples/modeshape-filesystem-store-example and configured example with federation and here is how  https://github.com/vasilievip/modeshape-examples/commit/f6373b8ae1e158eb3c447b5a624a7ceba9f115ab

                          When I run main method - I see issue #1 which is configuration parsing and known issue

                          When I run unit test - I see issue #2 which is UUID in filestore.

                           

                          Now, on this question I suspect I did change something existing:

                          >Did you change the repository configuration (e.g., in the "standalone-modeshape.xml") or use your own repository configuration?

                          • 25. Re: Content Management Interoperability Services(CMIS) interface for Modeshape.
                            rhauch

                            Sorry, I was under the impression that you were trying to use our kit for AS7 (because this is in the "CMIS interface for ModeShape" thread), especially the repository named "federatedRepository" that we ship in the kit. This repository's configuration is incorrect and will not run out-of-the-box, and this problem is covered by the aforementioned issue.

                             

                            Yes, please log this as an issue. Please let us know which branch in your clone of our examples repo contains the code that we can use to replicate the problem.

                             

                            Thanks

                            • 26. Re: Content Management Interoperability Services(CMIS) interface for Modeshape.
                              vasilievip

                              Randall Hauch wrote:

                               

                              Sorry, I was under the impression that you were trying to use our kit for AS7 (because this is in the "CMIS interface for ModeShape" thread), especially the repository named "federatedRepository" that we ship in the kit. This repository's configuration is incorrect and will not run out-of-the-box, and this problem is covered by the aforementioned issue.

                               

                              I started with basic case to check federation and then plug CMIS on top of it (i use jetty, its faster , I saw service factory which you provided out-of-the box, but I think I'll switch to it a bit later (there is code which lists repos which I would like to re-use).

                              Filed MODE-1772 on second issue.

                              1 2 Previous Next