Uploaded image for project: 'Pax Web'
  1. Pax Web
  2. PAXWEB-328

DOMWebXmlParser fails if jsp-file is used

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.1
    • Fix Version/s: 1.1.2, 2.0.0
    • Component/s: War Extender
    • Labels:
      None
    • Environment:
      any

      Description

      If the web.xml defines a servet to point to a JSP file instead of a servlet-class, parsing fails with a NullPointerException, since servlet-class is expected and fails on setting in WebAppServlet.
      Definition in web.xml:
      <servlet>
      <servlet-name>Thread</servlet-name>
      <jsp-file>/jsp/thread.jsp</jsp-file>
      </servlet>

      leads to:
      org.ops4j.lang.NullArgumentException: Servlet class is null.
      at org.ops4j.lang.NullArgumentException.validateNotNull(NullArgumentException.java:75)
      at org.ops4j.pax.web.extender.war.internal.model.WebAppServlet.setServletClass(WebAppServlet.java:115)
      at org.ops4j.pax.web.extender.war.internal.parser.dom.DOMWebXmlParser.parseServlets(DOMWebXmlParser.java:284)
      at org.ops4j.pax.web.extender.war.internal.parser.dom.DOMWebXmlParser.parse(DOMWebXmlParser.java:76)
      at org.jboss.osgi.webapp.internal.WebXMLParserInterceptor.createWebAppMetadata(WebXMLParserInterceptor.java:82)
      at org.jboss.osgi.webapp.internal.WebXMLParserInterceptor.invoke(WebXMLParserInterceptor.java:66)

        Gliffy Diagrams

          Activity

          Hide
          achim_nierbeck Achim Nierbeck added a comment -

          ok, this is a specialty of servlet 2.5 which is missing right now

          Show
          achim_nierbeck Achim Nierbeck added a comment - ok, this is a specialty of servlet 2.5 which is missing right now
          Hide
          achim_nierbeck Achim Nierbeck added a comment -

          ok, did some investigation. This one is not trivial
          Unfortunately I guess I just can go and ignore those jsp-files for the 1.1.x line.
          For the 2.0 I have more freedom in changing

          Show
          achim_nierbeck Achim Nierbeck added a comment - ok, did some investigation. This one is not trivial Unfortunately I guess I just can go and ignore those jsp-files for the 1.1.x line. For the 2.0 I have more freedom in changing
          Hide
          mreasy Rico Neubauer added a comment -

          OK - btw. this has nothing to do with Servlet 2.5, jsp-file is available for a long time (since 1.0?).

          Show
          mreasy Rico Neubauer added a comment - OK - btw. this has nothing to do with Servlet 2.5, jsp-file is available for a long time (since 1.0?).
          Hide
          achim_nierbeck Achim Nierbeck added a comment -

          ok, my fault then regarding 2.5 I tried to find out when it was introduced and somehow I had the impression it was 2.5, but never the less it was missing since then then

          Show
          achim_nierbeck Achim Nierbeck added a comment - ok, my fault then regarding 2.5 I tried to find out when it was introduced and somehow I had the impression it was 2.5, but never the less it was missing since then then
          Hide
          achim_nierbeck Achim Nierbeck added a comment -

          fix in 2.0.0:
          Commit: ccbecc99f0814e0ace0e55b9101b2f61dbfee238
          https://github.com/ops4j/org.ops4j.pax.web/commit/ccbecc99f0814e0ace0e55b9101b2f61dbfee238

          fix in 1.1.2:
          Commit: 93c2dd4b8914abb017f0bda643e8b1dee07671ac
          https://github.com/ops4j/org.ops4j.pax.web/commit/93c2dd4b8914abb017f0bda643e8b1dee07671ac

          Show
          achim_nierbeck Achim Nierbeck added a comment - fix in 2.0.0: Commit: ccbecc99f0814e0ace0e55b9101b2f61dbfee238 https://github.com/ops4j/org.ops4j.pax.web/commit/ccbecc99f0814e0ace0e55b9101b2f61dbfee238 fix in 1.1.2: Commit: 93c2dd4b8914abb017f0bda643e8b1dee07671ac https://github.com/ops4j/org.ops4j.pax.web/commit/93c2dd4b8914abb017f0bda643e8b1dee07671ac

            People

            • Assignee:
              achim_nierbeck Achim Nierbeck
              Reporter:
              mreasy Rico Neubauer
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development