Passing A Key From “cgicmd.dat” File Returns Error “REP-52005-Specified Key Does Not Exist
Passing A Key From “cgicmd.dat” File Returns Error “REP-52005-Specified Key Does Not Exist
Titleimage
Posted by Patrick Hamou on 2016:04:19 21:19:45
Applies to
Oracle Reports Developer - Version 10.1.2.0.2 and later
Information in this document applies to any platform.
***Checked for relevance on 06-JAN-2014***
Symptoms
When using cgicmd.dat file to pass Username/Password@database connect string, and when running the report via rwservlet and passing key:
http://host:port/reports/rwservlet?cmdkey=keyname&server=servername&destype=
cache&desformat=pdf&report=reportname.rdf&cmdfile=/directory/cmdfile.view¶mform=no
The following error occurs:
REP-52005: The specified key 'keyname' does not exist in key map file.
The file cgicmd.dat, has the following entries
KEYNAME1: userid=username/password@database %*
KEYNAME2: userid=username/password@database %*
and rwservlet.properties (10Gr2) includes:
RELOAD_KEYMAP=YES
Cause
Entries within the cgicmd.dat file are missing blank lines after each key and at the end of the file.
Solution
For 10gR2 versions
1. Make backup copy of the file
ORACLE_HOME/reports/conf/cgicmd.dat
2. Insert a blank line between all keys and also at the end of the file.
Example Entry:
KEYNAME1: userid=username/password@database %*
KEYNAME2: userid=username/password@database %*
For 11g versions
- cgicmd.dat file is located in DOMAIN_HOME/config/fmwconfig/servers/WLS_REPORTS/applications/reports_11.1.1.2.0/configuration directory (11.1.1.2 and later)
- By default "reloadkeymap" property is set to NO and by default it wont be in rwservlet.properties file but the value is still NO.
- NO value means that you need to re-start WLS_REPORTS managed server in order to servlet see the changes in cgicmd.dat file
- A YES value means that cgicmd.dat file will be reloaded every time so no need to re-start WLS_REPORTS
- rwservlet.properties file is located in DOMAIN_OME/config/fmwconfig/servers/WLS_REPORTS/applications/reports_11.1.1.2.0/configuration directory (11.1.1.2 and later)
Rerefence
Note 1083666.1 - Location Of Different Reports Configuration Files in Fusion Middleware Forms and Reports 11.1.1.1 and 11.1.1.2 Installations
Important Note
The order of the properties in rwservlet.properties file have a special order and cannot be organized in different order.
The following is the order for all properties in rwservlet.properties file
<xs:sequence>
<xs:element name="server" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="singlesignon" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="inprocess" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="reports_servermap" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element ref="cookie" minOccurs="0" maxOccurs="1"/>
<xs:element name="defaultcharset" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element ref="webcommandaccess" minOccurs="0" maxOccurs="1"/>
<xs:element name="allowhtmltags" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="helpurl" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="imageurl" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="reloadkeymap" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="dbauth" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="sysauth" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="errortemplate" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element ref="diagtags" minOccurs="0" maxOccurs="1"/>
<xs:element ref="cluster" minOccurs="0" maxOccurs="1"/>
<xs:element ref="oidconnection" minOccurs="0" maxOccurs="1"/>
<xs:element name="allowauthid" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="enabledbproxy" type="xs:string" minOccurs="0" maxOccurs="1"/>
<!--xs:element ref="trace" minOccurs="0" maxOccurs="1"/-->
</xs:sequence>
The correct format to define "reloadkeymap" property in rwservlet.properties file is as follows:
<reloadkeymap>yes</reloadkeymap>
If you changed cgicmd.dat file manually and added some entries then WLS_REPORTS managed server needs to be re-started. This is because"reloadkeymap" property by default is set to NO
If you want to change "reloadkeymap" property to YES, then you need to add it in rwservlet.properties file and add the following property
<reloadkeymap>yes</reloadkeymap>
**** It is very important that the order of elements in rwservlet.properties file has the above order as explained in "important note" information
After this change in rwservlet.properties file you need to re-start WLS_REPORTS managed server
There is a way to add entries in cgicmd.dat file using Enterprise Manager and this is using the Mbean browser. For details please check the following Support Note
Note 1296010.1 - How to Update CGICMD.DAT Using System Mbean Browser 1296010.1
Posted by Patrick Hamou on 2016:04:19 21:19:45