{"action":"closed","issue":{"url":"https://api.github.com/repos/paypal/PayPal-Java-SDK/issues/169","repository_url":"https://api.github.com/repos/paypal/PayPal-Java-SDK","labels_url":"https://api.github.com/repos/paypal/PayPal-Java-SDK/issues/169/labels{/name}","comments_url":"https://api.github.com/repos/paypal/PayPal-Java-SDK/issues/169/comments","events_url":"https://api.github.com/repos/paypal/PayPal-Java-SDK/issues/169/events","html_url":"https://github.com/paypal/PayPal-Java-SDK/issues/169","id":154090258,"number":169,"title":"invoice.create(accessToken) issue","user":{"login":"marc0w","id":5818157,"avatar_url":"https://avatars.githubusercontent.com/u/5818157?v=3","gravatar_id":"","url":"https://api.github.com/users/marc0w","html_url":"https://github.com/marc0w","followers_url":"https://api.github.com/users/marc0w/followers","following_url":"https://api.github.com/users/marc0w/following{/other_user}","gists_url":"https://api.github.com/users/marc0w/gists{/gist_id}","starred_url":"https://api.github.com/users/marc0w/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marc0w/subscriptions","organizations_url":"https://api.github.com/users/marc0w/orgs","repos_url":"https://api.github.com/users/marc0w/repos","events_url":"https://api.github.com/users/marc0w/events{/privacy}","received_events_url":"https://api.github.com/users/marc0w/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-10T19:44:21Z","updated_at":"2016-05-10T20:07:12Z","closed_at":"2016-05-10T20:07:12Z","body":"I have a problem with the create() method of the sample. I call create() like this\r\n\r\n\t\tMap<String, String> map = new HashMap<String, String>();\r\n\t\tmap.put(\"mode\", \"sandbox\");\r\n\t\tmap.put(\"acct1.UserName\", \"paypal-facilitator_api1.[REPLACED].com\"); \r\n\t\tmap.put(\"acct1.Password\", \"[REPLACED]\");\r\n\t\tmap.put(\"acct1.Signature\", \"[REPLACED]\");\r\n\t\tmap.put(\"acct1.AppId\", \"APP-80W284485P519543T\");\r\n\t\ttry {\r\n\t\t\taccessToken = new OAuthTokenCredential(\"[REPLACED]\", \"[REPLACED]\", map).getAccessToken();\r\n\t\t} catch (PayPalRESTException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tSystem.out.println(accessToken);\r\n\t\tInvoiceSample invoiceSample = new InvoiceSample();\r\n\t\tInvoice invoice = invoiceSample.create();\r\n\r\nMy accessToken starts like this : \r\n\r\n> Bearer A101....\r\n\r\nWhat am i doing wrong? I use the json file of the sample folder. I get the following exception:\r\n\r\n> response-code: 0\tdetails: null\r\n> \tat com.paypal.base.rest.PayPalResource.execute(PayPalResource.java:441)\r\n> \tat com.paypal.base.rest.PayPalResource.configureAndExecute(PayPalResource.java:267)\r\n> \tat com.paypal.api.payments.Invoice.create(Invoice.java:547)\r\n> \tat com.paypal.api.payments.Invoice.create(Invoice.java:523)\r\n> \tat de.ernst.main.InvoiceSample.create(InvoiceSample.java:79)\r\n> \tat de.ernst.main.InvoiceSample.main(InvoiceSample.java:48)\r\n> Caused by: java.net.MalformedURLException\r\n> \tat java.net.URL.<init>(Unknown Source)\r\n> \tat java.net.URL.<init>(Unknown Source)\r\n> \tat java.net.URL.<init>(Unknown Source)\r\n> \tat com.paypal.base.DefaultHttpConnection.createAndconfigureHttpConnection(DefaultHttpConnection.java:59)\r\n> \tat com.paypal.base.rest.PayPalResource.execute(PayPalResource.java:406)\r\n> \t... 5 more\r\n> Caused by: java.lang.NullPointerException\r\n> \t... 10 more"}}