Cocoon
  1. Cocoon
  2. COCOON-2241

The commandline is not working since cocoon-1985

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.12
    • Fix Version/s: 2.1.12
    • Component/s: * Cocoon Core
    • Labels:
      None

      Description

      Updating forrest to use cocoon-2.1.x, I found a problem in the
      AbstractCachingProcessingPipeline.

      I am not sure whether someone is using the cocoon cli ATM. Forrest is
      based around this component.

      https://issues.apache.org/jira/browse/FOR-955?focusedCommentId=12624340#action_12624340

      I found that in
      org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline line 245
      Object lock =
      env.getObjectModel().get(HttpEnvironment.HTTP_REQUEST_OBJECT);
      the lock is null which causes the NPE in the end.

      The problem is that the cli environment does not store the requested object.
      1. COCOON-2241.txt
        7 kB
        Thorsten Scherler
      2. COCOON-2241.txt
        7 kB
        Thorsten Scherler
      3. COCOON-2241.txt
        2 kB
        Thorsten Scherler

        Issue Links

          Activity

          Hide
          Thorsten Scherler added a comment -
          mail thread around this issue:
          http://marc.info/?t=121932134400001&r=1&w=2
          Show
          Thorsten Scherler added a comment - mail thread around this issue: http://marc.info/?t=121932134400001&r=1&w=2
          Hide
          Thorsten Scherler added a comment -
          Proposed solution
          Show
          Thorsten Scherler added a comment - Proposed solution
          Hide
          Thorsten Scherler added a comment -
          "env.getObjectModel()"= HashMap<K,V> (id=271)
          DEFAULT_INITIAL_CAPACITY= 16
          DEFAULT_LOAD_FACTOR= 0.75
          MAXIMUM_CAPACITY= 1073741824
          NULL_KEY= Object (id=301)
          serialVersionUID= 362498820763181265
          useNewHash= false
          entrySet= HashMap$EntrySet (id=295)
          keySet= null

          HashMap values:
          [null, response=org.apache.cocoon.environment.wrapper.ResponseWrapper@fd4662, link-collection=[], request=org.apache.cocoon.environment.wrapper.RequestWrapper@6dddcf, null, null, null, null, context=org.apache.cocoon.environment.commandline.CommandLineContext@14ba9a2, null, null, source-resolver=org.apache.cocoon.environment.commandline.FileSavingEnvironment@725967, org.apache.cocoon.components.CocoonComponentManager=org.apache.cocoon.components.EnvironmentDescription@d2efa1, null, null, null]
          Show
          Thorsten Scherler added a comment - "env.getObjectModel()"= HashMap<K,V> (id=271) DEFAULT_INITIAL_CAPACITY= 16 DEFAULT_LOAD_FACTOR= 0.75 MAXIMUM_CAPACITY= 1073741824 NULL_KEY= Object (id=301) serialVersionUID= 362498820763181265 useNewHash= false entrySet= HashMap$EntrySet (id=295) keySet= null HashMap values: [null, response=org.apache.cocoon.environment.wrapper.ResponseWrapper@fd4662, link-collection=[], request=org.apache.cocoon.environment.wrapper.RequestWrapper@6dddcf, null, null, null, null, context=org.apache.cocoon.environment.commandline.CommandLineContext@14ba9a2, null, null, source-resolver=org.apache.cocoon.environment.commandline.FileSavingEnvironment@725967, org.apache.cocoon.components.CocoonComponentManager=org.apache.cocoon.components.EnvironmentDescription@d2efa1, null, null, null]
          Hide
          Thorsten Scherler added a comment -
          New version of the patch.

          Moving common code from Cli env inplementation to the Abstract class and creating a new object (simple uri string) for the lock.
          Show
          Thorsten Scherler added a comment - New version of the patch. Moving common code from Cli env inplementation to the Abstract class and creating a new object (simple uri string) for the lock.
          Hide
          Thorsten Scherler added a comment -
          Fixing small error that intruded the patch
          Show
          Thorsten Scherler added a comment - Fixing small error that intruded the patch
          Hide
          Thorsten Scherler added a comment -
          Committed revision 691199

          Slight modification:
          changed one line to be:

             this.objectModel.put(CLI_REQUEST_ID, new String(uri));
          Show
          Thorsten Scherler added a comment - Committed revision 691199 Slight modification: changed one line to be:    this.objectModel.put(CLI_REQUEST_ID, new String(uri));

            People

            • Assignee:
              Unassigned
              Reporter:
              Thorsten Scherler
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development