Skip to Content
0
Jul 25, 2017 at 12:52 PM

Datahub : java.util.Optional cannot be cast to java.util.Map

119 Views

Hi Team,

I am trying to setup the OOTB data hub.
Version Hybris: 6.4.0.1 webapp.version : 6.4.0.1-RC1 sdk.version : 6.4.0.1-RC1 saperpproduct :6.4.0.0-RC2

I am getting the below exception while loading the MATMAS

2017-07-25 16:09:08,892 [ERROR] [c.h.d.a.CompositionRuleHandlerLogger] Could not compose java.lang.ClassCastException: java.util.Optional cannot be cast to java.util.Map at com.hybris.datahub.model.LocalizedBaseDataItem.setField(LocalizedBaseDataItem.java:128) ~[datahub-api-6.4.0.1-RC1.jar:6.4.0.1-RC1] at com.hybris.datahub.saperpproduct.composition.LocalizedCompositionHandler.compose(LocalizedCompositionHandler.java:67) ~[saperpproduct-raw-6.4.0.0-RC2.jar:na] at sun.reflect.GeneratedMethodAccessor343.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_112] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_112] 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.4.0.1-RC1.jar:6.4.0.1-RC1] at sun.reflect.GeneratedMethodAccessor342.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_112] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_112] 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.$Proxy151.compose(Unknown Source) [na:na] at com.hybris.datahub.composition.impl.CompositionChainRunnerStrategy.lambda$applyCompositionRuleHandlers$2(CompositionChainRunnerStrategy.java:152) [datahub-service-6.4.0.1-RC1.jar:6.4.0.1-RC1] at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[na:1.8.0_112] at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[na:1.8.0_112] at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) ~[na:1.8.0_112] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[na:1.8.0_112] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_112] at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[na:1.8.0_112] at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[na:1.8.0_112] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_112] at java.util.stream.ReferencePipeline.forEachOrdered(ReferencePipeline.java:423) ~[na:1.8.0_112] at com.hybris.datahub.composition.impl.CompositionChainRunnerStrategy.applyCompositionRuleHandlers(CompositionChainRunnerStrategy.java:152) [datahub-service-6.4.0.1-RC1.jar:6.4.0.1-RC1] at com.hybris.datahub.composition.impl.CompositionChainRunnerStrategy.populateItemAttributes(CompositionChainRunnerStrategy.java:135) [datahub-service-6.4.0.1-RC1.jar:6.4.0.1-RC1] at com.hybris.datahub.composition.impl.CompositionChainRunnerStrategy.runChain(CompositionChainRunnerStrategy.java:76) [datahub-service-6.4.0.1-RC1.jar:6.4.0.1-RC1] at com.hybris.datahub.akka.actor.grouping.impl.CanonicalItemComposer.compose(CanonicalItemComposer.java:52) ~[datahub-service-6.4.0.1-RC1.jar:6.4.0.1-RC1] at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:26) ~[akka-actor_2.11-2.4.14.jar:na] at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:21) ~[akka-actor_2.11-2.4.14.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.14.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.14.jar:na] at akka.actor.AbstractActor.aroundReceive(AbstractActor.scala:47) ~[akka-actor_2.11-2.4.14.jar:na] at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526) ~[akka-actor_2.11-2.4.14.jar:na] at akka.actor.ActorCell.invoke(ActorCell.scala:495) ~[akka-actor_2.11-2.4.14.jar:na] at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257) ~[akka-actor_2.11-2.4.14.jar:na] at akka.dispatch.Mailbox.run(Mailbox.scala:224) ~[akka-actor_2.11-2.4.14.jar:na] at akka.dispatch.Mailbox.exec(Mailbox.scala:234) ~[akka-actor_2.11-2.4.14.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]

The IDOC sample used as below

link text

Could you please help me in this regards

Many thanks in advance. Mohan sai kumar

Attachments