Uploaded image for project: '[Read Only] - Hippo Repository'
  1. [Read Only] - Hippo Repository
  2. REPO-913

When war file is not unpacked, RepositoryServlet fails to start

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 2.26.00
    • None
    • None

    Description

      RepositoryServlet fails to start in case using unpackWARs="false" option to run cms.war without extraction in Tomcat like the following example (in $CATALINA_BASE/conf/server.xml):

      <Host name="localhost" appBase="webapps"
      unpackWARs="false" autoDeploy="true">

      It throws a servlet exception in the following code (RepositoryServlet.java):

      if (!storageLocation.startsWith("/") && !storageLocation.startsWith("file:")) {
      // try to parse the relative path
      storageLocation = config.getServletContext().getRealPath(storageLocation);
      if (storageLocation == null)

      { throw new ServletException("Cannot determine repository location " + config.getInitParameter(REPOSITORY_DIRECTORY_PARAM)); }

      }

      ServletContext#getRealPath() may return null in case that the cms.war is running without being unpacked.

      So, I think it's better to use a default storage directory instead in this case under the current working directory (e.g, "./repository_storage").

      Attachments

        Activity

          People

            jsheriff Junaidh Kadhar Sheriff
            wko Woonsan Ko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: