Question
Ernst & Young
US
Last activity: 27 Apr 2017 2:00 EDT
runPega.bat for Encryption of Blobs - Running JCECapabilities to determine available cipher choices
Not sure why I am getting this error....
I followed the below arcticle and copied all the required files as mentioned into TempRunPega folder but dont know why I am getting below error. Can someone please help me in this regards....
C:\install\pega7.2\scripts>runPega.bat --driver C:\TestRunPega\72\WEB-INF\lib\db
2jcc.jar --prweb C:\TestRunPega\72 --propfile C:\TestRunPega\72\WEB-INF\classes\
prbootstrap.properties com.pega.pegarules.exec.internal.util.crypto.JCECapabilit
ies
'#check' is not recognized as an internal or external command,
operable program or batch file.
Nov 01, 2016 6:50:45 PM com.pega.pegarules.internal.bootstrap.PRBootstrapDataSou
rce
19830421: Loading bootstrap properties from file:///C:\TestRunPega\72\WEB-INF\cl
asses\prbootstrap.properties
Nov 01, 2016 6:50:45 PM com.pega.pegarules.internal.bootstrap.SettingReaderJNDI
19830421: Could not find java:comp/env/prbootstrap/ in the local JNDI context, s
kipping prconfig setting lookup
Nov 01, 2016 6:50:45 PM com.pega.pegarules.internal.bootstrap.SettingReaderJNDI
19830421: Could not find prbootstrap in the local JNDI context, skipping prconfi
g setting lookup
Nov 01, 2016 6:50:45 PM com.pega.pegarules.internal.bootstrap.SettingReaderJNDI
Not sure why I am getting this error....
I followed the below arcticle and copied all the required files as mentioned into TempRunPega folder but dont know why I am getting below error. Can someone please help me in this regards....
C:\install\pega7.2\scripts>runPega.bat --driver C:\TestRunPega\72\WEB-INF\lib\db
2jcc.jar --prweb C:\TestRunPega\72 --propfile C:\TestRunPega\72\WEB-INF\classes\
prbootstrap.properties com.pega.pegarules.exec.internal.util.crypto.JCECapabilit
ies
'#check' is not recognized as an internal or external command,
operable program or batch file.
Nov 01, 2016 6:50:45 PM com.pega.pegarules.internal.bootstrap.PRBootstrapDataSou
rce
19830421: Loading bootstrap properties from file:///C:\TestRunPega\72\WEB-INF\cl
asses\prbootstrap.properties
Nov 01, 2016 6:50:45 PM com.pega.pegarules.internal.bootstrap.SettingReaderJNDI
19830421: Could not find java:comp/env/prbootstrap/ in the local JNDI context, s
kipping prconfig setting lookup
Nov 01, 2016 6:50:45 PM com.pega.pegarules.internal.bootstrap.SettingReaderJNDI
19830421: Could not find prbootstrap in the local JNDI context, skipping prconfi
g setting lookup
Nov 01, 2016 6:50:45 PM com.pega.pegarules.internal.bootstrap.SettingReaderJNDI
19830421: Could not find java:comp/env/prconfig/ in the local JNDI context, skip
ping prconfig setting lookup
Nov 01, 2016 6:50:45 PM com.pega.pegarules.internal.bootstrap.SettingReaderJNDI
19830421: Could not find prconfig in the local JNDI context, skipping prconfig s
etting lookup
Nov 01, 2016 6:50:45 PM com.pega.pegarules.internal.bootstrap.PRBootstrapDataSou
rce
19830421: Bootstrap datatables schema: null
Nov 01, 2016 6:50:45 PM com.pega.pegarules.internal.bootstrap.PRBootstrap
19830421: Engine schema defined in allclasses: null
Nov 01, 2016 6:50:45 PM com.pega.pegarules.internal.bootstrap.SettingReaderJNDI
19830421: Could not find java:comp/env/prconfig/ in the local JNDI context, skip
ping prconfig setting lookup
Nov 01, 2016 6:50:45 PM com.pega.pegarules.internal.bootstrap.SettingReaderJNDI
19830421: Could not find prconfig in the local JNDI context, skipping prconfig s
etting lookup
Nov 01, 2016 6:50:45 PM com.pega.pegarules.internal.bootstrap.PRBootstrap
19830421: Engine classes schema: null
Nov 01, 2016 6:50:45 PM com.pega.pegarules.internal.bootstrap.PRBootstrap
19830421: Assembled classes schema: null
Nov 01, 2016 6:50:45 PM com.pega.pegarules.internal.bootstrap.PRBootstrap
19830421: prbootstrap.properties merged with prbootstrap entries in Data-Admin-S
ystem-Settings
Nov 01, 2016 6:50:45 PM com.pega.pegarules.internal.bootstrap.PRBootstrap
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
US
can you comment out the line '#check if ...' in runPega.bat by adding 'rem' at the beginning?
Pegasystems Inc.
US
In your prbootstrap.properties file -
1. Comment out the followowing line as below
#com.pega.pegarules.bootstrap.allclasses.datasource=java:comp/env/jdbc/PegaRULES
2. Uncomment the following line as below -
com.pega.pegarules.bootstrap.ignorejndi=true
3. Define the dbcp jdbc url, username and driver class approriate to your database type as below (example below shows IBM DB2) -
com.pega.pegarules.bootstrap.allclasses.dbcpsource=example.ibmdb2
example.ibmdb2.url=jdbc:db2://HOSTNAME:50000/DBNAME
example.ibmdb2.username=username
example.ibmdb2.password=password
ibmdb2.jdbc.class=com.ibm.db2.jcc.DB2Driver
com.pega.pegarules.bootstrap.allclasses.schema=RULES_SCHEMA_NAME
com.pega.pegarules.bootstrap.datatables.schema=DATA_SCHEMA_NAME
3. Save the prbootstrap.properties file, run the script and give a try.
Ernst & Young
US
Thanks Kevin & NKur.
I tried commenting #check and gave all the DB details in prbootstrap.properties file. But I am still getting this error.
Is there anything i am missing? Do we need to make any changes in the local copy of prconfig.xml file?
C:\install\pega7.2\scripts>runPega.bat --driver C:\TestRunPega\72\WEB-INF\lib\db
2jcc.jar --prweb C:\TestRunPega\72 --propfile C:\TestRunPega\72\WEB-INF\classes\
prbootstrap.properties com.pega.pegarules.exec.internal.util.crypto.JCECapabilit
ies
Nov 04, 2016 1:11:15 PM com.pega.pegarules.internal.bootstrap.PRBootstrapDataSou
rce
19830421: Loading bootstrap properties from file:///C:\TestRunPega\72\WEB-INF\cl
asses\prbootstrap.properties
Nov 04, 2016 1:11:15 PM com.pega.pegarules.internal.bootstrap.SettingReaderJNDI
19830421: Could not find java:comp/env/prbootstrap/ in the local JNDI context, s
kipping prconfig setting lookup
Nov 04, 2016 1:11:15 PM com.pega.pegarules.internal.bootstrap.SettingReaderJNDI
Thanks Kevin & NKur.
I tried commenting #check and gave all the DB details in prbootstrap.properties file. But I am still getting this error.
Is there anything i am missing? Do we need to make any changes in the local copy of prconfig.xml file?
C:\install\pega7.2\scripts>runPega.bat --driver C:\TestRunPega\72\WEB-INF\lib\db
2jcc.jar --prweb C:\TestRunPega\72 --propfile C:\TestRunPega\72\WEB-INF\classes\
prbootstrap.properties com.pega.pegarules.exec.internal.util.crypto.JCECapabilit
ies
Nov 04, 2016 1:11:15 PM com.pega.pegarules.internal.bootstrap.PRBootstrapDataSou
rce
19830421: Loading bootstrap properties from file:///C:\TestRunPega\72\WEB-INF\cl
asses\prbootstrap.properties
Nov 04, 2016 1:11:15 PM com.pega.pegarules.internal.bootstrap.SettingReaderJNDI
19830421: Could not find java:comp/env/prbootstrap/ in the local JNDI context, s
kipping prconfig setting lookup
Nov 04, 2016 1:11:15 PM com.pega.pegarules.internal.bootstrap.SettingReaderJNDI
19830421: Could not find prbootstrap in the local JNDI context, skipping prconfi
g setting lookup
Nov 04, 2016 1:11:15 PM com.pega.pegarules.internal.bootstrap.PRBootstrapDataSou
rce
19830421: Bootstrap datatables schema: PEGA7DATA
Nov 04, 2016 1:11:15 PM com.pega.pegarules.internal.bootstrap.PRBootstrapDataSou
rce
19830421: Insufficient data supplied in prbootstrap.properties to create a datas
ource
Nov 04, 2016 1:11:15 PM com.pega.pegarules.internal.bootstrap.PRBootstrapDataSou
rce
19830421: Missing JDBC driver class setting "ibmdb2.jdbc.class"
Nov 04, 2016 1:11:15 PM com.pega.pegarules.internal.bootstrap.PRBootstrap
19830421: Engine schema defined in allclasses: PEGA7RULES
Nov 04, 2016 1:11:15 PM com.pega.pegarules.internal.bootstrap.PRBootstrap
19830421: Engine classes schema: PEGA7RULES
Nov 04, 2016 1:11:15 PM com.pega.pegarules.internal.bootstrap.PRBootstrap
19830421: Assembled classes schema: PEGA7RULES
Nov 04, 2016 1:11:15 PM com.pega.pegarules.internal.bootstrap.PRBootstrap
19830421: prbootstrap.properties merged with prbootstrap entries in Data-Admin-S
ystem-Settings
Nov 04, 2016 1:11:15 PM com.pega.pegarules.internal.bootstrap.PRBootstrapDataSou
rce
19830421: Insufficient data supplied in prbootstrap.properties to create a datas
ource
Nov 04, 2016 1:11:15 PM com.pega.pegarules.internal.bootstrap.PRBootstrapDataSou
rce
19830421: Missing JDBC driver class setting "ibmdb2.jdbc.class"
Nov 04, 2016 1:11:15 PM com.pega.pegarules.internal.bootstrap.PRBootstrap
19830421: PRBootstrap.calculateEngineCodeVersionFromDB() - unable to calculate c
odeset version from database: null
Nov 04, 2016 1:11:15 PM com.pega.pegarules.internal.bootstrap.PRMiniLoader
19830421: Will load phase 2 bootstrap from Pega-EngineCode:
Ernst & Young
US
Did anyone got a chance to look at this? I am stuck here and couldnt move forward.
Pegasystems Inc.
US
Missing JDBC driver class setting "ibmdb2.jdbc.class"
Is this jar actually in this location? You should try with db2jcc4.jar as the db2jcc.jar is not a support version
--driver C:\TestRunPega\72\WEB-INF\lib\db2jcc.jar
Ernst & Young
US
Yes I have the lib file in that folder and I even tried passing db2jcc4.jar in the command. I still get the same error.
19830421: Could not find java:comp/env/prbootstrap/ in the local JNDI context, s
kipping prconfig setting lookup
Nov 07, 2016 11:17:16 AM com.pega.pegarules.internal.bootstrap.SettingReaderJNDI
19830421: Could not find prbootstrap in the local JNDI context, skipping prconfi
g setting lookup
Nov 07, 2016 11:17:16 AM com.pega.pegarules.internal.bootstrap.PRBootstrapDataSo
urce
19830421: Insufficient data supplied in prbootstrap.properties to create a datas
ource
Nov 07, 2016 11:17:16 AM com.pega.pegarules.internal.bootstrap.PRBootstrapDataSo
urce
19830421: Missing JDBC driver class setting "ibmdb2.jdbc.class"
Pegasystems Inc.
US
Change this from:
ibmdb2.jdbc.class=com.ibm.db2.jcc.DB2Driver
to:
db2.jdbc.class=com.ibm.db2.jcc.DB2Driver
Coforge Technologies (Erstwhile Incessant Technologies)
GB
I am also facing the same kind of issue, but my driver is MSSQL driver
com.pega.pegarules.bootstrap.allclasses.dbcpsource=pega.jdbc
pega.jdbc.url=jdbc:sqlserver://mod_saas_uat:50260;SendStringParametersAsUnicode=false;SelectMethod=cursor;DatabaseName=pega_rules_xxxxx
pega.database.type=mssql
pega.jdbc.username=XXXX
pega.jdbc.password=xxxxxx
pega.jdbc.driver.class=com.microsoft.sqlserver.jdbc.SQLServerDriver
pega.jdbc.driver.jar=\WEB-INF\lib\sqljdbc4-4.0.2206.100.jar
com.pega.pegarules.bootstrap.allclasses.schema=rules
com.pega.pegarules.bootstrap.datatables.schema=data
Still getting the below error when trying to run "runPega.bat" script.
Error:Could not find or load main class com.pega.pegarules.pub.PegaRULES
Pegasystems Inc.
US
Change
pega.jdbc.driver.class=com.microsoft.sqlserver.jdbc.SQLServerDriver
to
mssql.jdbc.class=com.microsoft.sqlserver.jdbc.SQLServerDriver
Coforge Technologies (Erstwhile Incessant Technologies)
GB
Hi,
Updated it in Prbootstrap.properties file, still i am getting the below errror.
Error:Could not find or load main class com.pega.pegarules.pub.PegaRULES
Regards,
Praveen.
Pegasystems Inc.
US
Have you set up the directories as outlined in the PDN article? Please send screenshots of your directory contents. Also what version of Pega are you running?
Coforge Technologies (Erstwhile Incessant Technologies)
GB
jdbc.jdbc.class=com.microsoft.sqlserver.jdbc.SQLServerDriver
Above line to be updated in prbootstrap.properties file. Need to give "prweb.war" file folder path, not file path in "runPega.bat" script exection .
It worked for me, thanks for you guidance.
Ernst & Young
US
Thanks Celeste It Works.
Now I have a different one while I want to load my own cipher class into data base.
I ran the runPega.bat and created my own Implementation class for site Cipher and want to complie and load that in to PEGARules Data base.
I copied the code into a notepad which is generated from PRCipherGenerator as shown in the below link and made my changes by extending it to my own implementation class.
I am little confuse now with the compileAndLoad.bat Command, how will it pick my modified generated code, compile and load it in Database.
Extended Class:
package com.pega.pegarules.exec.internal.util.crypto;
import com.pega.pegarules.exec.internal.util.crypto.PRCipherBase;
public class RWCipherClass extends com.pega.pegarules.exec.internal.util.crypto.PRCipherBase {
<<my cipher code>>
}
Command:
Thanks Celeste It Works.
Now I have a different one while I want to load my own cipher class into data base.
I ran the runPega.bat and created my own Implementation class for site Cipher and want to complie and load that in to PEGARules Data base.
I copied the code into a notepad which is generated from PRCipherGenerator as shown in the below link and made my changes by extending it to my own implementation class.
I am little confuse now with the compileAndLoad.bat Command, how will it pick my modified generated code, compile and load it in Database.
Extended Class:
package com.pega.pegarules.exec.internal.util.crypto;
import com.pega.pegarules.exec.internal.util.crypto.PRCipherBase;
public class RWCipherClass extends com.pega.pegarules.exec.internal.util.crypto.PRCipherBase {
<<my cipher code>>
}
Command:
compileAndLoad.bat --driver C:\TestRunPega\72\WEB-INF\lib\db2jcc4.jar --prweb C:\TestRunPega\72 --propfile C:\TestRunPega\72\WEB-INF\classes\prbootstrap.properties --basedir=C:\TestRunPega\72\ --jarfile=CipherClas
sBC --codeset=pega-enginecode --codesetversion=06-03-10 -prprivate "com\pega\pegarules\exec\internal\util\crypto\PRCipherSampleBF"
Error:
2016-11-07 16:08:16,947 [ main] [ ] [
] [ ] (ernal.access.DataSourceManager) ERROR - Unable to o
btain DataSource for pegadata: java:comp/env/jdbc/PegaRULES
Nov 07, 2016 4:08:16 PM com.pega.pegarules.internal.bootstrap.PRBootstrap
SEVERE: Problem during method invocation (main)
com.pega.pegarules.pub.PRRuntimeException: Error determining the mode of PRPC in
stall from database.
at com.pega.pegarules.data.internal.PRDataProviderImpl.isMultiTenantEnvi
ronment(PRDataProviderImpl.java:1145)
at com.pega.pegarules.generation.internal.compiler.PRCompilerEclipse.mai
n(PRCompilerEclipse.java:186)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBoot
strap.java:367)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropaga
tingThrowable(PRBootstrap.java:408)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invo
keMethodPropagatingThrowable(AppServerBridgeToPega.java:223)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invo
keMethod(AppServerBridgeToPega.java:272)
at com.pega.pegarules.pub.PegaRULES.main(PegaRULES.java:85)
Caused by: com.pega.pegarules.pub.database.BadDatabaseDefinitionException: Datab
ase-BadDBDef-Missing pegadata
From: (unknown)
Pegasystems Inc.
US
Post the prconfig.xml file that you are using. It looks like the datasource specified there isn't correct.
Based upon the --basedir and --prprivate parameters the script will specify where your cipher java class is specified. Basically the class will get compiled and jarred up and imported into the codeset/version specified.
Ernst & Young
US
Please find the prconfig file attached in txt format.
looking at my java code below what should be my --prprivate parameter, is this something i have to construct. How iwll it able to pick up my code when i complie.
package com.pega.pegarules.exec.internal.util.crypto;
import com.pega.pegarules.exec.internal.util.crypto.PRCipherBase;
public class RWCipherClass extends com.pega.pegarules.exec.internal.util.crypto.PRCipherBase {
<<my cipher code>>
}
Thanks in advance.
Pegasystems Inc.
US
You need to specify your database connections in this file. Uncommit the section of properties at the bottom and fill them in. Besides the database/drivers, url, username, and password you also need to specify the defaultschema for both your rules and data schemas. Replace the value string with your schema names.
<env name="database/databases/PegaRULES/defaultSchema" value="v72rules" type="java.lang.String"/>
<env name="database/databases/PegaDATA/defaultSchema" value="v72data" type="java.lang.String"/>
For your command you need to update your --private to be the package/classname in your java class. Then in the C:\TestRunPega\72\com\pega\pegarules\exec\internal\util\crypto directory you would put your RWCipherClass.java file.
compileAndLoad.bat --driver C:\TestRunPega\72\WEB-INF\lib\db2jcc4.jar --prweb C:\TestRunPega\72 --propfile C:\TestRunPega\72\WEB-INF\classes\prbootstrap.properties --basedir=C:\TestRunPega\72\ --jarfile=CipherClas
sBC --codeset=pega-enginecode --codesetversion=06-03-10 --prprivate "com\pega\pegarules\exec\internal\util\crypto\RWCipherClass"
Coforge Technologies (Erstwhile Incessant Technologies)
GB
Hi Celeste_D,
I am also facing the same issue, not able to run "compileAndLoad.bat" script after updating "prconfig.xml" file, please check the below file and let me know if any changes needed.
******************************************************************************************************
Hi Celeste_D,
I am also facing the same issue, not able to run "compileAndLoad.bat" script after updating "prconfig.xml" file, please check the below file and let me know if any changes needed.
******************************************************************************************************
<?xml version="1.0" encoding="UTF-8"?>
<pegarules>
<!-- This is a minimum format prconfig.xml file. Only the settings which are required to access settings in the database are included.
All other settings which were formerly located only in this file are now Data-Admin-System-Settings. -->
<!--env name="initialization/settingsource" value="merged" />
<env name="database/databases/PegaRULES/dataSource" value="java:comp/env/jdbc/PegaRULES"/>
<env name="database/databases/PegaDATA/dataSource" value="java:comp/env/jdbc/PegaRULES"-->
<!-- Most nodes have a 'default' classification and for these nodes, no additional changes need to be made to this file. However,
if this is node has a non-general purpose, for example: 'Agent', then the node classification setting should be added to this file. -->
<!--env name="initialization/nodeclassification" value="Agent" / -->
<!-- Settings can still be put in this file. If they are, then the value in this file will override the value in the database
for this node. This is useful for settings which are specific to this node and should not be shared by multiple nodes on this
system. -->
<!--
Pegasystems recommends that you use Application Server connection pooling to the database for Websphere and
Weblogic. These examples are provided if you need to use Pega Connection Pooling for Tomcat or for testing purposes.
If you are using Application server connection pooling, there is no longer a need to edit this file.
****The new format for this file is only valid if you are using Application Server connection pooling. If you are not, please replace
this file with an older version. ***
Oracle 10g (Type 4) oracle.jdbc.OracleDriver jdbc:oracle:thin:@serverName:1521:db
IBM DB/2 Type 4 com.ibm.db2.jcc.DB2Driver jdbc:db2://serverName:port/dbName
SQL Server 2005 com.microsoft.sqlserver.jdbc.SQLServerDriver jdbc:sqlserver://serverName:1433;SelectMethod=cursor;SendStringParametersAsUnicode=false
-->
<env name="database/databases/PegaRULES/defaultSchema" value="rules" type="java.lang.String"/>
<env name="database/databases/PegaDATA/defaultSchema" value="data" type="java.lang.String"/>
<env name="database/drivers" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
<env name="database/databases/PegaRULES/url" value="jdbc:sqlserver://xxx_xxxx_uat:50260;SendStringParametersAsUnicode=false;SelectMethod=cursor;DatabaseName=pega_rules_xxxxx_uat" />
<env name="database/databases/PegaRULES/userName" value="pega_xxxxx_user_uat" />
<env name="database/databases/PegaRULES/password" value="xxxxx" />
<env name="database/databases/PegaDATA/url" value="jdbc:sqlserver://xxx_xxxx_uat:50260;SendStringParametersAsUnicode=false;SelectMethod=cursor;DatabaseName=pega_rules_xxxxx_uat" />
<env name="database/databases/PegaDATA/userName" value="pega_xxxxx_user_uat" />
<env name="database/databases/PegaDATA/password" value="xxxxxx" />
</pegarules>
Thanks,
Praveen.
Pegasystems Inc.
US
This screenshot is from trying to run the runPega script. Are you seeing this with that or with the compileandload script?
Provide a screenshot of the content of your WEB-INF/lib and WEB-INF/classes directory as well as the complete command you are executing.
Coforge Technologies (Erstwhile Incessant Technologies)
GB
Hi,
Thanks for your response, Please find the below as required.
Hi,
Thanks for your response, Please find the below as required.
compileAndLoad --driver C:\Users\pkammili\Documents\UAT_PRSysmgmt\SiteSpecificCipherTemp\WEB-INF\lib\sqljdbc4-4.0.2206.100.jar --prweb C:\Users\pkammili\Documents\UAT_PRSysmgmt\SiteSpecificCipherTemp\WEB-INF\prweb.war --propfile C:\Users\pkammili\Documents\UAT_PRSysmgmt\SiteSpecificCipherTemp\WEB-INF\classes\prbootstrap.properties --jarfile=CipherClassWMS --codeset=customer --codesetversion=06-01-01 -prprivate "com\pega\pegarules\exec\internal\util\crypto\PRCipherCOGWMSAES"
Pegasystems Inc.
US
Where is your prconfig.xml file? I don't see it in the WEB-INF/classes directory. I also don't see the com\pega\pegarules\exec\internal\util\crypto\ directory structure that holds the PRCipherCOGWMSAES java class. You will need to update --basedir below to point to the path that has the top level com directory.
Your command will look like this:
compileAndLoad --driver C:\Users\pkammili\Documents\UAT_PRSysmgmt\SiteSpecificCipherTemp\WEB-INF\lib\sqljdbc4-4.0.2206.100.jar --prweb C:\Users\pkammili\Documents\UAT_PRSysmgmt\SiteSpecificCipherTemp --basedir C:\Users\pkammili\Documents\UAT_PRSysmgmt\SiteSpecificCipherTemp\ --propfile C:\Users\pkammili\Documents\UAT_PRSysmgmt\SiteSpecificCipherTemp\WEB-INF\classes\prbootstrap.properties --jarfile=CipherClassWMS --codeset=customer --codesetversion=06-01-01 -prprivate "com\pega\pegarules\exec\internal\util\crypto\PRCipherCOGWMSAES
Coforge Technologies (Erstwhile Incessant Technologies)
GB
Hi Celeste_D,
Thank you very much, i was missing --basedir path, its working fine. I found difficulty while generating jar file, it was throwing error, then i followed your suggestion given in below posts, i generated jar file through "jar -cvf" command, and ran "compileAndLoad" script. It successfully completed and updated in database. One query here, without generating jar file manually won't the "compileAndLoad" script generate it. Your guidance is so helpful. Thanks again for your timely response.
I have one more query, regarding installation of site specific cipher in higher environments, do we need to follow the same process on each environment? or can we export the jar file to respective environment and configuring DSS will work?
Regards,
Praveen.
Pegasystems Inc.
US
The compileandload script should compile the Java class, create the jar file and load it into the database. You should not have had to create the jar file manually. There was an issue with the compileandload.bat script if your JAVA_HOME was set to path that included spaces. What were you seeing when you ran the script without making the jar on your own?
Coforge Technologies (Erstwhile Incessant Technologies)
GB
Hi Celeste_D,
The below one is the error i can see, when i directly run "compileAndLoad.bat" script, without manually generating the jar file. Could you please confirm my other question, do we need to run the entire process in other environments or can just export the jar file.
============ PegaRULES Bootstrap Configuration ============
Date: Mon Apr 10 14:16:29 EST 2017
Java Version: Sun Microsystems Inc. 1.6.0_26
Configuration: file:/C:/Users/pkammili/Documents/UAT_PRSysmgmt/SiteSpecificCipherTemp/WEB-INF/classes/prbootstrap.properties
Pega-EngineCode: 07-10-23
ASM Version: -415794285
Database: Microsoft SQL Server 10.50.6000
Driver: Microsoft JDBC Driver 4.0 for SQL Server 4.0.2206.100
Active CodeSets: pega-enginecode:07-10-23 at (latest patch)
customer:06-01-01 at (latest patch)
emg-jar:01-01-01 at (latest patch)
=============== End Bootstrap Configuration ===============
Hi Celeste_D,
The below one is the error i can see, when i directly run "compileAndLoad.bat" script, without manually generating the jar file. Could you please confirm my other question, do we need to run the entire process in other environments or can just export the jar file.
============ PegaRULES Bootstrap Configuration ============
Date: Mon Apr 10 14:16:29 EST 2017
Java Version: Sun Microsystems Inc. 1.6.0_26
Configuration: file:/C:/Users/pkammili/Documents/UAT_PRSysmgmt/SiteSpecificCipherTemp/WEB-INF/classes/prbootstrap.properties
Pega-EngineCode: 07-10-23
ASM Version: -415794285
Database: Microsoft SQL Server 10.50.6000
Driver: Microsoft JDBC Driver 4.0 for SQL Server 4.0.2206.100
Active CodeSets: pega-enginecode:07-10-23 at (latest patch)
customer:06-01-01 at (latest patch)
emg-jar:01-01-01 at (latest patch)
=============== End Bootstrap Configuration ===============
10/04/2017 2:16:29 PM com.pega.pegarules.internal.bootstrap.phase2.util.JarLoaderTool parseDate
WARNING: No patch date specified, using current date: 2017-04-10 14.16 EST
10/04/2017 2:16:29 PM com.pega.pegarules.internal.bootstrap.phase2.util.JarLoaderTool printThrowable
WARNING:
java.io.FileNotFoundException: C:\Users\pkammili\Documents\UAT_PRSysmgmt\SiteSpecificCipherTemp\bin\CipherClassWMS.jar (The system cannot find the file specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:127)
at java.util.jar.JarFile.<init>(JarFile.java:135)
at java.util.jar.JarFile.<init>(JarFile.java:99)
at com.pega.pegarules.internal.bootstrap.phase2.util.JarLoaderTool.processOneJar(JarLoaderTool.java:754)
at com.pega.pegarules.internal.bootstrap.phase2.util.JarLoaderTool.importPath(JarLoaderTool.java:1717)
at com.pega.pegarules.internal.bootstrap.phase2.util.JarLoaderTool.importPath(JarLoaderTool.java:1436)
at com.pega.pegarules.internal.bootstrap.phase2.util.JarLoaderTool.mainImpl(JarLoaderTool.java:1373)
at com.pega.pegarules.internal.bootstrap.phase2.util.JarLoaderTool.main(JarLoaderTool.java:1126)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:367)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:408)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingThrowable(AppServerBridgeToPega.java:223)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethod(AppServerBridgeToPega.java:272)
at com.pega.pegarules.pub.PegaRULES.main(PegaRULES.java:85)
10/04/2017 2:16:29 PM com.pega.pegarules.internal.bootstrap.phase2.util.JarLoaderTool initDBConnection
INFO:
Will load CodeSet: 'customer' with CodeSetVersion: '06-01-01' with patch date: ''
Regards,
Praveen.
Pegasystems Inc.
US
That is the same error that I mentioned where you will see an issue if your JAVA_HOME path contains a space. This has been corrected in later versions of the script.
The line # may vary depending on what version of the media you are using but it should be around line #80.
From:
%JAVA_HOME%\bin\jar cfvM %jarFile% .
TO:
"%JAVA_HOME%\bin\jar" cfvM %jarFile% .
Coforge Technologies (Erstwhile Incessant Technologies)
GB
Hi Celeste_D,
Installation of site specific cipher in higher environments, do we need to follow the same process on each environment? or can we export the jar file to respective environment and configuring DSS will work?
Regards,
Praveen.
Pegasystems Inc.
US
You could either run compileandload in each environment or export the jar from one lower environment to import into the next. Some things to think about. If using Pega-enginecode codeset then as you upgrade Pega versions you also need to move your cipher to higher codeset version to match the pega version you are running on. If you import it into Customer 06-01-01 then that codeset version does not change as you upgrade Pega versions.
Coforge Technologies (Erstwhile Incessant Technologies)
GB
Hi Celeste_D,
I have completed cipher installation, now i am configuring few properties from "Text" data type to "TextEncrypted" data type to have their clipboard and database values unreadable in encrypted code. I have one query here, do we need to handle UI controls and data validations on those properties which are converted from "Text" data type to "TextEncrypted" data type. I found few validations are failing until i use decrypt function in validation rule for the "TextEncrypted" data type property. Appreciate the response asap.
Regards,
Praveen.
Pegasystems Inc.
US
Do you want to display the encrypted property on the UI?
There is a ShowTextEncrypted control.
Coforge Technologies (Erstwhile Incessant Technologies)
GB
Hi Celeste,
I applied "ShowEncryptedText" control on UI wherever the property referred, on UI it s working fine, whereas in reports, validations and correspondence rules it is failing if we won't use decrypt function.
Regards,
Praveen.
Coforge Technologies (Erstwhile Incessant Technologies)
GB
Hi Celeste_D,
I am not able to choose AES cipher with key length of 192 or 256, only can select 128 and successfully install. As per my requirement i need to implement only 192 or 256 key length, how to get it. If we need some other ciphers which are not in the list, how to acquire them and install.
Regards.
Praveen.
Coforge Technologies (Erstwhile Incessant Technologies)
GB
We need to install the JCE Unlimited Strength Jurisdiction Policy Files to use AES keysizes larger than 128 bits.the files need to be copied into {JAVA_HOME}/jre/lib/Security folder
You may follow the steps given in the below article and check if the AES length is increased.
http://stackoverflow.com/questions/6481627/java-security-illegal-key-size-or-default-parameters
https://cwiki.apache.org/confluence/display/STONEHENGE/Installing+Java+Cryptography+Extension+%28JCE%29+Unlimited+Strength+Jurisdiction+Policy+Files+6
Ernst & Young
US
Thanks Celeste for the information.
The code is getting complied but for some reason it is unable to copy the file in bin folder and load it from there. Please find some of the log messages when i run the complieAndLoad.bat.
I cannot loactae the complied Jar file under the bin folder and how can we confirm if it (jar) is loaded completelly into the data base.
Compilation completed
C:\Program Files\Java\jdk1.7.0_45
Moved to bin directory C:\TestRunPega\72\bin
Creating an archive CipherClassBC.jar in directory C:\TestRunPega\72\bin
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
loading CipherClassBC.jar
Error:
19830421:
============ PegaRULES Bootstrap Configuration ============
Date: Tue Nov 08 11:46:10 CST 2016
Java Version: Oracle Corporation 1.7.0_45
Configuration: file:/C:/TestRunPega/72/WEB-INF/classes/prbootstrap.properties
Pega-EngineCode: 07-10-23
ASM Version: -415794285
Database: DB2/NT SQL09075
Driver: IBM Data Server Driver for JDBC and SQLJ 4.13.80
Active CodeSets: pega-enginecode:07-10-23 at (latest patch)
customer:06-01-01 at (latest patch)
=============== End Bootstrap Configuration ===============
Thanks Celeste for the information.
The code is getting complied but for some reason it is unable to copy the file in bin folder and load it from there. Please find some of the log messages when i run the complieAndLoad.bat.
I cannot loactae the complied Jar file under the bin folder and how can we confirm if it (jar) is loaded completelly into the data base.
Compilation completed
C:\Program Files\Java\jdk1.7.0_45
Moved to bin directory C:\TestRunPega\72\bin
Creating an archive CipherClassBC.jar in directory C:\TestRunPega\72\bin
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
loading CipherClassBC.jar
Error:
19830421:
============ PegaRULES Bootstrap Configuration ============
Date: Tue Nov 08 11:46:10 CST 2016
Java Version: Oracle Corporation 1.7.0_45
Configuration: file:/C:/TestRunPega/72/WEB-INF/classes/prbootstrap.properties
Pega-EngineCode: 07-10-23
ASM Version: -415794285
Database: DB2/NT SQL09075
Driver: IBM Data Server Driver for JDBC and SQLJ 4.13.80
Active CodeSets: pega-enginecode:07-10-23 at (latest patch)
customer:06-01-01 at (latest patch)
=============== End Bootstrap Configuration ===============
Nov 08, 2016 11:46:10 AM com.pega.pegarules.internal.bootstrap.phase2.util.JarLo
aderTool parseDate
WARNING: No patch date specified, using current date: 2016-11-08 11.46 CST
Nov 08, 2016 11:46:10 AM com.pega.pegarules.internal.bootstrap.phase2.util.JarLo
aderTool printThrowable
WARNING:
java.io.FileNotFoundException: C:\TestRunPega\72\bin\CipherClassBC.jar (The syst
em cannot find the file specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:215)
at java.util.zip.ZipFile.<init>(ZipFile.java:145)
at java.util.jar.JarFile.<init>(JarFile.java:153)
at java.util.jar.JarFile.<init>(JarFile.java:117)
Pegasystems Inc.
GB
Looks like the issue is with the space in the directory name
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
loading CipherClassBC.jar
Ernst & Young
US
Even i taught the same, but when i copy the JDK to a different folder it is not accepting it from there?
the compileAndLoad.bat validate the JAVA_HOME as shown below.
echo %JAVA_HOME%
if not "%JAVA_HOME%" == "" goto JavaHomeTest
echo The JAVA_HOME environment variable must be defined.
goto Error
:JavaHomeTest
if not exist "%JAVA_HOME%\bin\java.exe" goto JavaHomeBad
goto JavaHomeOk
:JavaHomeBad
echo The JAVA_HOME environment variable must point to a
echo valid installation of the JDK.
goto Error
This is not throwing any error as well. Let me know if you need any more info.
Pegasystems Inc.
US
On line 80 of the script change it to this:
"%JAVA_HOME%\bin\jar" cfvM %jarFile% .
Ernst & Young
US
I could able to move forward and see it is trying to load the file now. By looking at the logs i see there are no errors expect few warning messages.
How can i confirm if the Jar file is loaded correctly? Is there a way I can validate after runnning these commands?
Log Message:
I could able to move forward and see it is trying to load the file now. By looking at the logs i see there are no errors expect few warning messages.
How can i confirm if the Jar file is loaded correctly? Is there a way I can validate after runnning these commands?
Log Message:
Nov 08, 2016 1:24:03 PM com.pega.pegarules.internal.bootstrap.phase2.util.JarLoa
derTool parseDate
WARNING: No patch date specified, using current date: 2016-11-08 13.24 CST
Nov 08, 2016 1:24:03 PM com.pega.pegarules.internal.bootstrap.phase2.util.JarLoa
derTool initDBConnection
INFO:
Will load CodeSet: 'pega-enginecode' with CodeSetVersion: '06-03-10' with patch
date: ''
Nov 08, 2016 1:24:03 PM com.pega.pegarules.internal.bootstrap.phase2.util.JarLoa
derTool processOneJar
INFO: Loading: CipherClassBC.jar (no signature data exists in database)
Nov 08, 2016 1:24:03 PM com.pega.pegarules.internal.bootstrap.phase2.util.JarLoa
derTool reportOutput
INFO: Count of jar files: 1
Nov 08, 2016 1:24:03 PM com.pega.pegarules.internal.bootstrap.phase2.util.JarLoa
derTool reportOutput
INFO: Count of jar files loaded: 1
Nov 08, 2016 1:24:03 PM com.pega.pegarules.internal.bootstrap.phase2.util.JarLoa
derTool reportOutput
INFO: Count of jar files skipped: 0
Nov 08, 2016 1:24:03 PM com.pega.pegarules.internal.bootstrap.phase2.util.JarLoa
derTool reportOutput
INFO: Count of packages: 1
Nov 08, 2016 1:24:03 PM com.pega.pegarules.internal.bootstrap.phase2.util.JarLoa
derTool reportOutput
INFO: Count of classes: 1
Nov 08, 2016 1:24:03 PM com.pega.pegarules.internal.bootstrap.phase2.util.JarLoa
derTool reportOutput
INFO: Count of other resources: 0
Nov 08, 2016 1:24:03 PM com.pega.pegarules.internal.bootstrap.phase2.util.JarLoa
derTool reportOutput
INFO: = Total entries: 1
Nov 08, 2016 1:24:03 PM com.pega.pegarules.internal.bootstrap.phase2.util.JarLoa
derTool reportOutput
INFO: Count resources loaded: 1
Nov 08, 2016 1:24:03 PM com.pega.pegarules.internal.bootstrap.phase2.util.JarLoa
derTool reportOutput
INFO: Count resources not loaded: 0
Nov 08, 2016 1:24:03 PM com.pega.pegarules.internal.bootstrap.phase2.util.JarLoa
derTool reportOutput
INFO: Count jars stored: 0
Nov 08, 2016 1:24:03 PM com.pega.pegarules.internal.bootstrap.phase2.util.JarLoa
derTool reportOutput
INFO: Uncompressed size: 820
Nov 08, 2016 1:24:03 PM com.pega.pegarules.internal.bootstrap.phase2.util.JarLoa
derTool reportOutput
INFO: Jar compressed size: 531 -> 64.75609756097562% of uncompressed
size
Nov 08, 2016 1:24:03 PM com.pega.pegarules.internal.bootstrap.phase2.util.JarLoa
derTool reportOutput
INFO: Total processing time: 0.077 seconds
Nov 08, 2016 1:24:03 PM com.pega.pegarules.internal.bootstrap.phase2.util.JarLoa
derTool reportOutput
INFO: Read entry data time: 0.001 seconds
Nov 08, 2016 1:24:03 PM com.pega.pegarules.internal.bootstrap.phase2.util.JarLoa
derTool reportOutput
INFO: Longest package name: com/pega/pegarules/exec/internal/util/cry
pto (44)
Nov 08, 2016 1:24:03 PM com.pega.pegarules.internal.bootstrap.phase2.util.JarLoa
derTool reportOutput
INFO: Longest class name: RWCipherClass.class (19)
Pegasystems Inc.
US
Everything looks good in that log output. You can query the database to confirm everything is installed correctly.
select * from <rulesSchema>.pr_engineclasses where pzclass like '%RWCipherClass%';
You will need to specify the cipher in the prconfig file and restart the system in order to start using it.
Ernst & Young
US
Perfect. Thanks for the query. I can see an entry in the Data base.
Ernst & Young
US
All looks good to me now. I see an entry in the DB, changes the prconfig file with an entry as
<env name="crypto/sitecipherclass" value="com.pega.pegarules.exec.internal.util.crypto.RWCipherClass" />
but for some reason when i use the function @Utilities.encryptPropertyValue("Hello world") in an activity to see how it works i get the below error.
** encryptPropertyValue: No site-specific cipher algorithm |
Am i missing any thing here?
Pegasystems Inc.
US
Did you restart the system? If you go into SMA -> Administration -> Configuration Management do you see the crypto/sitecipherclass value?
Pegasystems Inc.
US
Actually by the directory structure in your command it looks like you are on some version of Pega 7.2 but you put your cipher in the 6.3sp1 codesetversion. If you are adding it to the pega-enginecode codeset then you need to put it in the version that corresponds to the Pega version you are running or it will not be picked up.
--codeset=pega-enginecode --codesetversion=06-03-10
If you are on Pega 7.2.1 then the codesetversion is 07-10-25
Ernst & Young
US
I am doing it on version 7.2, should the codesetversion be 07-10-23?
Pegasystems Inc.
US
Yes for 7.2 GA the codesetversion is 07-10-23
Ernst & Young
US
Thanks, it worked.
Accenture
IN
During Compile and Load I am getting error
"The import com.pega.pegarules.exec.internal.util.crypto.PRCipherBase cannot be resolved
"
What could be the reason ?
Pegasystems Inc.
IN
We believe that this question is now pursed as a new discussion: Receiving Error while running the compile and load utility
Regards,
Lochan | Community Moderator | Pegasystems Inc.
Accenture
IN
Yes the reason for this error seems to be prprivate.jar , where can i download this jar?