0 Replies Latest reply on Jan 9, 2019 7:39 AM by 鑫涛 郝

    modeshape-web-explorer +maven+tomcat

    鑫涛 郝 Newbie

       

       

            In the maven project, I add dependency modeshape-web-explorer.jar, which runs as a war package under tomcat.

           modeshape-web-explorer doesn't work in web-explorer.

           I debugged Tomcat remotely under eclipse and found:

                org.modeshape.web.server.impl.LRepositoryImpl class:

      public LRepositoryImpl( ServletContext context, JcrRepository repository,

                                  Credentials creds ) throws LoginException, RepositoryException {

              this.context = context;

              this.creds = creds;

              assert repository != null;

              this.repository = repository;

             

              logger.debug("Logging to repository " + repository + " as " + creds);

             

              Session session = creds != null ? repository.login(creds) : repository.login();

              sessions.put(session.getWorkspace().getName(), session);

             

              workspaces = session.getWorkspace().getAccessibleWorkspaceNames();

              logger.debug("[" + this.repository.getName() + "] available workspaces " + wsnames());

             

              tempDir = (File) context.getAttribute("javax.servlet.context.tempdir");

          }

       

       

      ServletContext is  null,so Null pointer exception:

        logger.debug("Could not start repository " + name, e);

                      throw new RemoteException(e.getMessage());