5 Replies Latest reply on Nov 5, 2013 10:14 AM by oleg.kulikov

    Jndi problem in Jboss 6.1 eap

    mgie

      Hi!

      I installed modeshape subsystem in jboss 6.1 eap. I have it declared a repository in standalone-full.xml like

       

      <subsystem xmlns="urn:jboss:domain:modeshape:1.0">
           <webapp name="modeshape-rest.war"/>
           <webapp name="modeshape-webdav.war"/>
           <webapp name="modeshape-explorer.war"/>
           <repository name="ghs-repository" cache-name="ghs-repository" cache-container="modeshape">
                <indexing rebuild-upon-startup="never"/><!-- Define workspaces to exist upon startup -->
                <workspaces default-workspace="contracts" allow-workspace-creation="true">
                     <workspace name="contracts">
                     <!-- initial-content>initial-content-contracts.xml</initial-content -->
                     </workspace>
                     <workspace name="invoices">
                     <!-- initial-content>initial-content-invoices.xml</initial-content -->
                     </workspace>
                </workspaces>
           </repository>
      </subsystem>
      

       

      I would expect the repo to be available in the jndi under java:jcr/ghs-repository but it is not there when i do /subsystem=naming:jndi-view in the jboss cli.

      The weird thing is that I can log-in to the modeshape-explorer with this:

      2013-11-05 14_30_11-Repository Explorer.png

      but in the log i get

      org.modeshape.web.jcr.NoSuchRepositoryException: No repository 'jcr/ghs-repository' was found.

      Anyway i get to a repository default workspace like this:

      2013-11-05 14_31_31-Repository Explorer2.png

      When I log-in with a name that does not make sense like jcr/abcde i get the same error in the log AND i get a login error in the modeshape-explorer.

       

      Any idea what goes wrong here or if i missed something essential?

       

      best regards,

       

      mgie

        • 1. Re: Jndi problem in Jboss 6.1 eap
          oleg.kulikov

          Web explorer uses proprietary mechanism for the repository accessing. Initialy it tries to get a repo via its name "ghs-repository" and that's why you can log in

          • 2. Re: Jndi problem in Jboss 6.1 eap
            rhauch

            I'm not sure what's going on, but if Oleg's suggestion doesn't work, manually set the JNDI name via the "jndi-name" XML attribute on the "repository" XML element in the standalone.xml file.

             

            Oleg, we probably need to check that the web explorer does not create new repositories when provided with a name that doesn't match a running repository.

            • 3. Re: Jndi problem in Jboss 6.1 eap
              mgie

              So if web-explorer creates a new repository when it doesnt find one, why does jcr/ghs-repository let me log-in but jcr/xyz doesnt?

              • 4. Re: Jndi problem in Jboss 6.1 eap
                oleg.kulikov

                Marius, "ghs-repository" is defined but probably not started and web-explorer starts it using definition(probably, let me check it carefully) while jcr/xyz is not defined so nothing happen

                • 5. Re: Jndi problem in Jboss 6.1 eap
                  oleg.kulikov

                  So I did check. Web explorer is not creating new repositories but jndi defaults to "jcr/ghs-repository" (without java: prefix) and repository is available under this name. Web explorer picks it up using this name. To be able to bind repository to java: namespace  you need to specify jndi name explicit

                   

                  <repository name="ghs-repository" cache-name="ghs-repository" cache-container="modeshape" jndi-name="java:/jcr/ghs-repository">


                  After that it will be visible by invoking /subsystem=naming:jndi-view

                   

                  --Oleg