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

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top