General error pages (Servlet 3.0) not working on pax-web ver 3.0+

Description

I am trying to deploy a WAB that contains a general error page in its web.xml and I noticed that the pax-web-extender-war is blowing up with a null pointer exception.

my web.xml snippet:
<error-page>
<location>/ErrorServlet</location>
</error-page>

relevant pax web code:
https://github.com/ops4j/org.ops4j.pax.web/blob/web-4.1.0/pax-web-extender-war/src/main/java/org/ops4j/pax/web/extender/war/internal/model/WebApp.java#L480-L484

relevant snippet from servlet 3.0 xsd:
<xsd:sequence>
<xsd:choice minOccurs="0"
maxOccurs="1">
<xsd:element name="error-code"
type="javaee:error-codeType"/>
<xsd:element name="exception-type"
type="javaee:fully-qualified-classType">
<xsd:annotation>
<xsd:documentation>

The exception-type contains a fully qualified class
name of a Java exception type.

</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:choice>
<xsd:element name="location"
type="javaee:war-pathType">
<xsd:annotation>
<xsd:documentation>

The location element contains the location of the
resource in the web application relative to the root of
the web application. The value of the location must have
a leading `/'.

</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>

(Note the minOccurs. Also if you look at Jetty's code, they check for this condition to set up a general error page.)

It seems to be checking for the existence of an error code or exception type. However, in Servlet 3.0 neither of these are necessary.

Environment

None

Status

Assignee

Achim Nierbeck

Reporter

Scott Tustison

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure