cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

PUT request on datahub not working

rahulverma94
Active Participant
0 Kudos
929

Hi Experts,

There was a hybris platform callback issue to datahub which left few datahub publications to IN_PROGRESS state. The IN_PROGRESS state of these publications do not let others PENDING publications to kick off. I am trying to manually change the publication status of such publication from IN_PROGRESS to FAILURE through below PUT call:

/datahub-webapp/v1/core-publications/{publicationID}

Body: { "crashReport": "Manual recovery, platform failed to communicate back to data hub" }

However, I am getting below error on making the call through postman client:

com.hybris.datahub.runtime.domain.jpa.entities.CompositeTargetSystemPublicationEntity (loaded by org.apache.catalina.loader.ParallelWebappClassLoader@0x00000007f01f14d0) cannot be cast to com.hybris.datahub.runtime.domain.SubTargetSystemPublication (loaded by org.apache.catalina.loader.ParallelWebappClassLoader@0x00000007f01f14d0)

Can someone please help me what the issue can be?

Accepted Solutions (1)

Accepted Solutions (1)

Slava
Product and Topic Expert
Product and Topic Expert
0 Kudos

Rahul,

you did almost everything right. There is a small caveat. Under the hood the target system publication is not holistic but it consists of at least one or many sub-publications. That's done to respect the max publication size, in case we need to publish a greater number of items; also target item dependency is achieved by using sub-publications; and all deleted items are also placed into separate sub-publication(s).

So you need to use that sub-publication ID instead, that datahub-adapter is aware of. You can find the sub-publications associated with the target system publication (composite one) from the database or from the datahub log.

Use ID of that IN_PROGRESS sub-publication instead of the composite publication and your request will go through.

rahulverma94
Active Participant
0 Kudos

Thanks . It worked for me.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Rahul,

I do not recognize your parameters, is 'core-publications' a parameter? You seem to be missing some parts of the call. Please try using one of these commands https://help.sap.com/doc/b468c7d3110f4dffad5ad2ffc32c55a7/1811/en-US/DataHubAPI/index.html or define your own https://spring.io/guides/gs/rest-service/

Best Regards,