1

我们有多个应用程序服务器,有时我们的订单会因 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
4

0 回答 0