eclipse-ee4j / eclipse-ee4j/jersey

Nullpointer in ServerProcessingBinder

Open
#3,498 9 comments 0 reactions 0 assignees View on GitHub
exceptions Priority: Critical Type: Bug
Dominant language
Java
Stars
730
Forks
382
PR merge metrics
No merged PRs in 30d

Description

In a certain configuration, when a Factory is bound to a request scope, nullpointers occurs in ServerProcessingBinder.

I have tried to corner the issue, from what I have figured out, the nullpointer only occurred when the dependency jersey-media-json-jackson is in the classpath. If this dependency is not in the classpath, then all is fine. Moreover, If I use the same configuration, but if I use Tomcat instead of Grizzly, there are no problem at all.

I have created to test project to reproduce the problem: [https://github.com/amanteaux/jersey-test](https://github.com/amanteaux/jersey-test)
In this project, the only problem is the error log displayed. However, in some cases, Jersey also returns an error 500 response (though Jersey does execute the web-service). That is why I qualify this bug as critical: I cannot use Grizzly in production since all my web-services that are using a Context parameter are sometimes returning error 500 responses.

Here is a very small extract of the error log:
janv. 29, 2017 7:07:14 PM org.glassfish.jersey.internal.Errors logErrors
WARNING: The following warnings have been detected: WARNING: HK2 failure has been detected in a code that does not run in an active Jersey Error scope.
WARNING: Unknown HK2 failure detected:
MultiException stack 1 of 1
java.lang.NullPointerException
at org.glassfish.jersey.server.internal.process.ServerProcessingBinder$ContainerRequestFactory$1.transform(ServerProcessingBinder.java:154)
at org.glassfish.jersey.server.internal.process.ServerProcessingBinder$ContainerRequestFactory$1.transform(ServerProcessingBinder.java:151)
[...]
#### Affected Versions
[2.23.1, 2.25, 2.25.1]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.