Get Runtime Exception from ECommerce app when submiting an order.
Hi,
I am an Intuit Developer and got this runtime Exception when trying to submitting an order with the base app that I didn't modify.
I just wanted to let the team know in case others are seeing this problem also...
Thanks - Mark :-)
2015-11-10 11:21:59.242 ERROR 4696 --- [nio-9001-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request p rocessing failed; nested exception is java.lang.RuntimeException: com.intuit.ipp.exception.SerializationException: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "avsSt reet" (Class com.intuit.ipp.data.payment.Charge), not marked as ignorable at [Source: java.io.StringReader@263a9ed3; line: 1, column: 197](through reference chain: com.intuit.ipp.data.payment.Charge["avsStreet"])] with root cause
org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "avsStreet" (Class com.intuit.ipp.data.payment.Charge), not marked as ignorable at [Source: java.io.StringReader@263a9ed3; line: 1, column: 197](through reference chain: com.intuit.ipp.data.payment.Charge["avsStreet"]) at org.codehaus.jackson.map.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:53) at org.codehaus.jackson.map.deser.StdDeserializationContext.unknownFieldException(StdDeserializationContext.java:267) at org.codehaus.jackson.map.deser.std.StdDeserializer.reportUnknownProperty(StdDeserializer.java:673) at org.codehaus.jackson.map.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:659) at org.codehaus.jackson.map.deser.BeanDeserializer.handleUnknownProperty(BeanDeserializer.java:1365) at org.codehaus.jackson.map.deser.BeanDeserializer._handleUnknown(BeanDeserializer.java:725) at org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:703) at org.codehaus.jackson.map.deser.BeanDeserializer.deserialize(BeanDeserializer.java:580) at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2732) at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1870) at com.intuit.ipp.internal.core.JsonUtil.deserialize(JsonUtil.java:43) at com.intuit.ipp.internal.core.ServiceBasequest(ServiceBase.java:56) at com.intuit.ipp.internal.generated.payment.services.ChargesApi.create(ChargesApi.java:50) at com.intuit.ipp.services.payment.ChargeService.charge(ChargeService.java:25) at com.intuit.developer.sampleapp.ecommerce.qbo.PaymentGateway.authorizeForOrder(PaymentGateway.java:122) at com.intuit.developer.sampleapp.ecommerce.qbo.PaymentGateway.chargeCustomerForOrder(PaymentGateway.java:39) at com.intuit.developer.sampleapp.ecommerce.controllers.OrdersController.createPurchaseRequest(OrdersController.java:48) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606)
I just cloned the app and ran into the same issue. Wonder if anyone can offer some help.
Thanks a lot! Jingzhao
I resolved my own issue. Looks like the returned server JSON object contains more fields than what defined in Java files. Therefore, I added:
@JsonIgnoreProperties(ignoreUnknown=true)
to Charge.java, Card.java and PaymentContext.java. Afterward, things work just fine.
This has been fixed in the latest commit.