Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEC-2084: NullPointerException for intercept-url without specified method #2317

spring-issuemaster opened this issue Nov 25, 2012 · 1 comment


None yet
2 participants
Copy link

commented Nov 25, 2012

Mattias Severson (Migrated from SEC-2084) said:

There is a NullPointerException when Spring Security attempts to find which Http methods that are allowed for a resource whose intercept-url does not have any specific method.

Unzip the provided project

Execute "mvn jetty:run"

Navigate to http://localhost:8080/application.wadl in a browser

Enter the credentials "user" / "secret"

Expected result:

A generated wadl file such as the provided application.3.0.7.wadl (see the root folder of the attached .zip file).

Actual result:

java.lang.NullPointerException: Name is null
at java.lang.Enum.valueOf(
at org.springframework.http.HttpMethod.valueOf(
at com.sun.jersey.server.wadl.WadlBuilder.generateResource(
at com.sun.jersey.server.wadl.WadlBuilder.generateResource(
at com.sun.jersey.server.wadl.WadlBuilder.generate(
at com.sun.jersey.server.impl.wadl.WadlApplicationContextImpl.getApplication(
at com.sun.jersey.server.impl.wadl.WadlApplicationContextInjectionProxy.getApplication(
at com.sun.jersey.server.impl.wadl.WadlResource.getWadl(


The above steps work in the 3.0.7 version of Spring Security. Simply

Change the in the pom.xml to 3.0.7.RELEASE

Update the spring security schema location in the securityContext.xml to

Visit http://localhost:8080/application.wadl (log in using the credentials above)

The result is the application.3.0.7.wadl file in the root folder of the attached zip file

The NPE may (or may not) be another manifestation of the issue that was reported in ?


This comment has been minimized.

Copy link

commented Dec 3, 2012

Rob Winch said:

Thank you for the bug submission. The issue was related to updates that occurred in 3.1 in how the DefaultFilterInvocationSecurityMetadataSource resolved the ConfigAttributes and the fact that WADLGenerator uses DefaultWebInvocationPrivilegeEvaluator.isAllowed(String,Authentication) directly.

A fix has been pushed to master and to the 3.1.x branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.