Hello everyone, I hope you're doing good.
I am writing because I am facing a strange issue with our ecommerce ofbiz installation for one of our customers. In short, since yesterday, ofbiz fails in storing an order with the error: Ran Event [java:org.ofbiz.order.shoppingcart.CheckOutEvents#createOrder] > from [request], result is [error] > 2021-01-07 10:40:28,490 |0.0.0.0-8009-exec-21 |RequestHandler > |E| Request processorder caused an error with the following message: Non > completare l'ordine, il seguente รจ occorso:Creazione ordine fallita; > contattare il servizio di assistenza clienti. The ofbiz logs, shows also this more explicit error: *Caused by: java.sql.SQLIntegrityConstraintViolationException: (conn=261079) Duplicate entry 'LCT5793' for key 'PRIMARY'* just after its attempt to store the OrderHeader GenericValue. I know that the error message is auto-explanatory, but the strange thing is that is appeared more or less suddenly, with no preliminar signals of any kind. Just to complete the picture, I add that no operation (both software or hardware) has been done on application server and database server. I already did a bit of investigation within the code that generates the next order id and I saw that the next order id is calculated starting from the field *lastOrderNumber *of the entity *PartyAcctgPreference *for the main Company. One thing that I noticed on this record is that the last order number is 1 behind the "real" last order id in the system. I really cannot explain how this could be possible since that whole system worked perfectly until one day ago. Is it enough to restore the functionality to manually update the lastOrderNumber field on the PartyAcctgEntity? Or is there more that needs to be taken into the account? Thanks in advance, Giulio -- Giulio Speri *Mp Styl**e Srl* via Antonio Meucci, 37 41019 Limidi di Soliera (MO) T 059/684916 M 334/3779851 www.mpstyle.it
