Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-418

FileInputStreams are not being closed so webapps cannot be undeployed.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.3-rc1, 1.3, 1.3.1-rc2, 1.3.1, 1.4
    • 1.5
    • None
    • None
    • Deployed web app in application server. Unable to undeploy because directory cannot be deleted.

    Description

      Deployed web app in application server. Unable to undeploy because directory cannot be deleted.

      Example error:

      Unable to delete: rm: App/App_war/org/apache/velocity/runtime/defaults/directive.properties: Permission denied

      InputStreams are not being closed.

      From RuntimeInstance.java

      private void initializeDirectives() throws Exception
      {
      /*

      • Initialize the runtime directive table.
      • This will be used for creating parsers.
        */
        runtimeDirectives = new Hashtable();

      Properties directiveProperties = new Properties();

      /*

      • Grab the properties file with the list of directives
      • that we should initialize.
        */

      InputStream inputStream =
      getClass().getResourceAsStream('/' + DEFAULT_RUNTIME_DIRECTIVES);

      if (inputStream == null)
      throw new Exception("Error loading directive.properties! " +
      "Something is very wrong if these properties " +
      "aren't being located. Either your Velocity " +
      "distribution is incomplete or your Velocity " +
      "jar file is corrupted!");

      directiveProperties.load(inputStream);

      On top of this

      ExtendedProperties.java does not close InputStreams which it opens.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jasonweinstein Jason Weinstein
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: