question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NullPointerException, StdDeserializer

See original GitHub issue

Using 'com.auth0:auth0:1.3.0' java 1.8.0_111

Failing Test:

import org.junit.Test;

import com.auth0.client.mgmt.ManagementAPI;
import com.auth0.client.mgmt.filter.UserFilter;
import com.auth0.exception.Auth0Exception;
import com.auth0.json.mgmt.users.UsersPage;
import com.auth0.net.Request;

public class Auth0Test {
    @Test
    public void auth0DoesNotFail() throws Auth0Exception {
        ManagementAPI managementApi = new ManagementAPI("jivecake.auth0.com", "TOKEN_OBSCURED");
        UserFilter filter = new UserFilter();
        filter.withQuery("email:\"email@email.com\"");

        Request<UsersPage> request = managementApi.users().list(filter);
        request.execute().getItems();
    }
}

Stack trace:

java.lang.NullPointerException
	at com.fasterxml.jackson.databind.deser.std.StdDeserializer.<init>(StdDeserializer.java:66)
	at com.auth0.json.mgmt.users.UsersPageDeserializer.<init>(UsersPageDeserializer.java:18)
	at com.auth0.json.mgmt.users.UsersPageDeserializer.<init>(UsersPageDeserializer.java:22)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at com.fasterxml.jackson.databind.util.ClassUtil.createInstance(ClassUtil.java:556)
	at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.deserializerInstance(DefaultDeserializationContext.java:229)
	at com.fasterxml.jackson.databind.deser.DeserializerCache.findDeserializerFromAnnotation(DeserializerCache.java:427)
	at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:326)
	at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:264)
	at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244)
	at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:142)
	at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:477)
	at com.fasterxml.jackson.databind.ObjectMapper._findRootDeserializer(ObjectMapper.java:4179)
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3997)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3011)
	at com.auth0.net.CustomRequest.parseResponse(CustomRequest.java:62)
	at com.auth0.net.BaseRequest.execute(BaseRequest.java:37)
	at Auth0Test.auth0DoesNotFail(Auth0Test.java:17)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
lbalmacedacommented, Nov 1, 2017

I’ve just released a patch, should be already available on bintray and in a few hours on maven central.

1reaction
LuisSaybecommented, Nov 1, 2017

Have the PR here

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring Data Rest POST raising NullPointerException at ...
I'm tried to add jackson in various version to classpath, but with same error. Spring version: 4.0.4.RELEASE Spring Data JPA: 1.5.1.RELEASE Spring Data...
Read more >
Error deserializing json array nullpointer exception
The [] in your JSON won't work. The parser would try to map this to an apex variable named pay_names[] . This is...
Read more >
jackson-mapper-asl-1.6.3.jar
NullPointerException java.lang.Number java.lang.Object ... StdDeserializer$AtomicReferenceDeserializer ... StdDeserializer$PrimitiveOrWrapperDeserializer.
Read more >
Policy Studio Exceptions During Initial Connection To Admin ...
When Policy Studio is used to connect to the Admin Node Manager from Oracle API Gateway (OAG) 11.1.2.3.0, many exceptions get logged, and...
Read more >
Trying to deserialize a json array using a Jackson custom ...
I am getting a null pointer exception when trying to run the program. ... class ContactsCustomDeserializer extends StdDeserializer<Contacts> ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found