I am facing one issue i.e : we received a jar file from our java team, which when executed will give a key (String), This key will be used for further processing of Pega Flow . So the steps done by me are as follows :
1. Imported the .jar file in the Pega through Import Export wizard.
2. Restarted the Server
3. Trying to connect with the Jar file through Connect-Java method in activity.
Problem: While tracing the activity I find that the error is poping up that Class Not found .
Anyone faced the same issue ??
Attaching some of the screenshots too.
***Moderator Edit: Vidyaranjan | Tagged SR Exists***
Hi I have inserted the screenshots above in the previous post . Also the Tracer screenshot has been attached. if you need my activity screenshot it is simple page new and connect -Java method. 2 steps.
The connect-java service which I have written is attached here. (Updated the previous file)
We need to load the PegaRules.XML file . Now in our WAS system this file does not exists. So we have to make the same and load it in WAS server.
At run-time, the Process Commander classloader automatically searchs the jar files located in the ext\lib directory, as well as the class files located in the ext\classes directory.
If third-party classes or jar files are placed in any other location, and if a "Class not found" error appears for a Process Commander class, then it may be necessary to enter the information about the third-party class into the classpath entry in the pegarules.xml classloader node. The path should be the same as that entered into the defaultPaths entry described above.
Please see the classloader node (classpath entry) and compiler node (defaultPaths entry) in the pegarules.xml File section of the Administration and Security Guide for more details on the nodes and entries.
If the content of jar files or class files used by the Process Commander classloader changes during execution, the classloader can be forced to use the new content by clicking on the appropriate refresh button of the Classloader Status page of PRMonitorServlet.
The full Process Commander classloader path appears in the console log during startup.
So anyone knows about PegaRules.XML File ?? how to create it ?
do we have to specify anywhere that which version of CUSTOMER ruleset we are using for jar . Because I did Import it three times with changes in the jar file to 010101 , 010102 and 010103 versions of the customer ruleset. but it is always taking the old jar . Even if I am overwriting the 010101 jar with new changes and restarting the server after clearing the cache the old jar is getting reflected.
The old jar has been manually removed from the WAS server level too. Any Idea guys what is going wrong >??
Ok , So Finally I am able to connect to the Jar file from Pega. And It did n't work through the Connect-java at all . I wrote a Java Script in a activity which is connecting to the Jar file seamlessly .
Yes one more thing which is very very important, If you do have any certificates in your uploaded jar file then please be informed that the JREin which the Jar file was created should match with the JRE of your Pega application Server.
In my case I was having a mismatch . My Jar file and the jks file and certificates were created using Sun(Oracle) jre. But in our application server we use the JRE of the IBM. So Boom there was a mismatch, The sol was to recreate the jks in IBM jre , which actually changes some Certificate format in IBM readable rather than Oracle Readable. and it worked.
Actually I faced issue from starting of this to the every granular level of the implementation, but Finally it was done :)
Yes one more thing the Customer ruleset where you upload the Jar files have a serious Bug in 7.1.9 : Please do not upload the corrected jar in Customer:01-01-02 if the incorrect Jar has been already uploaded in Customer 01-01-01 .
Rule Resolution Algorithm does not work in Customer Ruleset . I tested it in our application, It always takes the 01-01-01 version , may be it is mentioned somewhere (restricted) to use 01-01-01 version only but I did not find that . So always overwright the 01-01-01 version with the corrected jar file . (not recommendable but it works that way).