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

Getting Java generation failed: null error during private edit

SA-29545

Summary



The user is on Pega 7.1.9 and reported that they are getting "Java generation failed: null" error while doing private edit of an activity used in downloading content of a PDF file within their flow. They are getting the error while doing private edit and then clicking on save button. Also, clicking on View Java option to see the generated java file shows a blank screen that doesn't have any java code.


Error Messages



2016-10-12 01:24:33,602 [ WebContainer : 6] [TABTHREAD1] [ ] [ PEG:01.02.01] ( internal.mgmt.Executable) ERROR [testpega]|[] testusr - Exception
java.lang.NullPointerException
at com.pega.pegarules.data.internal.access.RuleResolutionFieldComparator.compareRuleResolutionFields(RuleResolutionFieldComparator.java:213)
at com.pega.pegarules.data.internal.access.RuleCandidateComparator.compare(RuleCandidateComparator.java:121)
at com.pega.pegarules.data.internal.access.FirstLevelCandidatesResolver$ReusableComparator.compare(FirstLevelCandidatesResolver.java:145)
at com.pega.pegarules.data.internal.access.FirstLevelCandidatesResolver.insertionSort(FirstLevelCandidatesResolver.java:870)
at com.pega.pegarules.data.internal.access.FirstLevelCandidatesResolver.sortCandidates(FirstLevelCandidatesResolver.java:839)
at com.pega.pegarules.data.internal.access.FirstLevelCandidatesResolver.close(FirstLevelCandidatesResolver.java:663)
at com.pega.pegarules.data.internal.access.FirstLevelCandidatesResolver.resolve(FirstLevelCandidatesResolver.java:437)
at com.pega.pegarules.data.internal.access.UnifiedFirstLevelCandidatesFactory.acquire(UnifiedFirstLevelCandidatesFactory.java:306)
at com.pega.pegarules.data.internal.PRDataProviderImpl.borrowFirstLevelCandidateResults(PRDataProviderImpl.java:1164)
at com.pega.pegarules.exec.internal.declare.infengine.pages.DeclarativePageDefinitionCacheImpl.loadDefinition(DeclarativePageDefinitionCacheImpl.java:1237)
at com.pega.pegarules.exec.internal.declare.infengine.pages.DeclarativePageDefinitionCacheImpl.getDef(DeclarativePageDefinitionCacheImpl.java:535)
at com.pega.pegarules.exec.internal.declare.infengine.pages.DeclarativePageDefinitionCacheImpl.getDefinitionIfPresent(DeclarativePageDefinitionCacheImpl.java:475)


Steps to Reproduce

  1. Click on Private Edit.
  2. Click on Save or click on Save-As without doing a private edit.


Root Cause



An issue in the custom application code or rules is identified as root cause of the issue. The custom activity and the data page rule that it was referencing were corrupt which was causing the generation of the java code to fail.

Resolution



The following local change helped to resolve the issue:
  1. Delete the custom activity and data page rule referenced within the activity.
  2. Create the custom activity and the data page rule again as brand new rules instead of doing a save-as copies of the existing rules.

Published October 27, 2016 - 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