Support Article
Error - No enum constant when report is executed
SA-47485
Summary
User altered an existing Report to add a column with type as BYTEA, when processing the Report an error occurs.
Error Messages
No enum constant com.pega.pegarules.priv.database.sqlgen.constants.ColumnType.BYTEA
Steps to Reproduce
1. Add a column of type BYTEA to an existing Table.
2. Run the Report.
Root Cause
User used BYTEA datatype for a column in an external table.
And this column has been mapped to a property (in PRPC) which is of TEXT datatype. Then, user using this property in Report definition to extract it's value from DB. As this is not a valid scenario, Report definition is throwing an error.
Resolution
Following alternative solutions to implement their scenario has been given:
Alternative 1:
If there is a requirement to explicitly store this particular column into an external table, user can use this alternative.
If the property that is created in PRPC is not mapped to the column, this will be directly stored into BLOB (pzpvstream) and thereby you can expose the column and can use it through report definition.
Note: Incase user requirement is to store that particular column into an external table, use alternative 2.
Alternative 2:
Change the datatype of "<column_name_inDB>" column to TEXT datatype in corresponding external table.
As the property to which it is mapped is also of TEXT datatype, there will be no problem in getting the values through Report Definition.
Published March 23, 2018 - 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.