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.
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.
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).
|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:
- Extract the content of OpenDocument_en.jar from lib folder. You will get folder as below:
- 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 in lib folder created in step 4.
- Re-create com.businessobjects.webpath.OpenDocument_lang.en.jar file including new OpenDocument_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.