java.lang.RuntimeException: Attempt to assert duplicate objects.. Incorrect Locking..

java.lang.RuntimeException: Attempt to assert duplicate objects.. Incorrect Locking..

book

Article ID: KB0086345

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition -
Not Applicable -

Description

Resolution:
Description:
===========
Incorrect Locking Exception is thrown when lock is acquired on the concept after loading it in to the cache.

java.lang.RuntimeException: Attempt to assert duplicate objects… Incorrect Locking…

Environment:
===========
TIBCO BusinessEvents 3.x
All Operating Systems


Symptoms:
=========
java.lang.RuntimeException: Attempt to assert duplicate objects.. Incorrect Locking..


Resolution:
========

It is always advisable to acquire the lock in the pre-processor on the particular concept which is required to be changed/manipulated/serialized later in the Pre-processor/Rule. The locking should be done before the Concept is loaded in to the cache to avoid the "Incorrect Locking" Exception being thrown in the Inference Engine.

Example, it should be like:

               Coherence.C_Lock(strDConceptExtID, 0, false);
               Concepts.AConcept AConceptInstance = Coherence.C_CacheLoadConceptByExtId(strDConceptExtID,true);
          
where  strDConceptExtID is ExtID of Concept A, which is required to be manipulated later.

Issue/Introduction

java.lang.RuntimeException: Attempt to assert duplicate objects.. Incorrect Locking..