cancel
Showing results for 
Search instead for 
Did you mean: 

AOM order replication issue due to sapproductconfiguration extension- SAP to Hybris

former_member623616
Contributor
0 Kudos

Hi Experts,

We have implemented Hybris(v6.3.0.0)-SAP(S/4 HANA) integration using DataHub(v6.3.0.0) for AOM scenario. Master Data replication, Order replication(Hybris to SAP) works fine. Now we have implemented Order replication from S/4 to Hybris, where an existing Order(created) in S/4 should be replicated to Hybris. We have created custom DH extensions and mapped minimum required data to create an Order & OrderEntry. There is some issue with the OrderEntry creation(while Order is getting created in Hybris) in DH which is related to sapproductconfiguration extension. If we remove sapproductconfiguration extension in DH, Order & Order replication works fine.

We have implemented the same with Hybris v6.0.0.0, Order replication worked fine at that time. But in Hybris v6.3.0.0, we are facing this issue. i couldnt find any information related to this change.

can anyone help to understand how to fix this. Below is error log from DH:

 2017-08-22 03:12:31,449 [DEBUG] [c.h.d.s.i.AsynchronousEventPublicationService] Publishing data hub event : CompositionStartedEvent{actionId=3, poolId=9305}
 2017-08-22 03:12:31,470 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawHybrisDiscount
 2017-08-22 03:12:31,471 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawSapErpConsumerReplicationNotification
 2017-08-22 03:12:31,473 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawSAPBaseStoreConfiguration
 2017-08-22 03:12:31,474 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawBonusBuySite
 2017-08-22 03:12:31,476 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawINVOIC
 2017-08-22 03:12:31,477 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawADR3MAS
 2017-08-22 03:12:31,479 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawADRMAS
 2017-08-22 03:12:31,480 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawLOISTD
 2017-08-22 03:12:31,481 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawSAPGlobalConfiguration
 2017-08-22 03:12:31,483 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawCLFMAS
 2017-08-22 03:12:31,484 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawHybrisProductSalesAreaToCatalogMapping
 2017-08-22 03:12:31,485 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawZHIERARCHY
 2017-08-22 03:12:31,487 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawCLSMAS
 2017-08-22 03:12:31,488 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawHybrisB2BUnit
 2017-08-22 03:12:31,490 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawHybrisB2BCustomer
 2017-08-22 03:12:31,495 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 2 items found for composition of type RawORDERS
 2017-08-22 03:12:31,522 [DEBUG] [c.h.d.s.u.i.DefaultConfProductOrderItemNumberConverter] erpOrderItemNumber to be converted = 000010
 2017-08-22 03:12:31,535 [DEBUG] [c.h.d.c.i.CompositionChainRunnerStrategy] Integration Key generation for canonical item CanonicalItem{id='null', integrationKey='null', status=ERROR, dataPool='DataHubPoolEntity{id=9305, name=SAPORDER_INBOUND_POOL}', fields='{date=20170717, orderId=0000002056, currency=null}'} failed.
 2017-08-22 03:12:31,538 [ERROR] [c.h.d.a.CompositionRuleHandlerLogger] Could not compose
 java.lang.NullPointerException: null
         at com.hybris.datahub.sapproductconfiguration.util.impl.DefaultConfProductOrderItemNumberConverter.readMaxNumberOfConfigInstancesFromCanonicalItem(DefaultConfProductOrderItemNumberConverter.java:126) ~[sapproductconfiguration-6.3.0.0-RC5.jar:na]
         at com.hybris.datahub.sapproductconfiguration.util.impl.DefaultConfProductOrderItemNumberConverter.convertFromErpToHybris(DefaultConfProductOrderItemNumberConverter.java:62) ~[sapproductconfiguration-6.3.0.0-RC5.jar:na]
         at com.hybris.datahub.saporder.composition.impl.DefaultCompositionHandlerOrderItemInbound.compose(DefaultCompositionHandlerOrderItemInbound.java:46) ~[saporder-raw-6.3.0.1-RC1.jar:na]
         at sun.reflect.GeneratedMethodAccessor401.invoke(Unknown Source) ~[na:na]
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121]
         at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121]
         at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) ~[spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
         at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) [spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
         at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85) ~[spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
         at com.hybris.datahub.aop.CompositionRuleHandlerLogger.aroundComposeAdvice(CompositionRuleHandlerLogger.java:41) ~[datahub-service-6.3.0.0-RC2.jar:6.3.0.0-RC2]
         at sun.reflect.GeneratedMethodAccessor399.invoke(Unknown Source) ~[na:na]
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121]
         at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121]
         at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629) [spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
         at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618) [spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
         at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) [spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
         at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) [spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
         at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) [spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
         at com.sun.proxy.$Proxy125.compose(Unknown Source) [na:na]
         at com.hybris.datahub.composition.impl.CompositionChainRunnerStrategy.lambda$applyCompositionRuleHandlers$2(CompositionChainRunnerStrategy.java:153) [datahub-service-6.3.0.0-RC2.jar:6.3.0.0-RC2]
         at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[na:1.8.0_121]
         at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[na:1.8.0_121]
         at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) ~[na:1.8.0_121]
         at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[na:1.8.0_121]
         at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_121]
         at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[na:1.8.0_121]
         at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[na:1.8.0_121]
         at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_121]
         at java.util.stream.ReferencePipeline.forEachOrdered(ReferencePipeline.java:423) ~[na:1.8.0_121]
         at com.hybris.datahub.composition.impl.CompositionChainRunnerStrategy.applyCompositionRuleHandlers(CompositionChainRunnerStrategy.java:153) [datahub-service-6.3.0.0-RC2.jar:6.3.0.0-RC2]
         at com.hybris.datahub.composition.impl.CompositionChainRunnerStrategy.populateItemAttributes(CompositionChainRunnerStrategy.java:143) [datahub-service-6.3.0.0-RC2.jar:6.3.0.0-RC2]
         at com.hybris.datahub.composition.impl.CompositionChainRunnerStrategy.runChain(CompositionChainRunnerStrategy.java:74) [datahub-service-6.3.0.0-RC2.jar:6.3.0.0-RC2]
         at com.hybris.datahub.akka.actor.grouping.impl.CanonicalItemComposer.compose(CanonicalItemComposer.java:52) ~[datahub-service-6.3.0.0-RC2.jar:6.3.0.0-RC2]
         at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:26) ~[akka-actor_2.11-2.4.8.jar:na]
         at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:21) ~[akka-actor_2.11-2.4.8.jar:na]
         at scala.PartialFunction$class.applyOrElse(PartialFunction.scala:123) ~[scala-library-2.11.5.jar:na]
         at akka.japi.pf.UnitCaseStatement.applyOrElse(CaseStatements.scala:21) ~[akka-actor_2.11-2.4.8.jar:na]
         at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:170) ~[scala-library-2.11.5.jar:na]
         at akka.actor.Actor$class.aroundReceive(Actor.scala:484) ~[akka-actor_2.11-2.4.8.jar:na]
         at akka.actor.AbstractActor.aroundReceive(AbstractActor.scala:47) ~[akka-actor_2.11-2.4.8.jar:na]
         at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526) ~[akka-actor_2.11-2.4.8.jar:na]
         at akka.actor.ActorCell.invoke(ActorCell.scala:495) ~[akka-actor_2.11-2.4.8.jar:na]
         at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257) ~[akka-actor_2.11-2.4.8.jar:na]
         at akka.dispatch.Mailbox.run(Mailbox.scala:224) ~[akka-actor_2.11-2.4.8.jar:na]
         at akka.dispatch.Mailbox.exec(Mailbox.scala:234) ~[akka-actor_2.11-2.4.8.jar:na]
         at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) ~[scala-library-2.11.5.jar:na]
         at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) ~[scala-library-2.11.5.jar:na]
         at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) ~[scala-library-2.11.5.jar:na]
         at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) ~[scala-library-2.11.5.jar:na]
 2017-08-22 03:12:31,539 [DEBUG] [c.h.d.c.i.CompositionChainRunnerStrategy] One of the composition handlers has CanonicalItem{id='null', integrationKey='null', status=ERROR, dataPool='DataHubPoolEntity{id=9305, name=SAPORDER_INBOUND_POOL}', fields='{unit=EA, productCode=null, quantity=null, orderId=null, entryNumber=000010, namedDeliveryDate=null}'} failed.
 2017-08-22 03:12:31,594 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawORDERS
 2017-08-22 03:12:31,595 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawSAPHTTPDestination
 2017-08-22 03:12:31,597 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawHybrisCustomer
 2017-08-22 03:12:31,599 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawZCOLLECTIONS
 2017-08-22 03:12:31,600 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawHybrisOrder
 2017-08-22 03:12:31,602 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawMATMAS
 2017-08-22 03:12:31,604 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawSAPLogicalSystem
 2017-08-22 03:12:31,605 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawDELVRY
 2017-08-22 03:12:31,607 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawHybrisUnit
 2017-08-22 03:12:31,608 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawADR2MAS
 2017-08-22 03:12:31,610 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawCHRMAS
 2017-08-22 03:12:31,611 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawHybrisDeliveryModeMapping
 2017-08-22 03:12:31,613 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawSAPBaseStoreConfigurationMapping
 2017-08-22 03:12:31,615 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawPricingSalesAreaMapping
 2017-08-22 03:12:31,616 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawCOND_A
 2017-08-22 03:12:31,618 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawHybrisOrderCancelRequest
 2017-08-22 03:12:31,619 [DEBUG] [c.h.d.s.i.DefaultRawTypeComposerService] 0 items found for composition of type RawDEBMAS
 2017-08-22 03:12:31,620 [DEBUG] [c.h.d.s.c.i.AkkaEnabledCompositionActionHandler] Entering handleCompositionSuccess
 2017-08-22 03:12:31,632 [DEBUG] [c.h.d.p.i.DefaultProcessMonitor] Unregistered Composition #3, 0 processes running
 2017-08-22 03:12:31,632 [DEBUG] [c.h.d.s.i.AsynchronousEventPublicationService] Publishing data hub event : CompositionCompletedEvent{actionId=3, poolId=9305, status=COMPLETE_W_ERRORS, compositionResult=CompositionResult{status=COMPLETE_W_ERRORS, canonicalItemCount=3, processedRawItemCount=2, ignoredRawItemCount=0, successCount=1, archivedCount=2, deleteArchivedCount=0, errorCount=2, deletedCount=0, items=[]}}
 2017-08-22 03:12:31,634 [DEBUG] [c.h.d.c.i.DefaultAutoCompositionDecisionStrategy] Querying for Raw Items in pool SAPORDER_INBOUND_POOL remaining in PENDING state.
 2017-08-22 03:12:31,659 [DEBUG] [c.h.d.c.e.AutoPublishCompositionEventListener] Attempting to auto publish for CompositionCompletedEvent{actionId=3, poolId=9305, status=COMPLETE_W_ERRORS, compositionResult=CompositionResult{status=COMPLETE_W_ERRORS, canonicalItemCount=3, processedRawItemCount=2, ignoredRawItemCount=0, successCount=1, archivedCount=2, deleteArchivedCount=0, errorCount=2, deletedCount=0, items=[]}}.
 2017-08-22 03:12:31,660 [INFO] [c.h.d.s.e.AutoPublishEventListener] Pool SAPORDER_INBOUND_POOL(9305) registered for publishing to target systems: [HybrisCore]
 2017-08-22 03:12:31,660 [DEBUG] [c.h.d.s.c.i.CallbackTriggerTimerImpl] Callback registered for trigger callback: com.hybris.datahub.sapcoreconfiguration.event.AutoPublishEventListener@d243171
 

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hey ,

sapproductconfiguration has a few prerequisites in order to work properly. If you do not use the extension, I would simply delete the jar file. If you do need the extension, did you follow the installation guide https://help.hybris.com/6.5.0/hcd/8c52d4c3866910149360b4db2b211bf5.html?

Hope that helps!

Owen