The NPE originates from org.glassfish.jersey.internal.util.ReflectionHelper#getParameterizedTypeArguments, line 768 (ClassTypePair is null) when calling get(InvocationCallback) on an AsyncInvoker.
I have a concrete class implementing InvocationCallback, that is itself generic. When trying to infer the parameterized type arguments, the actual type argument is a TypeVariable. Both p.concreteClass and p.declaringClass are my generic, concrete class.
While I understand why it needs the generic type (there should probably be a get(InvocationCallback<T>, Class<T>) overload) and why it fails, I believe it should better handle the error.
FYI, my generic concrete implementation is a bridge between JAX-RS 2 and a promise-like API (also think Guava's ListenableFuture). The class is both an InvocationCallback<V> for its JAX-RS facet, and a Promise<V>. The way I create an instance of my InvocationCallbackPromise doesn't currently allow subclassing (final class with create() static factory) that would engrave the type arguments in the type; so I'll have to change my API to allow subclassing, similar to GenericType; not ideal in my book, but I can live with that.