A couple weeks ago on our production server, we started getting this Java stack trace error out of the blue when trying to post CIM transactions from our web application:
12:55:55,543 ERROR HttpClient:268 - HttpClient execution failed java.lang.NullPointerException at net.authorize.cim.Transaction.addExtraOptions(Transaction.java:673) at net.authorize.cim.Transaction.createCustomerProfileTransaction(Transaction.java:951) at net.authorize.cim.Transaction.toXMLString(Transaction.java:719) at net.authorize.util.HttpClient.createHttpPost(HttpClient.java:69) at net.authorize.util.HttpClient.executeXML(HttpClient.java:200) at net.authorize.Merchant.postTransaction(Merchant.java:295)
Does anyone know where I can find the source code for the net.authorize.cim.Transaction class to figure out why this error is occurring? Or does anyone have any insight into why I might be getting a "HttpClient execution failed" message?
Thanks!
Solved! Go to Solution.
03-25-2013 10:37 AM
Thanks for the reply. Unfortunately, source code does not seem to be available for Java there -- only the compiled Java classes are in the JAR file that can be downloaded via the link. (C# seems to be the only language that has source code available?)
I'm still interested in obtaining the source code. However, on a brighter note, posting here caused me to look at an obvious part of the stack trace that I had ignored: specifically, the line related to "extra options". The only extra option I was setting was the client IP address: "ip_address".
net.authorize.cim.Transaction cimTransaction = merchant.createCIMTransaction(TransactionType.CREATE_CUSTOMER_PROFILE_TRANSACTION); ... cimTransaction.addExtraOption("ip_address", s_clientIpAddress); ... Result<net.authorize.Transaction> cimResult = (Result<net.authorize.Transaction>) merchant.postTransaction(cimTransaction);
Commenting out the line where I set the IP address information succeeded in solving my issue. I have no idea why, and I have no idea why that code would have suddenly stopped working.
03-25-2013 10:58 AM
source code
03-25-2013 10:52 AM
Thanks for the reply. Unfortunately, source code does not seem to be available for Java there -- only the compiled Java classes are in the JAR file that can be downloaded via the link. (C# seems to be the only language that has source code available?)
I'm still interested in obtaining the source code. However, on a brighter note, posting here caused me to look at an obvious part of the stack trace that I had ignored: specifically, the line related to "extra options". The only extra option I was setting was the client IP address: "ip_address".
net.authorize.cim.Transaction cimTransaction = merchant.createCIMTransaction(TransactionType.CREATE_CUSTOMER_PROFILE_TRANSACTION); ... cimTransaction.addExtraOption("ip_address", s_clientIpAddress); ... Result<net.authorize.Transaction> cimResult = (Result<net.authorize.Transaction>) merchant.postTransaction(cimTransaction);
Commenting out the line where I set the IP address information succeeded in solving my issue. I have no idea why, and I have no idea why that code would have suddenly stopped working.
03-25-2013 10:58 AM
anet_java_sdk-1.4.6.zip\anet_java_sdk\src\main\java\net\authorize\cim\Transaction.java
s_clientIpAddress is probably NULL.
03-25-2013 11:13 AM