Jersey on WebSphere issue

I was just starting creating Jersey RESTful services on WebSphere 8.5 and came across an error.

[3/31/15 14:27:01:231 IST] 00000065 webapp        E logServletError SRVE0293E: [Servlet Error]-[app.FirstRestApplication]: java.lang.NullPointerException
at org.apache.wink.common.internal.http.Accept.valueOf(
at org.apache.wink.server.internal.contexts.HttpHeadersImpl.getAcceptHeader(
at org.apache.wink.server.internal.contexts.HttpHeadersImpl.getAcceptableMediaTypes(

The issue arises out of the fact that WebSphere ships with Apache Wink as default implementation of JAX-RS and your application picks up Wink from the class path instead of routing to Jersey causing this unexpected behavior.

The solution

Just apply Fix Pack 4 (or 5) and you’re done which detects the applications shipping with other JAX-RS implementations and allows it. A link to IBM note on this is


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s