In my previous blog, I shared my experience on displaying custom message in BI Launchpad login page. In comment, recently I received one request from Pallavi Deshmukh to customize error message returned by OpenDocument URL. In this blog, let me share the way I managed to get it done.
Requirement
The OpenDocument URL sometimes returns error message like below:
The above error may appear due to unavailability of the particular content in BO repository or restricted access for the user to view the content.
The requirement is to customize the text of above error message.
Assumption
I have tested the process with SAP BO BI Platform 4.1 SP5 installed in Windows server and configured with Tomcat as web application server.
Product Locale & Preferred Viewing Locale is English (en_US).
Steps
This customization is not supported by SAP. There is no guarantee that this approach will work in future releases of the product. |
Here are the steps to achieve the requirement:
- Navigate to <BO Installation directory>\SAP BusinessObjects Enterprise XI 4.0\warfiles\webapps\BOE\WEB-INF\eclipse\plugins.
- Take a backup of the file com.businessobjects.webpath.OpenDocument_lang.en.jar and keep in a safe location.
- Extract the content of the file. You will get folders as below:
\META-INF
MANIFEST.MF
\web
\WEB-INF
\lib
explorer_res_en.jar
OpenDocument_en.jar
reusable_components_res_en.jar
webutil_en.jar
- Extract the content of OpenDocument_en.jar from lib folder. You will get folder as below:
\META-INF
MANIFEST.MF
\com
\businessobjects
\opendoc
OpenDocResources_en.properties
- Open OpenDocResources_en.properties file in notepad and you can see the default error messages.
- Change the value of the property opendoc.doc.not.found as below:
opendoc.doc.not.found=Either the content does not exist in repository or you do not have access to view it.
- Save the file.
- Re-create OpenDocument_en.jar with the modified properties file. I copied the com folder and MANIFEST.MF file to <BO Installation Dir>\SAP BusinessObjects Enterprise XI 4.0\win64_x64\sapjvm\bin and then ran the jar.exe with the command below:
jar.exe cfm OpenDocument_en.jar MANIFEST.MF com
- Replace OpenDocument_en.jar file with the newly created one inlib folder created in step 4.
- Re-createcom.businessobjects.webpath.OpenDocument_lang.en.jar file including newOpenDocument_en.jar. I used the command below:
jar.exe cfm com.businessobjects.webpath.OpenDocument_lang.en.jar MANIFEST.MF web
- Replace the com.businessobjects.webpath.OpenDocument_lang.en.jar file in <BO Installation directory>\SAP BusinessObjects Enterprise XI 4.0\warfiles\webapps\BOE\WEB-INF\eclipse\plugins with newly created one. Make sure we have a backup of the original.
- Run WDeploy tool to re-deploy BOE web service. This step will take some time.
- Once tomcat has finished the deployment of BOE web service and BOE folder is fully re-generated in <Tomcat Installation Dir>\work\Catalina\localhost folder, check the opendocument url again which did show the error mentioned in requirement section.
- The customized error text is now displayed as we configured in step 6.