MyFaces Extensions Scripting
  1. MyFaces Extensions Scripting
  2. EXTSCRIPT-100

ExtSCRIPT + Jetty 7 NPEs at startup (jetty 6 works)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Beta-1
    • Fix Version/s: 1.0-Final
    • Component/s: None
    • Labels:
      None

      Description

      Bruno Aranda has reported following

      java.lang.NullPointerException
      at
      org.apache.myfaces.scripting.servlet.CustomChainLoader.setupScriptingPaths(CustomChainLoader.java:76)

      at
      org.apache.myfaces.scripting.servlet.CustomChainLoader.<init>(CustomChainLoader.java:63)

      at
      org.apache.myfaces.scripting.servlet.StartupServletContextPluginChainLoader.initChainLoader(StartupServletContextPluginChainLoader.java:116)

      A further investigation on the codebase revealed that following happens

      aka in reality it does following
      String contextRoot = servletContext.getRealPath("/WEB-INF/groovy");
      >>> contextRoot = contextRoot.trim();

      The problem is that the code did not expect a null since it checks for a
      standard /WEB-INF/java and /WEB-INF/groovy.

      Now, a quick test under jetty 6 reveals that this never nulls, even if the directories do not exist, jetty 7s behavior seems to be worse in this regard, although this is a bug on jettys side, a bypass and a warning is needed so that the NPE does not occur anymore even if the paths cannot be resolved.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        22h 15m 1 Werner Punz 25/Mar/10 14:49
        Resolved Resolved Closed Closed
        383d 18h 41m 1 Werner Punz 13/Apr/11 10:31
        Werner Punz made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Werner Punz added a comment -

        Ok the NPE was caused by a starting jetty via run instead of run-exploded and then not having alternative pickup paths set, I fixed the npe issue first by replacing it with a warning, along the lines another bug was in the variable resolver, a missing null check which nped orchestra in that area, fixed as well, the demo project bruno is working on, now is running perfectly with ext-scripting, full success.

        Show
        Werner Punz added a comment - Ok the NPE was caused by a starting jetty via run instead of run-exploded and then not having alternative pickup paths set, I fixed the npe issue first by replacing it with a warning, along the lines another bug was in the variable resolver, a missing null check which nped orchestra in that area, fixed as well, the demo project bruno is working on, now is running perfectly with ext-scripting, full success.
        Werner Punz made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.0-Beta-2 [ 12314862 ]
        Resolution Fixed [ 1 ]
        Hide
        Werner Punz added a comment -

        Not sure what bruno does, but a test against the deployment version of the current jetty 7 stable works here

        Show
        Werner Punz added a comment - Not sure what bruno does, but a test against the deployment version of the current jetty 7 stable works here
        Werner Punz created issue -

          People

          • Assignee:
            Werner Punz
            Reporter:
            Werner Punz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development