'java.lang.LinkageError' encountered while running a Spectrum flow.


While executing the flow randomly, linkage error is encountered. Post that, execution of the same flow gets successful without doing any changes.
Error: Caused by: com.g1.dcg.stage.StageException: 
Stage QH_Branch_Number for model Spectrum_AML_DataHub threw exception
"java.lang.LinkageError: loader (instance of com/pb/spectrum/platform/server/common/deploy/car/CarClassLoader): 
attempted duplicate class definition for name: "groovy/grape/GrabAnnotationTransformation""


This happens when the Hub model is first opened after a server restart and has not warmed up before many queries are executed against it. Also, this is found to occur when two threads are trying to load the same class simultaneously. It is also suggested to catch the error and return already loaded classes verbatim.


UPDATED: September 17, 2018

In the JMX console, there are configuration settings for how many gremlin instances to initialize on startup. Try increasing this value to eliminate the error (try 20; in 12.2  default is 10, but in 12.1 it was 5).
User-added image

Additionally, opening the model in one of the clients or running a simple query to warm up the model, and initialize the Gremlin instance pool, could also prevent the error.

Environment Details

Product Feature: Custom Scripting


  • No Downloads