Support Article
No authorized function error when running report on unoptimized
Summary
When running a report definition, an error is encountered if the report definition has a property which is not optimized for reporting.Error Messages
Stack Trace root cause:
Type com.ibm.websphere.ce.cm.StaleConnectionException
Error message content:
Message NO AUTHORIZED FUNCTION NAMED DATA.PR_READ_FROM_STREAM HAVING COMPATIBLE ARGUMENTS WAS FOUND. SQLCODE=-440, SQLSTATE=42884, DRIVER=4.17.55
Steps to Reproduce
Run a report definition that references a property that is not exposed (optimized for reporting).
Root Cause
The User Defined Functions (UDFs) were not installed properly on this database.Resolution
To install the UDFs manually, there is a generateudf.bat/generateudf.sh script to install (or re-install) the UDFs in the installation media /scripts directory.
Before begining, confirm that these functions are not partially installed before beginning, as the steps below are for a fresh installation of the UDFs. To make sure they are not partially installed drop them explicitly using SQL like below:
DROP FUNCTION YOURSCHEMA.pr_read_from_stream;
DROP FUNCTION YOURSCHEMA.pr_read_decimal_from_stream;
DROP FUNCTION YOURSCHEMA.pr_read_int_from_stream;
If there is a split schema system, run these against both data schema and rules schema. If the functions are already not present, just move on to step 1 mentioned below:
- Confirm your setupDatabase.properties are set properly (database connection URL, username, password, and schema name(s).) This properties file is also in the /scripts directory of the installation media.
- Run the generateudf.bat (or .sh, as appropriate for your operating system platform) with the flags "--action install --dbType YourDatabaseType"
Published November 24, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.