|
|
|
Rank: Starting Member
Groups: Registered
Joined: 10/26/2009 Posts: 1
|
Hello to all, I have developed a application in which I have integrated paypal API While redireting to the paypal's sandbox account I get the following error Code: java.lang.NullPointerException at com.paypal.sdk.core.APICallerBase.getEndpointUrl(Unknown Source) at com.paypal.sdk.core.nvp.NVPAPICaller.setupConnection(Unknown Source) at com.paypal.sdk.services.NVPCallerServices.setAPIProfile(Unknown Sourc e) at com.nvp.codegenerator.ECSetExpressCheckout.ECSetExpressCheckoutCode(E CSetExpressCheckout.java:48) at org.dspace.app.webui.myServlet.myCheckOut.doGet(myCheckOut.java:22) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j ava:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j ava:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal ve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav a:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java :844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce ss(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44 7) at java.lang.Thread.run(Unknown Source)
I cannot understand what it is and how to come out of this?
|
|
|
|
|
|
|
|
|
Rank: Junior Member
Groups: Registered
Joined: 10/15/2009 Posts: 159 Location: Omaha, NE USA
|
Your code is referencing these: APICallerBase NVPAPICaller NVPCallerServices Probably creating objects using them: Example: NVPAPICaller MyNewCaller = new NVPAPICaller; but that class is not available in the directory, so It can't locate it, giving it a "Null Pointer Exception". I would suggest checking out the files in the SDK, and seeing which ones you left out that contain those Classes.
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 10/29/2009 Posts: 2 Location: Ahmedabad, Gujarat, India
|
nds_webdesign wrote:Your code is referencing these: APICallerBase NVPAPICaller NVPCallerServices Probably creating objects using them: Example: NVPAPICaller MyNewCaller = new NVPAPICaller;
but that class is not available in the directory, so It can't locate it, giving it a "Null Pointer Exception".
I would suggest checking out the files in the SDK, and seeing which ones you left out that contain those Classes.
Thanks for your reply. I have written my checkout code in the same directory hierarchy, while from my servlet when I call me setCheckOut code my servlet gets it, in which I have written the code Code: NVPCallerServices caller = new NVPCallerServices(); //credential Settings profile.setEnvironment("sandbox"); profile.setSubject("ABCD"); caller.setAPIProfile(profile);
the last line is Line no 48 in ECDoSetExpressCheckOut.java where the problem is found. Thanks
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 10/29/2009 Posts: 2 Location: Ahmedabad, Gujarat, India
|
When I print the value of "profile" which is the object of APIProfile it does not prints null in my ECSetExpressCheckOut.java Also I have traced that which file is missing but I found that all files are reachable from my class file. I cant understand what is missing Please Help me
|
|
|
|
Guest
|
YAFVision Theme by Jaben Cargman (Tiny Gecko)Powered by YAF |
YAF © 2003-2009, Yet Another Forum.NETThis page was generated in 0.264 seconds.