Mysterious failure to write to Quickbooks using QB Java SDK v3

余生长醉 提交于 2019-12-24 23:44:26

问题


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



来源:https://stackoverflow.com/questions/20211933/mysterious-failure-to-write-to-quickbooks-using-qb-java-sdk-v3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!