PurgeProcess.bat fix

Update

This bug should be fixed in Core | Quick Fix 1048-010

There is a command line tool in AEM Forms JEE that allows you to purge processes from the system. It can be found in <install-dir>/sdk/misc/Foundation/ProcessPurgeTool folder.

Problem is, it doesn’t work. It throws an error similar to:

UNEXPECTED ERROR!!! See the stack trace below for details.
 java.lang.NoClassDefFoundError: org/apache/commons/httpclient/protocol/SecureProtocolSocketFactory
 at com.adobe.idp.workflow.ProcessPurgeTool.getSoapClientFactory(ProcessPurgeTool.java:197)
 at com.adobe.idp.workflow.ProcessPurgeTool.purgeProcess(ProcessPurgeTool.java:291)
 at com.adobe.idp.workflow.ProcessPurgeTool.main(ProcessPurgeTool.java:457)
 Caused by: java.lang.ClassNotFoundException: org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory
 at java.net.URLClassLoader$1.run(Unknown Source)
 at java.net.URLClassLoader$1.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 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

Solution: you have to add %THIRDPARTY_DIR%\commons-httpclient-3.1.jar; to the SOAP_LIBS path in the batch file or shell script.

Windows Batch file

@ECHO OFF
SETLOCAL

IF NOT DEFINED LIVECYCLE_SDK_HOME (
ECHO Please set LIVECYCLE_SDK_HOME environment variable.
ECHO It should point to the LiveCycle SDK root directory.
ECHO For example: set LIVECYCLE_SDK_HOME=&amp;amp;quot;C:\Adobe\Adobe_Experience_Manager_forms\sdk&amp;amp;quot;
GOTO end
)

IF NOT EXIST &amp;amp;quot;%LIVECYCLE_SDK_HOME%\client-libs\common\adobe-livecycle-client.jar&amp;amp;quot; (
ECHO The LIVECYCLE_SDK_HOME environment variable seems to point to a wrong directory.
GOTO end
)

SET SDK_COMMON_DIR=%LIVECYCLE_SDK_HOME%\client-libs\common
SET THIRDPARTY_DIR=%LIVECYCLE_SDK_HOME%\client-libs\thirdparty
SET SOAP_LIBS=%THIRDPARTY_DIR%\activation.jar;%THIRDPARTY_DIR%\axis.jar;%THIRDPARTY_DIR%\commons-codec-1.3.jar;%THIRDPARTY_DIR%\commons-collections-3.1.jar;%THIRDPARTY_DIR%\commons-discovery.jar;%THIRDPARTY_DIR%\commons-logging.jar;%THIRDPARTY_DIR%\dom3-xml-apis-2.5.0.jar;%THIRDPARTY_DIR%\jaxen-1.1-beta-9.jar;%THIRDPARTY_DIR%\jaxrpc.jar;%THIRDPARTY_DIR%\log4j.jar;%THIRDPARTY_DIR%\mail.jar;%THIRDPARTY_DIR%\saaj.jar;%THIRDPARTY_DIR%\serializer.jar;%THIRDPARTY_DIR%\wsdl4j.jar;%THIRDPARTY_DIR%\xalan.jar;%THIRDPARTY_DIR%\xbean.jar;%THIRDPARTY_DIR%\xercesImpl.jar;%THIRDPARTY_DIR%\commons-httpclient-3.1.jar;
SET CLASSPATH=process-purge-tool.jar;%SDK_COMMON_DIR%\adobe-livecycle-client.jar;%SDK_COMMON_DIR%\adobe-workflow-client-sdk.jar;%SDK_COMMON_DIR%\adobe-jobmanager-client-sdk.jar;%SDK_COMMON_DIR%\adobe-usermanager-client.jar;%SOAP_LIBS%

CALL java -cp &amp;amp;quot;%CLASSPATH%&amp;amp;quot; com.adobe.idp.workflow.ProcessPurgeTool %*

:end
ENDLOCAL

Korn Shell script

#!/bin/ksh

