2

Does anyone know if the Payflow Pro Gateway Java SDK will run on a 64 bit machine? (Specifically in ColdFusion CF9/10/11 if that makes any difference.)

The most recent version of the SDK is found here: http://paypal.github.io/sdk/#payflow-gateway

It is version Payflow_SDK_for_Java_v440.zip (version 4.4.0).

I am running successful transactions from my local machine with CF9. I know that my Java VM is 64 bit, as per this setting seen in CF9:

Java VM Name: Java HotSpot(TM) 64-Bit Server VM

But does this setting prove that the SDK is running fully on 64 bit? (My local machine is Window 7 with 32/64bit option, so it's hard for me to know for sure.)

The reason I ask is because I'm having trouble getting the SDK to work on a new Windows Server 2012.

Paypal says that the Java version requires Xerces Java Parser version 2.7.1 from Apache. I don't know what that is or if it's already on the server so that could be part of my problem. (I have no idea if it's on my local machine either.)

I have asked Paypal if it should work on 64 bit and they say no, but I doubt the competence of their front-line techs. (They are also telling me that the most recent version is 4.3 which of course is not true.)

Thank you!

James A Mohler
  • 11,060
  • 15
  • 46
  • 72
  • Specifically what kind of trouble? Posting some code and any error messages would help others to diagnose the issue. It does sounds like you are running CF 64bit. Though it should not make a difference unless maybe native libraries are involved. Regarding Xerces, it is bundled with most versions of CF. Try cfdumping the version, ie `createObject("Java", "org.apache.xerces.impl.Version").getVersion()`. If that does not work in CF9, check your `{cf_root}\lib` directory for a file name *like* xercesImpl.jar. You can check the manifest for the version number. – Leigh Mar 17 '16 at 18:11
  • Thanks Leigh. On my local machine I do have xercesImpl.jar. I'm not sure about on the server, I'll have to ask my host. – Billy Turtleneck Mar 17 '16 at 20:08
  • The trouble I am having on the new server is that the SDK simply does not work at all - doesn't even create the log file and no record in Paypal Manager. I can get more info but just realized I need to update my SSL cert before proceeding. Question: If my Java VM on my local machine is 64 bit, and if this Java SDK is working on my local machine, then does that mean that it works in 64 bit? (Or could it still somehow be running on 32 bit on my local machine?) – Billy Turtleneck Mar 17 '16 at 20:29
  • 1
    In the CF Admin you will be able to tell if you are running one or the other billy. Go to the settings summary page. – Mark A Kruger Mar 17 '16 at 20:35
  • @BillyTurtleneck - See also [Determine CF bitness](http://stackoverflow.com/questions/12187612/how-to-determine-the-installed-coldfusion-bitness). As long as you have `createObject` access, you *should* be able to check the xerces version programatically (try the code snippet above). You only need to check the physical jar file if that method does not work under CF9 for some reason. After you update the certs, try it again and be sure to check *all* of the CF log files (usually two locations). Reason being certain types of exceptions may not be displayed on screen, only in the logs. – Leigh Mar 17 '16 at 21:03
  • .. I know you said it does not create a log, but ... I was not sure which log file(s) you were referring to or if you have checked both of the usual CF log directories. – Leigh Mar 17 '16 at 21:21
  • 1
    I'm wondering why are you using the Java gateway? I think that is from 2007 or so and very outdated. For prerequisites it lists Xerces Java Parser version 2.7.1 from Apache which is from 2007 and Java 1.4 and that is long dead. Today all you need to access the PayPal API is over SSL. The caveats there is that with TLS1.0 is dropping off soon, only CF10u18 on Java 1.8, ColdFusion 11 on Java 1.8 or ColdFusion2016 on Java 1.8 will handle TLS1.1 or TLS1.2. – WilGeno Mar 17 '16 at 21:40
  • @WilGeno - Yes, you are definitely right about that. We're just in a situation where it may be faster and cheaper to temporarily use our old Java SDK. (It was last updated in 2009.) Going forward we'll definitely be using a newer method. – Billy Turtleneck Mar 18 '16 at 15:28
  • @MarkAKruger - Yes, I have confirmed on my local machine (CF9) that it is the 64 bit version of Java VM. And it is working fine on my local machine. – Billy Turtleneck Mar 18 '16 at 15:30
  • @Leigh - The log file that is not being created is the Paypal log file. I'm sure some of the CF log files have entries, but I don't have direct access to those on the hosted server (I'd have to ask my host for help). – Billy Turtleneck Mar 18 '16 at 15:31
  • @All - I know this is probably a dumb question, but I'll ask again because I don't know much about how Java works in CF, and how an SDK might work on a 32/64 machine, etc: If the SDK is working fine on my local CF9 machine, which is running 64 Bit Java VM, then does that prove that the SDK works in 64 bit? Or is there some way it might be "circumventing" the 64-bit and somehow running in 32 bit? (Because my local machine is Win 7 with 32/64 options.) I just want to know if I can definitively say "Yes, this proves that the SDK can work on 64 bit machines". – Billy Turtleneck Mar 18 '16 at 15:38
  • *I don't have direct access to those* @BillyTurtleneck - Yes, I figured. 1) Try setting up a test app and implement an Application.cfc/OnError method to trap them. AFAIK, that is [the only way to trap Errors (not the same as your typical Exception)](http://stackoverflow.com/questions/14237283/coldfusion-not-catching-noclassdeffounderror/14243560#14243560). 2) Also, are you running the same version of CF as your host using? Dump the specs and compare them . 3) Do you have access to createObject to check the xerces version on the hosted server? – Leigh Mar 18 '16 at 15:44
  • @BillyTurtleneck - Well, in theory java is supposed to be platform independent. So typically jars are not 32/64bit specific. An exception would be if it [uses native libraries](http://stackoverflow.com/questions/18713591/how-can-i-tell-if-a-jar-was-compiled-on-a-64bit-or-32bit-system). I am guessing this one does not (plus you are using a 64bit JVM) but I cannot say with 100% certainty... – Leigh Mar 18 '16 at 16:26
  • Finally got a response from Paypal: "Payflow_SDK_for_Java_v440 should have been compiled with 64-bit Java and it works fine in 64-bit server. Actually, it's not officially released yet, but you can use it ." Ha ha. If it's not officially released yet, then why is it the only version found on their website? And when are they going to "officially release" this thing that was last updated in 2009? – Billy Turtleneck Mar 22 '16 at 13:52
  • That is a heck of a long time ;-) Since it sounds like you got an answer to your original question, you should post it as an official "answer". – Leigh Apr 04 '16 at 14:57
  • Yes, all the responses were helpful. Do I need to do something to mark this question "answered" / "closed"? – Billy Turtleneck Apr 05 '16 at 17:47
  • @BillyTurtleneck - Just noticed your last comment. (S.O. does not automatically notify about new comments unless you use @ + username.). To mark the thread as closed, someone needs to post the solution as an "answer". You can then accept an answer by clicking the green check mark next to it. Sounds like you found the "official answer" to the question in your dealings with PayPal, so go ahead an post it. (Answering your own question is allowed on S.O.) – Leigh May 12 '16 at 00:45

1 Answers1

2

We installed the Payflow java SDK a few weeks ago on an amd64 Windows Server 2012 R2 and it works great.

And we also got responses from PayPal saying that it should work in 64 bit, and that v4.4 is current and supported.

So that answers the question. Yes, it will work in 64 bit!

PS Anyone developing new PayPal integration on ColdFusion should probably use CFHTTP method instead as @WilGeno mentioned.

Thanks to @Leigh for all his help!