Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Error trying to request the receipt or the invoice #383

Closed
icougil opened this issue Feb 4, 2018 · 6 comments
Closed

Error trying to request the receipt or the invoice #383

icougil opened this issue Feb 4, 2018 · 6 comments
Assignees
Labels

Comments

@icougil
Copy link

icougil commented Feb 4, 2018

Hi.

As a user I've tried to request the invoice or the receipt related with the payment done (using the Sandbox for both Paypal and Stripe), but the link ("Download your receipt/invoice") does not work (even the receipt is attached in confirmation email). Here you can see the exception thrown:

 [qtp985679444-265] ERROR alfio.controller.ControllerExceptionHandler - unexpected exception
java.lang.IllegalStateException: com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of alfio.model.OrderSummary: no suitable constructor found, can not deserialize from Object value (missing default constructor or creator, or perhaps need to add/enable type information?)
 at [Source: {"originalTotalPrice":{"priceWithVAT":18150,"discount":0,"discountAppliedCount":0,"vat":3150},"summary":[{"name":"early","price":"150.00","priceBeforeVat":"150.00","amount":1,"subTotal":"150.00","subTotalBeforeVat":"150.00","originalSubTotal":15000,"type":"TICKET"}],"free":false,"totalPrice":"181.50","totalVAT":"31.50","waitingForPayment":false,"cashPayment":false,"vatPercentage":"12345678G","vatStatus":null,"ticketAmount":1,"displayVat":true,"notYetPaid":false,"singleTicketOrder":true}; line: 1, column: 2]
        at alfio.util.Json.fromJson(Json.java:57) ~[main/:?]
        at alfio.controller.InvoiceReceiptController.buildDocument(InvoiceReceiptController.java:71) ~[main/:?]
        at alfio.controller.InvoiceReceiptController.lambda$getInvoice$6(InvoiceReceiptController.java:114) ~[main/:?]
        at alfio.controller.InvoiceReceiptController.lambda$null$0(InvoiceReceiptController.java:66) ~[main/:?]

Best regards,

@syjer
Copy link
Member

syjer commented Feb 4, 2018

hi @cougil , which release are you using?

We have noticed that after upgrading jackson/other libraries, some of his default behaviour has changed.

@syjer syjer self-assigned this Feb 4, 2018
@syjer syjer added the bug label Feb 4, 2018
@syjer
Copy link
Member

syjer commented Feb 5, 2018

@cougil I can confirm that this issue affect the master, but not the stable branch.

I'll have a look at what could be the root cause.

@syjer
Copy link
Member

syjer commented Feb 5, 2018

I confirm that the issue is caused by the upgrade from lombok lombok:1.16.16 to lombok:1.16.20. It seems that the generated code has changed (most likely it does not generate anymore the constructor??)

edit: ok, it's most likely due to this change:

BREAKING CHANGE: lombok config key lombok.anyConstructor.suppressConstructorProperties is now
 deprecated and defaults to true, that is, by default lombok no longer automatically generates 
@ConstructorProperties annotations. New config key 
lombok.anyConstructor.addConstructorPropertiesnow exists; set it to true if you want the old behavior. 
Oracle more or less broke this annotation with the release of JDK9, necessitating this breaking change.

syjer added a commit that referenced this issue Feb 5, 2018
@syjer
Copy link
Member

syjer commented Feb 5, 2018

should be fixed now. Remember to do a clean of the workspace :D

@syjer syjer closed this as completed Feb 5, 2018
@icougil
Copy link
Author

icougil commented Feb 5, 2018

Thank you very much for your quick reply! ;-)
About the resolution, I have not understood the point about the 'stable branch'. It is not 'master'? Which branch should we use for 'production' ?

@syjer
Copy link
Member

syjer commented Feb 5, 2018

@cougil for production you should use the latest release listed at https://github.com/alfio-event/alf.io/releases :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants