Support Article
DeleteAttachments activity resulting BadClassDefinitionException
Summary
User is getting com.pega.pegarules.pub.database.BadClassDefinitionException in Log files.
Error Messages
2016-10-20 00:12:01,189 [.PRPCWorkManager : 2] [ STANDARD] [tionOffline:01.02.01] ( DeleteAttachment.Work_.Action) ERROR A2138647 - Error in Obj-Open-By-Handle
com.pega.pegarules.pub.database.BadClassDefinitionException: Class pyWorkPage does not exist
From: (A094243851F45E9E36CF0922C12774385)
at com.pega.pegarules.data.internal.access.DatabaseImpl.open(DatabaseImpl.java:4376)
at com.pega.pegarules.pub.runtime.AbstractActivity.objOpenByHandle(AbstractActivity.java:121)
at om.pegarules.generated.activity.ra_action_deleteattachment_6ec8036f138978470d9dc19d4a53e162.step16_circum0 (ra_action_deleteattachment_6ec8036f138978470d9dc19d4a53e162.java:1276)
Steps to Reproduce
- Include an activity step retrieve instances with Obj-Browse. The Method Parameters are AttachmentList for PageName (class Link-Attachment).
- Call DeleteAttachments with page results from Browse.
Root Cause
The DeleteAttachment activity requires a work page with handle. In above scenario, LinkHandle is not pzInsKey.
Resolution
Add step between Browse and Delete to get data to page of Link-Attachment type and passing it while calling DeleteAttachments activity.

Published November 15, 2016 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.