Mysterious failure to write to Quickbooks using QB

2019-09-17 12:11发布

问题:

I'm writing a web application using the Google App Engine, and I'm attempting to save some data in Quickbooks, using the Quickbooks Java SDK. I'm getting an exception that I know nothing about when I try to add a customer:

java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key request.source.header
at java.util.ResourceBundle.getObject(ResourceBundle.java:395)
at java.util.ResourceBundle.getString(ResourceBundle.java:355)
at com.intuit.ipp.util.PropertyHelper.init(PropertyHelper.java:60)
at com.intuit.ipp.util.PropertyHelper.getInstance(PropertyHelper.java:44)
at com.intuit.ipp.interceptors.ConnectionInterceptor.populateRequestHeaders(ConnectionInterceptor.java:187)
at com.intuit.ipp.interceptors.ConnectionInterceptor.execute(ConnectionInterceptor.java:137)
at com.intuit.ipp.interceptors.IntuitInterceptorProvider.executeRequestInterceptors(IntuitInterceptorProvider.java:76)
at com.intuit.ipp.interceptors.IntuitInterceptorProvider.executeInterceptors(IntuitInterceptorProvider.java:62)
at com.intuit.ipp.services.DataService.add(DataService.java:108)

This is on the deployed version of the app. When I run the app locally on my own machine, the exception differs:

java.lang.NullPointerException
at com.intuit.ipp.interceptors.ConnectionInterceptor.getRetryHandler(ConnectionInterceptor.java:212)
at com.intuit.ipp.interceptors.ConnectionInterceptor.execute(ConnectionInterceptor.java:85)
at com.intuit.ipp.interceptors.IntuitInterceptorProvider.executeRequestInterceptors(IntuitInterceptorProvider.java:76)
at com.intuit.ipp.interceptors.IntuitInterceptorProvider.executeInterceptors(IntuitInterceptorProvider.java:62)
at com.intuit.ipp.services.DataService.add(DataService.java:108)

I haven't found anyone having similar problems. Mind you, this whole thing worked using QB SDK v2, no exceptions thrown.

So, does anyone have any bright ideas about the nature of my problem?

Edit: I included the QBHelper JAR as well, and now the issue seems to be that com.intuit.ipp.exceptions.FMSException can't be found. I'm looking right at it! It's in the build path.

回答1:

This issue generally comes when you have multiple versions of java devkit added in the same project. [ In my case, I had added v2 and v3 devkit jars in the same project. I had to add v3 jar before v2 in the classpath ]

Please use only ipp-java-devkit-2.0.11-jar-with-dependencies.jar [ Please download the latest version from docs site. ]

Thanks