我们有多个应用程序服务器,并且我们的订单有时会因OCAException而失败。问题在于,从外部系统更新产品数量(自定义属性)是我们订单工作流程的一部分,并且有时(并非总是)发生此异常。我已经在intershop ORMException could not update - refresh ORMObject处看到了讨论,所以我在这里知道问题-更新其他线程和/或应用程序服务器中的对象。 但是我不明白为什么即使在我们的测试实例中,当更新数量作业正在运行时,例如在上午6点,什么也没有发生的情况下发生此异常-没有其他作业正在运行,没有用户活动?
作业本身持续约7秒钟,并在一个事务处理流程中执行,该处理流程遍历WS响应对象,然后通过SKU从存储库中获取productBO,更新Quantity定制属性并基于该属性将产品设置为脱机或联机。
有人可以解释为什么会发生这种情况以及如何避免/解决它吗?
感谢进阶!
[2018-12-01 06:55:09.962 +0100] [JobExecutor60679518] [Job:ESBImportQuantity] [Req:X5sK_SlynRsAAAFndZuVlWhV] ERROR com.intershop.beehive.core.internal.job.JobExecutor - Job 'ESBImportQuantity' pipeline finished with exception! com.intershop.beehive.core.internal.pipeline.PipelineCallStackException: com.intershop.beehive.core.capi.pipeline.PipelineExecutionException: Exception occurred while executing pipelet 'ESBUpdateProductQuantity'.
at com.intershop.beehive.core.internal.pipeline.Pipeline.executePipeline(Pipeline.java:1038)
at com.intershop.beehive.core.internal.pipeline.PipelineProcessorImpl.executePipeline(PipelineProcessorImpl.java:641)
at com.intershop.beehive.core.internal.pipeline.PipelineProcessorImpl.executePipeline(PipelineProcessorImpl.java:484)
at com.intershop.beehive.pipeline.internal.PipelineEngineImpl.executePipeline(PipelineEngineImpl.java:97)
at com.intershop.beehive.core.internal.pipeline.PipelineProcessorImpl.executePipeline(PipelineProcessorImpl.java:421)
at com.intershop.beehive.core.internal.pipeline.PipelineProcessorImpl.executePipeline(PipelineProcessorImpl.java:250)
at com.intershop.beehive.core.internal.job.JobExecutor.runJob(JobExecutor.java:399)
at com.intershop.beehive.core.internal.job.JobExecutor.processTask(JobExecutor.java:171)
at com.intershop.beehive.core.internal.environment.Worker.run(Worker.java:270)
Caused by: com.intershop.beehive.core.capi.pipeline.PipelineExecutionException: Exception occurred while executing pipelet 'ESBUpdateProductQuantity'.
at com.intershop.beehive.core.internal.pipeline.PipeletNode.executeNode(PipeletNode.java:381)
at com.intershop.beehive.core.internal.pipeline.Pipeline.executeNode(Pipeline.java:1098)
at com.intershop.beehive.core.internal.pipeline.Pipeline.executePipeline(Pipeline.java:926)
... 8 common frames omitted
Caused by: com.intershop.beehive.core.capi.pipeline.PipelineExecutionException: com.intershop.beehive.orm.capi.common.OCAException: Could not UPDATE object: com.intershop.beehive.xcs.internal.product.ProductPO
又一次更新,当系统作业“ ProcessProductNotification-TriggerNotificationFromJob”运行并尝试更新DomainPO对象时,也会发生相同的异常:
[2018-12-03 01:24:59.159 +0100] ERROR lvpislive1.vipnet.hr ES1 appserver1 [] [] com.intershop.beehive.core.pipelet.pipeline.ExecutePipeline [] [Unknown] [hwUK_SlyrrEAAAFlp31ujvES] [rSEK85q4Zc8AAAFn9y.Wg3F0] "JobExecutor658081066" ISH-CORE-2490: Synchronous called pipeline 'ProcessProductNotification-TriggerNotificationFromJob' of application 'a1-shop@A1-Shop-Site (app=a1.Web)' has finished with exception: com.intershop.beehive.core.internal.pipeline.PipelineCallStackException: com.intershop.beehive.core.capi.pipeline.PipelineExecutionException: Exception occurred while executing pipelet 'UpdateSyncRecord'.
at com.intershop.beehive.core.internal.pipeline.Pipeline.executePipeline(Pipeline.java:1038)
at com.intershop.beehive.core.internal.pipeline.PipelineProcessorImpl.executePipeline(PipelineProcessorImpl.java:641)
at com.intershop.beehive.core.internal.pipeline.PipelineProcessorImpl.executePipeline(PipelineProcessorImpl.java:484)
at com.intershop.beehive.pipeline.internal.PipelineEngineImpl.executePipeline(PipelineEngineImpl.java:97)
at com.intershop.beehive.core.internal.pipeline.PipelineProcessorImpl.executePipeline(PipelineProcessorImpl.java:421)
at com.intershop.beehive.core.internal.pipeline.PipelineProcessorImpl.executePipeline(PipelineProcessorImpl.java:250)
at com.intershop.beehive.core.pipelet.pipeline.ExecutePipeline.execute(ExecutePipeline.java:175)
at com.intershop.beehive.core.internal.pipeline.PipeletNode.executeNode(PipeletNode.java:346)
at com.intershop.beehive.core.internal.pipeline.Pipeline.executeNode(Pipeline.java:1098)
at com.intershop.beehive.core.internal.pipeline.Pipeline.executePipeline(Pipeline.java:926)
at com.intershop.beehive.core.internal.pipeline.PipelineProcessorImpl.executePipeline(PipelineProcessorImpl.java:641)
at com.intershop.beehive.core.internal.pipeline.PipelineProcessorImpl.executePipeline(PipelineProcessorImpl.java:484)
at com.intershop.beehive.pipeline.internal.PipelineEngineImpl.executePipeline(PipelineEngineImpl.java:97)
at com.intershop.beehive.core.internal.pipeline.PipelineProcessorImpl.executePipeline(PipelineProcessorImpl.java:421)
at com.intershop.beehive.core.internal.pipeline.PipelineProcessorImpl.executePipeline(PipelineProcessorImpl.java:250)
at com.intershop.beehive.core.internal.job.JobExecutor.runJob(JobExecutor.java:399)
at com.intershop.beehive.core.internal.job.JobExecutor.processTask(JobExecutor.java:171)
at com.intershop.beehive.core.internal.environment.Worker.run(Worker.java:270)
Caused by: com.intershop.beehive.core.capi.pipeline.PipelineExecutionException: Exception occurred while executing pipelet 'UpdateSyncRecord'.
at com.intershop.beehive.core.internal.pipeline.PipeletNode.executeNode(PipeletNode.java:381)
at com.intershop.beehive.core.internal.pipeline.Pipeline.executeNode(Pipeline.java:1098)
at com.intershop.beehive.core.internal.pipeline.Pipeline.executePipeline(Pipeline.java:926)
... 17 common frames omitted
Caused by: com.intershop.beehive.core.capi.pipeline.PipelineExecutionException: com.intershop.beehive.orm.capi.common.OCAException: Could not UPDATE object: com.intershop.beehive.core.internal.domain.DomainPO[com.intershop.beehive.orm.internal.state.ObjectState@65beb960[typeCode=1, status=1, parentSiteID=null, siteID=j5UK_SlytKwAAAFlTuJujvEU, entryMask=0, pageCachingAllowedFlag=false, staticContentMaxAge=null, pageCacheID=null, staticContentCacheID=null, profileID=null, serverGroup=null, businessModel=null, defaultApplicationID=null, UUID=aPIK_Sly.tEAAAFlWeJujvEU, domainID=aPIK_Sly.tEAAAFlWeJujvEU, oca=2492]]
at com.intershop.beehive.core.internal.pipeline.PipelineRequest.commitTransaction(PipelineRequest.java:327)
at com.intershop.beehive.core.internal.pipeline.PipeletNode.executeNode(PipeletNode.java:374)
... 19 common frames omitted
Caused by: com.intershop.beehive.orm.capi.common.OCAException: Could not UPDATE object: com.intershop.beehive.core.internal.domain.DomainPO[com.intershop.beehive.orm.internal.state.ObjectState@65beb960[typeCode=1, status=1, parentSiteID=null, siteID=j5UK_SlytKwAAAFlTuJujvEU, entryMask=0, pageCachingAllowedFlag=false, staticContentMaxAge=null, pageCacheID=null, staticContentCacheID=null, profileID=null, serverGroup=null, businessModel=null, defaultApplicationID=null, UUID=aPIK_Sly.tEAAAFlWeJujvEU, domainID=aPIK_Sly.tEAAAFlWeJujvEU, oca=2492]]
at com.intershop.beehive.orm.internal.query.SQLManagerImpl.createDMLStatement(SQLManagerImpl.java:375)
at com.intershop.beehive.orm.internal.query.SQLManagerImpl.createUpdateStatement(SQLManagerImpl.java:252)
at com.intershop.beehive.orm.internal.query.QueryManagerImpl.executeDMLStatement(QueryManagerImpl.java:112)
at com.intershop.beehive.orm.internal.query.QueryManagerImpl.executeUpdateQuery(QueryManagerImpl.java:76)
at com.intershop.beehive.orm.internal.state.StateManagerImpl.updateObjectState(StateManagerImpl.java:60)
at com.intershop.beehive.orm.capi.common.ORMObject.prepareState(ORMObject.java:1868)
at com.intershop.beehive.orm.capi.common.ORMObject.transactionPrepared(ORMObject.java:1807)
at com.intershop.beehive.orm.internal.transaction.TransactionImpl.prepareTransaction(TransactionImpl.java:709)
at com.intershop.beehive.orm.internal.transaction.TransactionImpl.commit(TransactionImpl.java:307)
at com.intershop.beehive.core.internal.pipeline.PipelineRequest.commitTransaction(PipelineRequest.java:314)
... 20 common frames omitted