Question

I am using Spring injection a REST servlet and it looks like something is going wrong with the injection. This is the error:

01/03/14 11:43:02:260 GMT] 0000001e ContainerResp E The RuntimeException could not be mapped to a response, re-throwing to the HTTP container java.lang.NullPointerException

Was it helpful?

Solution

You seem to have two problems, not sure which one affects you most.

  1. You're missing an ExceptionMapper that should map exception types on your backend to HTTP responses.

  2. You're getting a NullPointerException, regardless of the fact that the code runs within a REST container. Maybe if you look down to the stack trace of this NullPointerException, you can get a hint on what's going wrong.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top