diff --git a/core-jaxrs/src/main/java/org/keycloak/SkeletonKeyContextResolver.java b/core-jaxrs/src/main/java/org/keycloak/SkeletonKeyContextResolver.java index 01aafd6e78..8c99cad92a 100755 --- a/core-jaxrs/src/main/java/org/keycloak/SkeletonKeyContextResolver.java +++ b/core-jaxrs/src/main/java/org/keycloak/SkeletonKeyContextResolver.java @@ -31,7 +31,7 @@ public class SkeletonKeyContextResolver implements ContextResolver @Override public ObjectMapper getContext(Class type) { - if (type.getPackage().getName().startsWith(getClass().getPackage().getName())) return mapper; + if (type.getPackage() != null && type.getPackage().getName().startsWith(getClass().getPackage().getName())) return mapper; return null; } }