Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

pr_read_from_stream missing error FCM

SA-947

Summary



The below error message is displayed while executing the Report definition. It occurs upon including this property on the Report definition for FCM portal view of the work objects.

"There was a problem getting a list: code: 6522 SQLState: S0001 Message: A .NET Framework error occurred during execution of user-defined routine or aggregate "pr_read_from_stream"

pySystemName is an @baseclass property referenced.. 

There was 3 sql functions available on prpc 6.2 environment that have been removed with the Pega upgrade to v6.3 SP1:
pr_read_decimal_from_stream
pr_read_from_stream
pr_read_int_from_stream


Error Messages



There was a problem getting a list: code: 6522 SQLState: S0001 Message: A .NET Framework error occurred during execution of user-defined routine or aggregate "pr_read_from_stream


Root Cause



The root cause of this problem is the required Java UDF functions were dropped from the database during the upgrade, resulting in the failures being reported. 


Resolution



Re-installation of the Java UDF reporting feature.

Make sure all previous versions of the database functions are gone.

You can use plain SQL 'drop function' DDL [drop function pr_read_from_stream, etc.] or a database managing GUI program (like SQL Developer) to accomplish this.

Install the jar library into your database
The library is named prreadstream.jar (for all databases except SQL Server) or prreadstream.txt (for SQL Server). The tool needed to install the library is a main Java class named com.pega.pegarules.install.DatabaseLibraryLoader.

All of these can be found in the standard distribution image. prreadstream.jar and prreadstream.txt may be found under archives/udf, and DatabaseLibraryLoader class can be found in scripts/prdeploy.jar.

Once you have identified the library and the DatabaseLibraryLoader tool, you can use these to install the UDFs.

This utility was designed to be very similar to SQLLoader--it takes the same kind of properties file and mostly the same parameters.

To run the utility, you must specify a properties file which contains database connection information, as well as the jar containing the UDF. On SQL Server, instead of a jar, you must specify the location of the prreadstreamlib.txt library file. (This file contains the DLLs which need to be installed on SQL Server, in an encoded format.)

How do I use the DatabaseLibraryLoader?
If you run DatabaseLibraryLoaderwith the --help switch, it will tell you have to use it.

1. Loads a jar or a DLL containing user-defined functions and/or stored procedures into a database
2. DatabaseLibraryLoader [--help] --config=<file> --profile=<name> <jar/library pathname>
3. --help: Print this message, and exit
4. --config=<file>: Specifies the bootstrap config file used to connect to
5. --profile=<name>: Specifies the name of the datasource profile in the boostrap config to use.
6. <jar/library pathname>: The .jar file containing the Java UDF or .txt file representing the C# libraries to load.
7. This file is usually found in prprivate/libext.

When invoking this utility, the database driver classes must be on the classpath.

What properties go into the config file?
In the config file, you can specify one or more named datasources. For each datasource, you must specify the following properties:

Property

Value

Example

db-type.jdbc.class

The database driver class for the datasource. db-type is the database type, and must be oracle, db2, or mssql.

com.microsoft.sqlserver.jdbc.SQLServerDriver

name.db-type.url

The JDBC url of the database. name is the name of the datasource, and db-typeindicates the type of database (as described above).

jdbc://sqlserver://localhost;SelectMethod=cursor;SendStringParametersAsUnicode=false

name.db-type.username

The database user name.

name.db-type.password

The database password.

name.db-type.schema

The schema name to use when installing the jar or library into the database.

Example: On an Oracle DB, the arguments and the config file might look something like this:

user-deployudf.properties (the config file)
oracledate.jdbc.class=oracle.jdbc.OracleDriver
dev.oracledate.url=jdbc:oracle:thin:@localhost:1521:ORCL
dev.oracledate.username=PegaUser
dev.oracledate.password=pega
dev.oracledate.schema=PegaUser

The DatabaseLibraryLoader.java arguments
--config=C:/Users/PegaUser/...{path}.../PegaUser-deployudf.properties
--profile=dev.oracledate
C:/Users/PegaUser/workspace/prprivate/libext/prreadstream.jar

Create the database functions
There are three functions you need to create after the jar library has been loaded. For each database, there are scripts which can be run to create these functions in the distribution image. They are under schema/db/install/udfstatements.

Some of these scripts contain the text #DBOWNR. If this appears in the script, then each occurrence must be manually replaced with the name of the schema into which the UDF is to be installed. Similarly, #UDFWLM (only on DB2 z/OS) should be replaced with the name of a Java-enabled Workload Manager.





 

Published June 12, 2015 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us