5 Replies Latest reply on Jun 7, 2013 10:50 AM by rhauch

    Modeshape problem with two repositories

    m.jawwad

      Hi,

       

            I am trying to run modeshape with two repositories at the same time. I am using Tomcat 7, spring and modeshape engine to load the two repos. In my current test, I have made two separate repositories on my Windows 7 machie on two complete different locations i.e. one in my C: drive and one in D: drive. Both the repositories seemed to load correctly when I first tested them. BUT problem came when I uploaded some bulk data to both the repositories. Problem is that. My console shows only the below logging, and then nothing happens on tomcat side:

       

      013-06-06 11:50:44.787 INFO  [localhost-startStop-1] SLF4JLoggerImpl.java:191 ModeShape version 3.1.3.Final

      2013-06-06 11:50:46.484 WARN  [localhost-startStop-1] SLF4JLoggerImpl.java:95 No MIME type detectors found. Automatic MIME type detection of binary values will be disabled.

       

      -------------------------------------------------------------------

      GMS: address=VC6-55397, cluster=ModeShape-JCR, physical address=fe80:0:0:0:c0ed:a812:565:5d7b%10:49286

      -------------------------------------------------------------------

      2013-06-06 11:50:50.597 WARN  [localhost-startStop-1] SLF4JLoggerImpl.java:95 The field description is not present on org.modeshape.sequencer.zip.ZipSequencer or any of its super types

      2013-06-06 11:50:50.625 WARN  [localhost-startStop-1] SLF4JLoggerImpl.java:95 The field description is not present on org.modeshape.sequencer.msoffice.MSOfficeMetadataSequencer or any of its super types

      2013-06-06 11:50:50.629 WARN  [localhost-startStop-1] SLF4JLoggerImpl.java:95 The field description is not present on org.modeshape.sequencer.mp3.Mp3MetadataSequencer or any of its super types

      2013-06-06 11:51:19.696 WARN  [localhost-startStop-1] SLF4JLoggerImpl.java:95 No MIME type detectors found. Automatic MIME type detection of binary values will be disabled.

       

      -------------------------------------------------------------------

      GMS: address=VC6-8553, cluster=ModeShape-JCR, physical address=fe80:0:0:0:c0ed:a812:565:5d7b%10:49287

      -------------------------------------------------------------------

      2013-06-06 11:51:20.659 WARN  [localhost-startStop-1] SLF4JLoggerImpl.java:95 The field description is not present on org.modeshape.sequencer.zip.ZipSequencer or any of its super types

      2013-06-06 11:51:20.665 WARN  [localhost-startStop-1] SLF4JLoggerImpl.java:95 The field description is not present on org.modeshape.sequencer.msoffice.MSOfficeMetadataSequencer or any of its super types

      2013-06-06 11:51:20.667 WARN  [localhost-startStop-1] SLF4JLoggerImpl.java:95 The field description is not present on org.modeshape.sequencer.mp3.Mp3MetadataSequencer or any of its super types

       

      After waiting for a long time, i happened to check the location of indexes/nodeinfo in my C: drive repo. The indexes seem to be changing constantly here (as they were in a constant loop or something). While indexes on D: drive repo are stable. And here Tomcat seems to be stuck and not responding, there is no exception or anything here as well.

       

      Can any body tell me what mught be wrong?

       

      Note: it happened only after I uploaded some data to the repo.

       

      Thanks in advance.

        • 1. Re: Modeshape problem with two repositories
          rhauch

          Turn on debug logging on "org.modeshape" for much more insight into what's going on.

           

          Can you share your ModeShape and Infinipsan configuration files for each of your servers? (They should be different files or should be using variables for the parts that must be different in each server.)

          • 2. Re: Modeshape problem with two repositories
            m.jawwad

            Hi Randall,

             

                     Thanks a lot for the reply. Well previously there was a problem with the engine.start(). My application started two engines for two repos, but then I associated both the repositories to the same engine and it started working fine for me in my development environment (MyEclipse). After getting some results, I shifted it to a standalone tomcat 7 on a windows machine. The problem somewhat came back . The tomcat is again stuck at the same point but this time it is not even moving to the second repository. I have attached my .json and .xml files so that might be helpful. The other repo files are the same, only the name of repo and path is different.

             

                    Thanks again.

            • 3. Re: Modeshape problem with two repositories
              rhauch

              It looks like these two repositories are not supposed to be clustered. (The names are not the same, and the "clustering" section in the ModeShape configuration is empty.)

               

              You shouldn't create a separate ModeShapeEngine for each repository - a single engine can manage lots of named repositories.

               

              Is your application starting the ModeShapeEngine(s), or are you doing that by registering ModeShape in Tomcat's "server.xml" file?

               

              Finally, until you solve this problem, I'd try simplifying the configurations as much as possible.

              • 4. Re: Modeshape problem with two repositories
                m.jawwad

                Finally, until you solve this problem, I'd try simplifying the configurations as much as possible.

                Thanks Randall that really will be helpful. .Also now I only have single engine in my application that loads both the repos. Code snippet is provided below:

                 

                      protected Repository createRepository() throws Exception {

                            // return JackRabbit repository

                       ModeShapeEngine modeshapeEngine = ModeShapeEngine.geModeShapetEngine();      //singleton

                            engine = modeshapeEngine.getEngine();

                       RepositoryConfiguration config;    

                           

                           

                      config = RepositoryConfiguration.read(repositoryConfigPath);           

                           repository = engine.deploy(config);

                 

                            return repository;

                      }

                Actually I have used org.springmodules.jcr.RepositoryFactoryBean class to handle modeshape repositories. If you say I can upload the source code of this file as well.

                 

                Thnks again

                • 5. Re: Modeshape problem with two repositories
                  rhauch

                  The logs show that clustering is enabled, but it shouldn't be. Please take out the "clustering" section of the ModeShape configuration, since that effectivley tells ModeShape to use clustering via the default JGroups configuration.

                   

                  Also, before you start up your application, be sure to remove the "D:/MS_REPOSITORY/storage" and "D:/MS_REPOSITORY/indexes" directories (and the corresponding ones on the C drive). When you started up your application previously and there was a problem, the repositories may have been corrupted. So it's best to start with a clean slate.