Support Article
Cookie error when invoking an agent through a Java program
SA-3627
Summary
User is trying to invoke an agent through a Java program, but gets the following errors in the log.
Error Messages
2014-11-07 10:24:35,167 [fault (self-tuning)'] [ STANDARD] [ PegaRULES:07.10] (ngineinterface.service.HttpAPI) ERROR server1| user1 - 127.0.0.1: com.pega.pegarules.priv.context.CookieDisabledException
com.pega.pegarules.priv.context.CookieDisabledException: An error has occurred which indicates that your browser does not support Cookies. You must enable Cookies in order to use this application
Steps to Reproduce
1. Send a SnapStart URL to PRPC through a Java program. This is a URL that includes user and password information:
http://server1:<PORT>/prweb/PRServlet?pyActivity=MyClass.MyActivity&pzAuth=MyApp:AdminAccessGroup&UserIdentifier=MyUser&Password=[base64_encoded_password]
2. In the Java program:
// SEND THE URL REQUEST TO PROCESS COMMANDER
java.net.URLConnection httpConnection = url.openConnection();
Root Cause
The root cause of this problem is software use/operation error. The agents were directly called from a normal Java program.
Resolution
You cannot call agents directly from a normal Java program. You should use SOAP, JSR-94 or one of the other service based (headless) engine invocations.
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.