Executing purge script through command line(datacleanup.bat/sh) may experience following errors related to class ref not found.
D:\tibco\mdm\9.1\bin>datacleanup.bat -o record -an XXXXX -rn XXXXX -p XXXXX -mn XXXX -pwd XXXXX
where --- -an is enterprise name of the repository located -rn is repository name -p is productkeyid's(You can get the same from catalog table using below query) of the records to be deleted. select cproductkeyid from MCT_XXXXX where cproductid in ('XXXXX','XXXXX') -mn is the member(user) name of the user who has admin role. -pwd is the password of the respective user
D:\tibco\mdm\9.1\bin>echo off
Invoking Cpath Java program
"D:\java\jre1.8.0_201"\bin\java -DMQ_HOME="D:\tibco\mdm\9.1" -DNODE_ID=Member1 -DMQ_COMMON_DIR="" -DMQ_CONFIG_FILE="D:\tibco\mdm\9.1\config\ConfigValues.xml" -classpath D:\app\IBM\WebSphere\AppServer\lib\j2ee.jar;D:\tibco\mdm\9.1\lib\external\*;;D:\app\IBM\WebSphere\AppServer\lib\websphere.jar;D:\app\IBM\WebSphere\AppServer\runtimes\com.ibm.ws.admin.client_6.1.0.jar;D:\app\IBM\WebSphere\AppServer\lib\naming.jar;D:\app\IBM\WebSphere\AppServer\lib\iwsorb.jar;D:\app\IBM\WebSphere\AppServer\java\jre\lib\ext\mail.jar;D:\app\IBM\WebSphere\AppServer\java\jre\lib\ext\activation.jar;D:\tibco\mdm\9.1\lib\mq\AllECMClasses.jar; com.tibco.mdm.purge.PurgeHelper -o record -an XXXXXX -rn XXXXX -p XXXXX -mn XXXX -pwd password
MqStartup: Main configuration file: D:\tibco\mdm\9.1\config\ConfigValues.xml
****The root directory is : 3 ****C:\Users\XXXXX
Parameters:Exec Mode =record, Enterprise ID =null, Enterprise Name =XXXXX, Repository ID =null, Repository Name =EIMR_MANDATE_DOSE, Data sources ID =null, Data source name =null, Member ID =null, Member Name =XXXXXX, EventID =null, RecordKey ID =3571135, VersionsToRetain =3, Retention Days =90, IsChained =false, Purge Log File =PURGE1574070324208.log, all Enterprises =false, all Data sources =false, all repositories =false, hints =null, bulk mode (reserved) =null, archive data =null, interval =null, Start Date =null, End Date =null, Limit =null, Purge Policy =null, Incremental =null, Purge job name =null, User defined file name =null,Password is not null
Initiating purge for Sydney
Exception in thread "main" java.lang.NoClassDefFoundError: org/hibernate/HibernateException
at com.tibco.mdm.infrastructure.util.InitClassUtil.onLoadClassException(InitClassUtil.java:818)
at com.tibco.mdm.infrastructure.util.InitClassUtil.loadClass(InitClassUtil.java:356)
at com.tibco.mdm.infrastructure.util.InitClassUtil.createObject(InitClassUtil.java:106)
at com.tibco.mdm.infrastructure.util.InitClassUtil.createObject(InitClassUtil.java:85)
at com.tibco.mdm.integration.handlers.CommunicationInitializer.initSSL(CommunicationInitializer.java:206)
at com.tibco.mdm.integration.handlers.CommunicationInitializer.init(CommunicationInitializer.java:109)
at com.tibco.mdm.util.test.InitUtil.initCommInitializer(InitUtil.java:60)
at com.tibco.mdm.purge.PurgeHelper.main(PurgeHelper.java:2340)
Caused by: java.lang.ClassNotFoundException: org.hibernate.HibernateException
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at com.tibco.mdm.util.logging.MqLog.<clinit>(MqLog.java:50)
at com.tibco.mdm.infrastructure.globalobj.MqStartup.<clinit>(MqStartup.java:80)
at com.tibco.mdm.purge.PurgeHelper.main(PurgeHelper.java:2326)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 3 more