on 2019 Dec 06 2:23 PM
Hello!
I have got a problem with the product catalog synchronization. Approximately immediately after start it fails with the following error:
de.hybris.platform.servicelayer.internal.jalo.ServicelayerJob] [] (000095HI) [EJBTools] pk 8796392783954 does no longer exist. de.hybris.platform.servicelayer.internal.jalo.ServicelayerJob] [] (000095HI) [EJBTools] java.lang.Exception at de.hybris.platform.util.EJBTools.instantiatePK(EJBTools.java:143) at de.hybris.platform.persistence.type.AttributeDescriptorEJB.getEnclosingType(AttributeDescriptorEJB.java:397) at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at de.hybris.platform.util.Utilities.callMethod(Utilities.java:1069) at de.hybris.platform.persistence.framework.RemoteInvocationHandler.performOutsideTx(RemoteInvocationHandler.java:186) at de.hybris.platform.persistence.framework.RemoteInvocationHandler.performOther(RemoteInvocationHandler.java:164) at de.hybris.platform.persistence.framework.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:107) at com.sun.proxy.$Proxy32.getEnclosingType(Unknown Source) at de.hybris.platform.persistence.type.AttributeDescriptorEJBImpl.getEnclosingType(AttributeDescriptorEJBImpl.java:136) at de.hybris.platform.jalo.type.AttributeDescriptor$5.compute(AttributeDescriptor.java:807) at de.hybris.platform.jalo.Item$CachedGetter.get(Item.java:694) at de.hybris.platform.jalo.type.AttributeDescriptor.getEnclosingType(AttributeDescriptor.java:809) at de.hybris.platform.catalog.jalo.SyncItemJob$SyncItemCopyContext.<init>(SyncItemJob.java:439) at de.hybris.platform.catalog.jalo.SyncItemJob.createCopyContext(SyncItemJob.java:732) at de.hybris.platform.catalog.jalo.SyncItemJob.performCronJob(SyncItemJob.java:1549) at de.hybris.platform.cronjob.jalo.Job.execute(Job.java:1274) at de.hybris.platform.cronjob.jalo.Job.performImpl(Job.java:794) at de.hybris.platform.cronjob.jalo.Job.performImpl(Job.java:713) at de.hybris.platform.cronjob.jalo.Job.perform(Job.java:629)
It is unclear from where this pk 8796392783954 is taken. In order to determine whether it is really absent I did flexible search query:
select {ctype.code}, {itm.pk} from {item as itm join ComposedType as ctype on {itm.itemtype}={ctype.pk}} where {itm.pk}= 8796392783954
If there is an item with such a pk then this query should return a single result identifying this item, but the result is empty.
Could you please indicate from where Hybris can take such a pk that doesn't correspond to any item and how it can be removed?
Request clarification before answering.
Hi, Dmitry!
Please, look here for audit info:
https://help.sap.com/viewer/d0224eca81e249cb821f2cdf45a82ace/6.6.0.0/en-US/3e2b8491449d43b391eb1ce9c...
hope this helps,
Igor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Dmitry!
In practice "pk does not exist" is caused in most cases by manual manipulations in backoffice/hmc. For example item created manually, synced, then removed in non safe way(or there was error during transaction/validation/import in legacy mode/etc) or it might be caused by rollback. There are too many reasons that's might cause... I assume this pk might be in relation entry in db.
I suggest to check next options:
1. Check by this groovy script info about pk. Also you can check by Pk analyser in hac.
def INPUT_PK = 8796392783954
def pk = de.hybris.platform.core.PK.parse(String.valueOf(INPUT_PK))
println "Cluster ID: ${pk.clusterID}"
def deployment = de.hybris.platform.core.Registry.currentTenant.persistenceManager.getItemDeployment(pk.typeCode)
println "TypeCode: ${deployment.typeCode} (${deployment.name})"
if (pk.counterBased) {
println "This PK is counter-based, and the counter is ${pk.counter}"
} else {
println "This PK is time-based, and the time is ${pk.creationTime} (sub-millis counter ${pk.milliCnt})"
}
2. Try cleanup
hope this helps,
Igor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Igor!
Great thanks for the indications!
The groovy returned that this pk is related to de.hybris.platform.persistence.type.ComposedType but it doesn't find any inctance nither with modelService.get nor flexible search in the question.
I hope that audit files will be helpful. Could you please clarify regarding audit files - where thay can be found ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.