if [ &amp;quot;$LIVECYCLE_SDK_HOME&amp;quot; == &amp;quot;&amp;quot; ] ; then
  echo &amp;quot;Please set LIVECYCLE_SDK_HOME environment variable.&amp;quot;
  echo &amp;quot;It should point to the LiveCycle SDK root directory.&amp;quot;
  echo &amp;quot;For example: export LIVECYCLE_SDK_HOME=/home/Adobe_Experience_Manager_forms/sdk&amp;quot;
  exit 1
fi

export SDK_COMMON_DIR=$LIVECYCLE_SDK_HOME/client-libs/common
export THIRDPARTY_DIR=$LIVECYCLE_SDK_HOME/client-libs/thirdparty
export SOAP_LIBS=$THIRDPARTY_DIR/activation.jar:$THIRDPARTY_DIR/axis.jar:$THIRDPARTY_DIR/commons-codec-1.3.jar:$THIRDPARTY_DIR/commons-collections-3.1.jar:$THIRDPARTY_DIR/commons-discovery.jar:$THIRDPARTY_DIR/commons-logging.jar:$THIRDPARTY_DIR/dom3-xml-apis-2.5.0.jar:$THIRDPARTY_DIR/jaxen-1.1-beta-9.jar:$THIRDPARTY_DIR/jaxrpc.jar:$THIRDPARTY_DIR/log4j.jar:$THIRDPARTY_DIR/mail.jar:$THIRDPARTY_DIR/saaj.jar:$THIRDPARTY_DIR/serializer.jar:$THIRDPARTY_DIR/wsdl4j.jar:$THIRDPARTY_DIR/xalan.jar:$THIRDPARTY_DIR/xbean.jar:$THIRDPARTY_DIR/xercesImpl.jar:$THIRDPARTY_DIR/commons-httpclient-3.1.jar
export CLASSPATH=./process-purge-tool.jar:$SDK_COMMON_DIR/adobe-livecycle-client.jar:$SDK_COMMON_DIR/adobe-workflow-client-sdk.jar:$SDK_COMMON_DIR/adobe-jobmanager-client-sdk.jar:$SDK_COMMON_DIR/adobe-usermanager-client.jar:$SOAP_LIBS

set -f

java -cp $CLASSPATH com.adobe.idp.workflow.ProcessPurgeTool &amp;quot;$@&amp;quot;

Email Batch Size

Simple tip today: Always make sure you change the default email Batch Size when you install your AEM Forms JEE server.

By default the Batch Size on sending emails is set to ‘2’. This means that if you are testing single emails or Forms Workflows notifications from your new server, you wont see an email until there are two of them waiting to be sent.

I would like to say this setting is fine for a production server or some other use-case, but in reality I can’t think of one. If, for some reason, one email for a particular Task notification is all that is processed for the last hour, then the recipient will never see that email until something else happens in the system to generate another email. Definitely not something that should happen.

The fix

  1. Open AdminUI (http://localhost:8080/adminui) and login
  2. Browse to Services > Applications and Services > Service Management
  3.  Enter email into the Name: filter field and click Filter
    email_1.png
  4. Click the Email provider service (1st in the list)
    email_2.png
  5. Change Batch Size: to 1
    email_3.png
  6. Save
aemblog

Everything AEM aka CQ5 based on my experience listed here.

Adobe AEM The Right Way

Best practices, tips, and tricks for your Adobe AEM project

/home/bkondepudi

A WCM journey with Day/Adobe CQ

Technoracle (a.k.a. "Duane's World")

A multi-purpose toolkit for the Adobe LiveCycle and AEM Forms developer.

Adobe LiveCycle Blog

A multi-purpose toolkit for the Adobe LiveCycle and AEM Forms developer.

A multi-purpose toolkit for the Adobe LiveCycle and AEM Forms developer.

XFA@Mobile

A multi-purpose toolkit for the Adobe LiveCycle and AEM Forms developer.

Code Monkey

Ramblings of a Developer