Support Article

java.lang.NoSuchMethodError when accessing an Event store



Java exception occurs when accessing an Event store in a data flow. The data flow is a part of the out-of-the-box data flow in Pega Customer Service.

Error Messages

[com.pega.dsm.dnode.api.dataflow.DataFlow] (default task-65) Exception occurred during data flow RuleKeys{className=MyORG-FW-CRM-Work-MyApp-Interaction-Call, name=MyInteraction} execution: com.pega.dsm.dnode.api.dataflow.StageException: Exception in stage: Event store
Caused by: com.pega.dsm.dnode.api.ExceptionWithInputRecord: java.lang.NoSuchMethodError: org.apache.commons.lang.StringUtils.repeat(Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;
at com.pega.dsm.dnode.api.dataflow.DataFlowStage$StageInputSubscriber.onNext(
... 174 more
Caused by: java.lang.NoSuchMethodError: org.apache.commons.lang.StringUtils.repeat(Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;

Steps to Reproduce

  1. Install Customer Service for Communications on JBoss EAP 7.X.
  2. Create a new application.
  3. Run an Interaction.

Root Cause

A defect or configuration issue in the operating environment.

The error occurred due to the presence of a third-party JDBC driver that was imported in to Pega to define a custom database rule using a  JDBC URL. This driver included a pre 2.6 version of commons-lang.jar thereby shipping a conflicting version of the StringUtils class.


Make the following change to the operating environment:

To avoid incurring classloading issues caused by multiple versions of the same class in the classpath, define a corresponding JNDI datasource in the JBoss Application Server.

Perform the following steps:
  1. Define a JBoss  module for the JDBC Driver (jboss-cli command): 

    module add --name=<driver_module_name> --resources=<path_of_JDBC_Driver> --dependencies=javax.api,javax.tran saction.api
  2. Add the driver to the application server configuration  (jboss-cli command):

    /subsystem=datasources/jdbc-driver=<driver_name>:add(driver-name="<driver_name>", driver-module-name="<driver_module_name>", driver-class-name="<driver_class_name >")
  3. Add the corresponding datasource (jboss-cli command):

        data-source add --name=<datasource__name> \
                    --driver-name=<datasource_driver_name> \
                    --jndi-name=<datasource_jndi_name> \
                    --connection-url=<datasource_Url \
                    --user-name=<datasource_username> \
                    --password=<datasource_password> \
                    --jta=false \
                    --use-ccm=false \
                    --min-pool-size=<datasource_PoolInitialsize> \
                    --max-pool-size=<datasource_PoolMaxsize> \
                    --blocking-timeout-wait-millis=5000 \

  4. Roll back the system to the restore point that was created when the third-party JAR was imported. This prevents the conflicting class from loading.
    For more informatoin on Restore points, refer to:
  5. Restart the Server.
  6. Update the database rule to use the JDBC Connection Pool.

Published June 28, 2018 — Updated December 9, 2018

Have a question? Get answers now.

Visit the Pega Support Community to ask questions, engage in discussions, and help others.