{"action":"created","issue":{"url":"https://api.github.com/repos/paypal/PayPal-Java-SDK/issues/245","repository_url":"https://api.github.com/repos/paypal/PayPal-Java-SDK","labels_url":"https://api.github.com/repos/paypal/PayPal-Java-SDK/issues/245/labels{/name}","comments_url":"https://api.github.com/repos/paypal/PayPal-Java-SDK/issues/245/comments","events_url":"https://api.github.com/repos/paypal/PayPal-Java-SDK/issues/245/events","html_url":"https://github.com/paypal/PayPal-Java-SDK/issues/245","id":177138470,"number":245,"title":"NullPointerException at ApiContext call","user":{"login":"karanvs","id":16079930,"avatar_url":"https://avatars.githubusercontent.com/u/16079930?v=3","gravatar_id":"","url":"https://api.github.com/users/karanvs","html_url":"https://github.com/karanvs","followers_url":"https://api.github.com/users/karanvs/followers","following_url":"https://api.github.com/users/karanvs/following{/other_user}","gists_url":"https://api.github.com/users/karanvs/gists{/gist_id}","starred_url":"https://api.github.com/users/karanvs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karanvs/subscriptions","organizations_url":"https://api.github.com/users/karanvs/orgs","repos_url":"https://api.github.com/users/karanvs/repos","events_url":"https://api.github.com/users/karanvs/events{/privacy}","received_events_url":"https://api.github.com/users/karanvs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-15T10:11:37Z","updated_at":"2016-09-15T20:35:11Z","closed_at":null,"body":"### General Information\r\n\r\n- Mode (Sandbox/Live):Sanbox\r\n- PayPal-Debug-ID(s) (from any logs):  not getting any such id\r\n- Version of Java used: 7\r\n- SDK Version: I am using following dependency in my code, compile 'com.paypal.sdk:rest-api-sdk:+',\r\nI am using this in Android.\r\n\r\n### Issue Description\r\n\r\nGetting NullPointerException at the call:\r\n\r\n  APIContext context = new APIContext(clientId, clientSecret, \"sandbox\");\r\n\r\nhere is my log details:\r\n\r\n Caused by: java.lang.NullPointerException: Attempt to get length of null array\r\n                                                                                       at org.apache.logging.log4j.util.ReflectionUtil$PrivateSecurityManager.getCallerClass(ReflectionUtil.java:301)\r\n                                                                                       at org.apache.logging.log4j.util.ReflectionUtil.getCallerClass(ReflectionUtil.java:214)\r\n                                                                                       at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:42)\r\n                                                                                       at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:42)\r\n                                                                                       at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:29)\r\n                                                                                       at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358)\r\n                                                                                       at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)\r\n                                                                                       at com.paypal.base.rest.OAuthTokenCredential.<clinit>(OAuthTokenCredential.java:36)\r\n                                                                                       at com.paypal.base.rest.APIContext.<init>(APIContext.java:78) \r\n                                                                                       at com.paypal.base.rest.APIContext.<init>(APIContext.java:66) \r\n\r\n\r\n> Please include as many details (logs, steps to reproduce, frameworks/dependencies) as you can to help us reproduce this issue faster.\r\n"},"comment":{"url":"https://api.github.com/repos/paypal/PayPal-Java-SDK/issues/comments/247447294","html_url":"https://github.com/paypal/PayPal-Java-SDK/issues/245#issuecomment-247447294","issue_url":"https://api.github.com/repos/paypal/PayPal-Java-SDK/issues/245","id":247447294,"user":{"login":"jaypatel512","id":1309895,"avatar_url":"https://avatars.githubusercontent.com/u/1309895?v=3","gravatar_id":"","url":"https://api.github.com/users/jaypatel512","html_url":"https://github.com/jaypatel512","followers_url":"https://api.github.com/users/jaypatel512/followers","following_url":"https://api.github.com/users/jaypatel512/following{/other_user}","gists_url":"https://api.github.com/users/jaypatel512/gists{/gist_id}","starred_url":"https://api.github.com/users/jaypatel512/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaypatel512/subscriptions","organizations_url":"https://api.github.com/users/jaypatel512/orgs","repos_url":"https://api.github.com/users/jaypatel512/repos","events_url":"https://api.github.com/users/jaypatel512/events{/privacy}","received_events_url":"https://api.github.com/users/jaypatel512/received_events","type":"User","site_admin":false},"created_at":"2016-09-15T20:35:11Z","updated_at":"2016-09-15T20:35:11Z","body":"From the looks of it, it feels like you are missing logging dependency. \r\n\r\nCan you add below dependencies or other logger adapter as per your project configuration:\r\n\r\n```gradle\r\n    dependencies {\r\n        compile 'log4j:log4j:1.2.14'\r\n        compile 'org.apache.logging.log4j:log4j-api:2.1'\r\n        compile 'org.apache.logging.log4j:log4j-core:2.1'\r\n    }\r\n```"}}
{"actor":{"display_login":"jaypatel512"}}