Skip to main content
ExLibris
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    Adjusting local BIRT reports after upgrading to Rosetta SP 4.1

    • Article Type: General
    • Product: Rosetta
    • Product Version: 4.1

    Problem Symptoms:
    After upgrading to Rosetta SP 4.1 or higher, local / customized BIRT reports give errors such as:
    ReportDesign (id = 1):
    - Unhandled exception when executing script.

    ...
    TypeError: Cannot find function getInstitutionPath. (/report/method[@name="initialize"]#2).

    Cause:
    After moving from JBoss (Rosetta 4.0.1 or earlier) to Tomcat (Rosetta 4.1 and onwards), a modification is needed to BIRT reports that are using the institution tag (and getInstitutionPath function).

    Resolution:
    Replace the method section from:
    <method name="initialize"><![CDATA[if (reportContext != null &amp;&amp; reportContext.getHttpServletRequest() != null &amp;&amp; reportContext.getHttpServletRequest().getUserPrincipal() !=null){
    params["inst"] = reportContext.getHttpServletRequest().getUserPrincipal().getInstitutionPath();
    }else {
    params["inst"] = '%';
    }]]></method>

    to the updated version:
    <method name="initialize"><![CDATA[importPackage(Packages.com.exlibris.core.infra.common.security);
    if (UserPrincipalRetriever.getInstitutionPathNoException() !=null){
    params["inst"] = UserPrincipalRetriever.getInstitutionPathNoException();
    }else {
    params["inst"] = '%';
    }]]></method>

    Additional Information

    All reports (*.rptdesign files) should be situated at $dps_dev/ system.dir/thirdparty/tomcat/rosetta-webapps/dps-report-web.war/report.

    Category: Rosetta -


    • Article last edited: 3/12/2015