CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method “bpc_invoke” on bean “BeanId(XXXApp#XXXEJB.jar#component.XXXX, null)”. Exception data: com.ibm.bpe.database.TomDuplicateKeyException: (com.ibm.bpe.database.CorrelationSetInstanceB: PNUDx)

This is the exception I got when I tried to send an event to an operation. The complete stacktrace of the application is

CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "bpc_invoke" on bean "BeanId(XXXApp#XXXEJB.jar#component.XXXX, null)". Exception data: com.ibm.bpe.database.TomDuplicateKeyException: (com.ibm.bpe.database.CorrelationSetInstanceB: PNUDx)
PIID                          = _PI:9003011b.356b88eb.dfa2c038.977f0038
COID                          = _CO:9024011b.356a6d43.dfa2c038.977f0020
SIID                          = _SI:9010011b.356b8a14.dfa2c038.977f0043
processName                   = XXXX
PTID                          = _PT:9001011b.356a6d43.dfa2c038.977f0016
status                        = ACTIVE
hashCode                      = null
data                          = null
dataLong                      = null
versionId                     = 0
(com.ibm.bpe.database.CorrelationSetInstanceB: Pnudx)
PIID                          = _PI:9003011b.356b88eb.dfa2c038.977f0038
COID                          = _CO:9024011b.356a6d43.dfa2c038.977f0020
SIID                          = _SI:9010011b.356b8a14.dfa2c038.977f0043
processName                   = XXX
PTID                          = _PT:9001011b.356a6d43.dfa2c038.977f0016
status                        = ACTIVE
hashCode                      = [B@6bbd689b
data                          = CS-CorrelationSet-Val=Albin1_/
dataLong                      = null
versionId                     = 0
	at com.ibm.bpe.database.TomCacheBase.addOrReplace(TomCacheBase.java:226)
	at com.ibm.bpe.database.Tom.newCorrelationSetInstanceB(Tom.java:11040)

This error was because the Correlation Sets initiation property was set to Yes. If the initiation property of correlation set to Yes, it will create a new process instance with the correlation value if the receive is invoked. So I believe in our case WPS was trying to create a new process with the same id. That could be the reason for that TomDuplicateKeyException. Anyways this issue got resolved when I changed the initiation property value to join.

Share/Save/Bookmark

If you enjoyed this post, make sure you subscribe to my RSS feed!