SAP Knowledge Base Article - Preview

2482201 - java.lang.SecurityException: Authentication failed for target system

Symptom

When replicating the data from ERP to hybris commerce suite via datahub, there might be an exception thrown in datahub log.

[DEBUG] [c.h.d.c.c.i.DefaultExportClient] Status of the response from publish to target system: HybrisCore, 401
[ERROR] [c.h.d.s.i.PublicationActionHandler] Publication #1 to target system HybrisCore failed
com.hybris.datahub.api.publication.PublicationException: An error occurred during the export of impex file
at com.hybris.datahub.core.adapter.impl.DefaultCoreAdapterPublicationService.targetSystemPublication(DefaultCoreAdapterPublicationService.java:61) ~[datahub-core-export-service-6.2.0.4-RC1.jar:na]
at com.hybris.datahub.core.adapter.impl.DefaultCoreAdapterPublicationService.publish(DefaultCoreAdapterPublicationService.java:39) ~[datahub-core-export-service-6.2.0.4-RC1.jar:na]
at com.hybris.datahub.core.adapter.impl.CoreAdapterService.publish(CoreAdapterService.java:78) ~[datahub-core-export-service-6.2.0.4-RC1.jar:na]
at com.hybris.datahub.service.publication.impl.DefaultDataHubPublicationService.startPublication(DefaultDataHubPublicationService.java:259) ~[datahub-service-6.2.0.4-RC1.jar:6.2.0.4-RC1]
at com.hybris.datahub.service.publication.impl.DefaultDataHubPublicationService.publish(DefaultDataHubPublicationService.java:101) ~[datahub-service-6.2.0.4-RC1.jar:6.2.0.4-RC1]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_51]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_51]
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302) ~[spring-aop-4.2.7.RELEASE.jar:4.2.7.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) ~[spring-aop-4.2.7.RELEASE.jar:4.2.7.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.2.7.RELEASE.jar:4.2.7.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) ~[spring-tx-4.2.7.RELEASE.jar:4.2.7.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) ~[spring-tx-4.2.7.RELEASE.jar:4.2.7.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) ~[spring-tx-4.2.7.RELEASE.jar:4.2.7.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.2.7.RELEASE.jar:4.2.7.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) ~[spring-aop-4.2.7.RELEASE.jar:4.2.7.RELEASE]
at com.sun.proxy.$Proxy131.publish(Unknown Source) ~[na:na]
at com.hybris.datahub.service.impl.PublicationActionHandler.publishToTargetSystems(PublicationActionHandler.java:339) [datahub-service-6.2.0.4-RC1.jar:6.2.0.4-RC1]
at com.hybris.datahub.service.impl.PublicationActionHandler.handlePublicationAction(PublicationActionHandler.java:126) [datahub-service-6.2.0.4-RC1.jar:6.2.0.4-RC1]
at com.hybris.datahub.service.impl.PublicationActionHandler.handleAction(PublicationActionHandler.java:95) [datahub-service-6.2.0.4-RC1.jar:6.2.0.4-RC1]
at com.hybris.datahub.service.impl.PublicationActionHandler.handleAction(PublicationActionHandler.java:70) [datahub-service-6.2.0.4-RC1.jar:6.2.0.4-RC1]
at com.hybris.datahub.command.impl.AbstractPerformCommand.lambda$execute$0(AbstractPerformCommand.java:57) [datahub-service-6.2.0.4-RC1.jar:6.2.0.4-RC1]
at com.hybris.datahub.command.impl.AbstractPerformCommand$$Lambda$124/1307621450.run(Unknown Source) [datahub-service-6.2.0.4-RC1.jar:6.2.0.4-RC1]
at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1618) [na:1.8.0_51]
at com.hybris.datahub.service.ExceptionHandlingAsyncTaskExecutor$2.run(ExceptionHandlingAsyncTaskExecutor.java:80) [datahub-service-6.2.0.4-RC1.jar:6.2.0.4-RC1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_51]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_51]
Caused by: java.lang.SecurityException: Authentication failed for target system
at com.hybris.datahub.core.client.impl.DefaultExportClient.validateExportResponse(DefaultExportClient.java:210) ~[datahub-core-export-service-6.2.0.4-RC1.jar:na]
at com.hybris.datahub.core.client.impl.DefaultExportClient.export(DefaultExportClient.java:79) ~[datahub-core-export-service-6.2.0.4-RC1.jar:na]
at com.hybris.datahub.core.adapter.impl.DefaultCoreAdapterPublicationService.targetSystemPublication(DefaultCoreAdapterPublicationService.java:56) ~[datahub-core-export-service-6.2.0.4-RC1.jar:na]
... 28 common frames omitted


Read more...

Environment

  • SAP Hybris Commerce 6.1
  • Datahub 6.1

Product

SAP Hybris Commerce 6.1

Keywords

Datahub, OAuth, Authentication , KBA , CEC-COM-HUB , SAP Commerce Data Hub , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP ONE Support launchpad (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.