You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With all latest jar files and JDK, getting below error, that has no clue to fix:
Exception in thread "main" java.lang.NullPointerException
at com.twitter.clientlib.model.TweetCreateRequest$ReplySettingsEnum$Adapter.write(TweetCreateRequest.java:129)
at com.twitter.clientlib.model.TweetCreateRequest$ReplySettingsEnum$Adapter.write(TweetCreateRequest.java:126)
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:68)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(ReflectiveTypeAdapterFactory.java:99)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(ReflectiveTypeAdapterFactory.java:219)
at com.google.gson.TypeAdapter.toJsonTree(TypeAdapter.java:230)
at com.twitter.clientlib.model.TweetCreateRequest$CustomTypeAdapterFactory$1.write(TweetCreateRequest.java:492)
at com.twitter.clientlib.model.TweetCreateRequest$CustomTypeAdapterFactory$1.write(TweetCreateRequest.java:489)
at com.google.gson.TypeAdapter$1.write(TypeAdapter.java:191)
at com.google.gson.Gson.toJson(Gson.java:600)
at com.google.gson.Gson.toJson(Gson.java:579)
at com.google.gson.Gson.toJson(Gson.java:534)
at com.google.gson.Gson.toJson(Gson.java:514)
at com.twitter.clientlib.JSON.serialize(JSON.java:958)
at com.twitter.clientlib.ApiClient.serialize(ApiClient.java:993)
at com.twitter.clientlib.ApiClient.buildRequest(ApiClient.java:1269)
at com.twitter.clientlib.ApiClient.buildCall(ApiClient.java:1222)
at com.twitter.clientlib.api.TweetsApi.createTweetCall(TweetsApi.java:308)
at com.twitter.clientlib.api.TweetsApi.createTweetValidateBeforeCall(TweetsApi.java:320)
at com.twitter.clientlib.api.TweetsApi.createTweetWithHttpInfo(TweetsApi.java:327)
at com.twitter.clientlib.api.TweetsApi.access$500(TweetsApi.java:89)
at com.twitter.clientlib.api.TweetsApi$APIcreateTweetRequest.execute(TweetsApi.java:383)
at com.veer.social.twitter.test.TwitterTestPost1.main(TwitterTestPost1.java:42)
Steps to reproduce the behavior
Just run that code and it gives the above error.
Please help me out.
The text was updated successfully, but these errors were encountered:
As per this code to post a tweet https://github.com/twitterdev/twitter-api-java-sdk/blob/main/docs/TweetsApi.md#createTweet, it is throwing a NullPointer error.
Expected behavior
A given text should be created or posted.
Actual behavior
With all latest jar files and JDK, getting below error, that has no clue to fix:
Steps to reproduce the behavior
Just run that code and it gives the above error.
Please help me out.
The text was updated successfully, but these errors were encountered: