Support Article
Unable to open rules - error "Failed to compile generated Java"
SA-4100
Summary
After an upgrade no rules can be opened in the Pega 7 development environment.
Error Messages
2014-11-25 07:00:13,951 [] [TABTHREAD0] [ ] [01.01.01] ( internal.access.Opener) ERROR your_url|<IP_Address> test - Caught exception during open
com.pega.pegarules.pub.database.BadInstanceDataException: problem creating a page from a stream: Invalid clipboard stream detected in module StorageStreamCommon.create(byte []). Reason: Invalid signature found in stream. Stream length = 10802; signature: 0x5A; compressed = false: code: <none> SQLState: Invalid clipboard stream detected in module StorageStreamCommon.create(byte []). Reason: Invalid signature found in stream. Stream length = 10802; signature: 0x5A; compressed = false Message: <none>
From: (H58634E526C99BEB1D1481CE13AE80A6A:127.0.0.1)
at com.pega.pegarules.data.internal.access.PageDatabaseMapperImpl.populatePageOrStringMapFromStreamColumn(PageDatabaseMapperImpl.java:2372)
at com.pega.pegarules.data.internal.access.PageDatabaseMapperImpl.createPageFromResultSet(PageDatabaseMapperImpl.java:469)
at com.pega.pegarules.data.internal.access.Opener.getResultFromResultSet(Opener.java:948)
....
Caused by: com.pega.pegarules.pub.clipboard.InvalidStreamError: Invalid clipboard stream detected in module StorageStreamCommon.create(byte []). Reason: Invalid signature found in stream. Stream length = 10802; signature: 0x5A; compressed = false
From: (H58634E526C99BEB1D1481CE13AE80A6A:127.0.0.1)
at com.pega.pegarules.data.internal.clipboard.StorageStreamCommonImpl.create(StorageStreamCommonImpl.java:644
…
Failed to compile generated Java [this:is:not:a:classname]: Exception caught while generating activity @baseclass.doUIAction @ step 5: com.pega.pegarules.pub.PRRuntimeException: PRRuntimeException
Steps to Reproduce
- Log into Designer Studio
- Attempt to open any rule
Root Cause
Pega 7 was recently upgraded to Pega 7.1.6 and the Pega migration tools were not used, instead DB tools were used.
This process corrupted the BLOB column,
This is a BLOB corruption issue related to the "Out Of The Box" (OOTB) pyDefault rule. By default BLOB data is compressed, When PRPC uncompressed the blob data from a record in the database to load into the clipboard, if the expanded blob is less than the expected size (based on a header field in the compressed data), then PRPC will treat it as an invalid blob and throw an exception.
Resolution
Copy the Rule-Obj-Model rule pyDefault in @baseclass from a working Pega 7.1.6 system where Pega migration scripts were used to upgrade and move it to the affected Pega instance.
Published January 31, 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.