4 Replies Latest reply on Sep 9, 2013 6:52 PM by Gaurav Agrawal

    Order version error

    996897
      Hi All,

      I am facing problem with order version. while adding the cart it is fine, then click on proceed checkout button it is giving following error message.

      Saving order o200003 failed because doing so would result in data being overwritten. Order data for your browser window was out of date. Please re-submit your changes for them to take effect.


      atg.commerce.order.InvalidVersionException: This order (o200003) is out of date. Changes have been made to the order and the operation should be resubmitted. Order version 11, Repository item version
      12.
      at atg.commerce.order.OrderManager.updateOrder(OrderManager.java:2881)
      at atg.commerce.order.purchase.PurchaseProcessHelper.addItemsToOrder(PurchaseProcessHelper.java:951)
      at atg.commerce.order.purchase.CartModifierFormHandler.doAddItemsToOrder(CartModifierFormHandler.java:3275)
      at atg.commerce.order.purchase.CartModifierFormHandler.addItemToOrder(CartModifierFormHandler.java:2900)
      at atg.commerce.order.purchase.CartModifierFormHandler.handleAddItemToOrder(CartModifierFormHandler.java:2851)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at atg.droplet.EventSender.sendEvent(EventSender.java:639)
      at atg.droplet.FormTag.doSendEvents(FormTag.java:823)
      at atg.droplet.FormTag.sendEvents(FormTag.java:671)
      at atg.droplet.DropletEventServlet.sendEvents(DropletEventServlet.java:614)
      at atg.droplet.DropletEventServlet.service(DropletEventServlet.java:642)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.commerce.order.CommerceCommandServlet.service(CommerceCommandServlet.java:150)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.commerce.promotion.PromotionServlet.service(PromotionServlet.java:213)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.userprofiling.AccessControlServlet.service(AccessControlServlet.java:696)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.servlet.sessionsaver.SessionSaverServlet.service(SessionSaverServlet.java:2447)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.userprofiling.PageEventTriggerPipelineServlet.service(PageEventTriggerPipelineServlet.java:191)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.multisite.SiteSessionEventTriggerPipelineServlet.service(SiteSessionEventTriggerPipelineServlet.java:161)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.userprofiling.SessionEventTrigger.service(SessionEventTrigger.java:512)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.userprofiling.ProfilePropertyServlet.service(ProfilePropertyServlet.java:230)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.userprofiling.ProfileRequestServlet.service(ProfileRequestServlet.java:460)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.projects.store.servlet.pipeline.ProtocolSwitchServlet.service(ProtocolSwitchServlet.java:309)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.servlet.pipeline.DynamoPipelineServlet.service(DynamoPipelineServlet.java:491)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.servlet.pipeline.URLArgumentPipelineServlet.service(URLArgumentPipelineServlet.java:302)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.servlet.pipeline.PathAuthenticationPipelineServlet.service(PathAuthenticationPipelineServlet.java:392)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.servlet.security.ThreadUserBinderServlet.service(ThreadUserBinderServlet.java:113)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.dtm.TransactionPipelineServlet.service(TransactionPipelineServlet.java:234)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.servlet.pipeline.SecurityServlet.service(SecurityServlet.java:195)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.multisite.SiteContextPipelineServlet.service(SiteContextPipelineServlet.java:448)
      at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
      at atg.servlet.pipeline.HeadPipelineServlet.passRequest(HeadPipelineServlet.java:1271)
      at atg.servlet.pipeline.HeadPipelineServlet.service(HeadPipelineServlet.java:952)
      at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:272)
      at atg.filter.dspjsp.PageFilter.innerDoFilter(PageFilter.java:349)
      at atg.filter.dspjsp.PageFilter.doFilter(PageFilter.java:208)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:662)
      17:07:59,656 INFO [CartModifierFormHandler] DEBUG adding form exception: errorAddingToOrder: Saving order o200003 failed because doing so would result in data being overwritten. Order data for your b
      rowser window was out of date. Please re-submit your changes for them to take effect. property=/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-138/atg/commerce/order/purchase/CartModifie
      rFormHandler.order exception=CONTAINER:atg.commerce.CommerceException: An unknown error occurred while adding an item to the Order with id [o200003].; SOURCE:atg.commerce.order.InvalidVersionException
      : This order (o200003) is out of date. Changes have been made to the order and the operation should be resubmitted. Order version 11, Repository item version 12.
      17:07:59,656 INFO [CartModifierFormHandler] DEBUG root cause of exception: CONTAINER:atg.commerce.CommerceException: An unknown error occurred while adding an item to the Order with id [o200003].; SO
      URCE:atg.commerce.order.InvalidVersionException: This order (o200003) is out of date. Changes have been made to the order and the operation should be resubmitted. Order version 11, Repository item ver
      sion 12.
      17:07:59,657 INFO [CartModifierFormHandler] DEBUG Transaction Marked as Rollback - staying on same page.
      17:07:59,657 INFO [CartModifierFormHandler] DEBUG Transaction Marked as Rollback - staying on same page.
      17:07:59,657 INFO [CartModifierFormHandler] DEBUG afterSet sees currentTransaction as TransactionImple < ac, BasicAction: -3f57d480:d160:51653a45:9bfb status: ActionStatus.ABORT_ONLY >
      17:07:59,657 INFO [CartModifierFormHandler] DEBUG afterSet committing transaction TransactionImple < ac, BasicAction: -3f57d480:d160:51653a45:9bfb status: ActionStatus.ABORT_ONLY >
      17:07:59,681 INFO [CartModifierFormHandler] DEBUG Released local write lock using id 360039


      Please any one help me on this issue.

      Cheers,
      Sreedhar.
        • 1. Re: Order version error
          Ricky S
          i have faced order version error in past.

          Usually occurs if u are saving / updating the order outside a transaction.

          Chk for places whr u r updating ur order , put it inside a transaction. Use updateOrder pipeline.
          • 2. Re: Order version error
            Praveer.Rai
            Hi ,

            Somewhere in code you are incorrectly changing order.

            It should be like this :

            wrap below code within transaction ( not needed if transaction already present )

            synchronized(order) {

            //do your changes here

            // now call update order

            try {
                      orderManager.updateOrder(order);
                           } catch (CommerceException e) {
                                if(isLoggingError()) {
                                     logError(e);
                                }
                           }

            }
            • 3. Re: Order version error
              956043
              Can you let me know, this order gettting from Store/CSC/bcc ends.
              • 4. Re: Order version error
                Gaurav Agrawal

                I'm getting the same error but in my case order is getting udpate from CSC server and after that I'm trying to update in store site. can you please tell me what can be the resolution for this scenario.