Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

queueBatchActivity fails with 'ClassCastException' error

SA-9651

Summary



Asynchronous Thread is not spawned when queueBatchActivity method is invoked on PRRequestor class. User is using below code to create asynchronous process within a new batch requestor:

tools.getRequestor().queueBatchActivity("Data-Task","newTask",tools.getParameterPage(),tools.getStepPage());

Data-Task is the class name and newTask is the Activity Name user wants to execute. When PRPC product is executing the above code, it throws an error.


Error Messages



java.lang.ClassCastException: java.lang.String incompatible with com.pega.pegarules.pub.clipboard.ClipboardPage

[4/17/15 12:18:33:189 CDT] 00000046 SystemErr R java.lang.ClassCastException: java.lang.String incompatible with com.pega.pegarules.pub.clipboard.ClipboardPage
[4/17/15 12:18:33:190 CDT] 00000046 SystemErr R at com.pega.pegarules.session.internal.async.BatchRequestorTask.<init>(BatchRequestorTask.java:456)
[4/17/15 12:18:33:190 CDT] 00000046 SystemErr R at com.pega.pegarules.session.internal.async.Agent.createBatchRequestorTask(Agent.java:1239)
[4/17/15 12:18:33:190 CDT] 00000046 SystemErr R at com.pega.pegarules.session.internal.async.Agent.queueBatchActivityForAgent(Agent.java:1321)
[4/17/15 12:18:33:191 CDT] 00000046 SystemErr R at com.pega.pegarules.session.internal.async.Agent.queueBatchActivityForAgent(Agent.java:1188)
[4/17/15 12:18:33:191 CDT] 00000046 SystemErr R at com.pega.pegarules.session.internal.async.Agent.queueBatchActivity(Agent.java:1119)



Steps to Reproduce



1. Create an Activity and include the below line in a java step.

tools.getRequestor().queueBatchActivity("Data-Task","newTask",tools.getParameterPage(),tools.getStepPage()); 

2. Test if the new Batch Process is creating an Asynchronous process.

Root Cause



The root cause of this problem is a defect in Pegasystems’ code/rules.

Resolution



This issue is resolved through the following Local-change: 

Before java step that calls 'queueBatchActivity', create a new clipboard page that is used as StepPage for java step using 'Page-New'.

Published June 12, 2015 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us