intuit / QuickBooks-V3-Java-SDK

Java SDK for QuickBooks REST API v3 services
Apache License 2.0
66 stars 144 forks source link

unable to unmarshall in XML deserializer #199

Open keridano opened 1 year ago

keridano commented 1 year ago

Hello, not always but almost always it happens to me that the XML deserializer doesn't work even if the XML is valid (controlled the output using external tools). This happens when I try to find a customer by Id using the DataService. I'm using the last version of the SDK (6.2.3)

this is the Exception stacktrace ERROR com.intuit.logger - unable to unmarshall in XML deserializer s 1 javax.xml.bind.JAXBException: Provider com.sun.xml.internal.bind.v2.ContextFactory could not be instantiated: javax.xml.bind.JAXBException: "com.intuit.ipp.data" doesnt contain ObjectFactory.class or jaxb.index at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:146) at javax.xml.bind.ContextFinder.find(ContextFinder.java:356) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:431) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:394) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:298) at com.intuit.ipp.serialization.XMLSerializer.deserializeData(XMLSerializer.java:82) at com.intuit.ipp.serialization.XMLSerializer.deserialize(XMLSerializer.java:71) at com.intuit.ipp.interceptors.DeserializeInterceptor.execute(DeserializeInterceptor.java:79) at com.intuit.ipp.interceptors.IntuitInterceptorProvider.executeResponseInterceptors(IntuitInterceptorProvider.java:114) at com.intuit.ipp.interceptors.IntuitInterceptorProvider.executeInterceptors(IntuitInterceptorProvider.java:87) at com.intuit.ipp.services.DataService.executeInterceptors(DataService.java:159) at com.intuit.ipp.services.DataService.findById(DataService.java:273)

sujitharamadass commented 1 year ago

@keridano The error is being thrown from XMLSerializer.java while trying to create Unmarshaller Unmarshaller unmarshaller = JAXBContext.newInstance(cl.getPackage().getName()).createUnmarshaller(); This is happening even before unmarshalling the XML string.

Any specific scenario you think this is happening? Is this happening only when using findById? Are you facing this after upgrading to 6.2.3?