YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

Cannot redirect to the sandbox account Options
rajshkhr
#1 Posted : Monday, October 26, 2009 11:31:06 AM
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?
Sponsor  
 
nds_webdesign
#2 Posted : Monday, October 26, 2009 8:23:39 PM
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.


rajshkhr.pandey
#3 Posted : Thursday, October 29, 2009 4:45:38 AM
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
rajshkhr.pandey
#4 Posted : Saturday, October 31, 2009 5:04:46 AM
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
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFVision Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF | YAF © 2003-2009, Yet Another Forum.NET
This page was generated in 0.264 seconds.