If you are using JDeveloper 12.2.1.1 or 12.2.1.2, probably you run into transient expression compilation infinite loop issue. Infinite loop happens when you open ADF BC project and navigate to VO, which contains Groovy expressions. JDeveloper starts to print repeating message in the log - compiling TransientExpression and soon at some point JDeveloper window closing down without any feedback:
For those of you, who are not aware - there is a patch for this issue. Patch can be downloaded from Oracle Support, search for Patch: 25218838 (there is one for JDEV 12.2.1.2 and another one for JDEV 12.2.1.1):
If its your first time applying Oracle patch - no worries, process is very simple and smooth. Extract download patch zip archive first. Next setup ORACLE_HOME environment variable, point to root folder of JDEV install:
Once environment variable is set, run OPatch by executing opatch apply from the directory where patch archive was extracted. You can reference OPatch by direct path:
Hopefully fix provided by this patch will be included into next JDEV version by default.
For those of you, who are not aware - there is a patch for this issue. Patch can be downloaded from Oracle Support, search for Patch: 25218838 (there is one for JDEV 12.2.1.2 and another one for JDEV 12.2.1.1):
If its your first time applying Oracle patch - no worries, process is very simple and smooth. Extract download patch zip archive first. Next setup ORACLE_HOME environment variable, point to root folder of JDEV install:
Once environment variable is set, run OPatch by executing opatch apply from the directory where patch archive was extracted. You can reference OPatch by direct path:
Hopefully fix provided by this patch will be included into next JDEV version by default.
3 comments:
Hi Andrejus,
Thanks for sharing this patch.
I was the one who has filed the bug leading to this patch. I would like to share some additional points:
- The issue of the infinite loop can also be resolved by editing the audit rules. The auditing rules for XML - XML Dependency Checking need to be disabled and the infinite loop will stop as well. So in fact the patch that I received did not really fix the problem that I had, which is:
- The compilation of transient expressions will still occur at random moments while working with business components. It will not be infinite, but it will compile every single transient expression one-by-one. On larger projects, they can easily eat up all your RAM and CPU. On our largest Model project (with a few hundred business components and about 1400 groovy expressions) they eat up 16 GB of RAM, and get the CPU at 80% for about 10-15 minutes. Just for deleting a single EO for example...
- The solution to all the compilation of transient expressions would be to move them from ADF EO/VO XML to separate .bcs files (with groovy expressions). This is the Oracle recommendation that I got. These files are compiled in a different way, along with normal compilation, and do not eat up all your RAM and CPU.
- However, there is a bug in JDeveloper: it does not store the transient expressions that you enter in the dialog windows into the BCS files. It will read them from the BCS files but simply write a different value to the Business Component XML file, thereby removing the original values! After a few months I have received a patch for this (Patch 25475711 for 12.2.1.1).
- All done? No. Storing the transient expressions in BCS files causes at least one extra runtime bug: table filters using view objects with bind parameters stored in BCS files throw a NullPointerException. For us, this is a very common scenario. I have the ADF sources, but this bug was so nested in the ADF runtime that I could not overrule any method to solve this NPE. Bug 25993208 has been filed with Oracle, on priority 1, since May 3rd 2017. We are still waiting for a resolution.
Conclusion: yes, this patch will fix the infinite loop error. But on larger projects there are still severe problems surrounding the transient expressions.
Hi,
Thanks for feedback.
Yes, same issue was logged from other projects, I think Oracle got multiple tickets regarding this.
Follow up:
1. In one of our projects (but in other project it helped) it didnt help to uncheck audit rules, infinite loop was still reproduced - until this patch was applied. So, is not 100% it will help to uncheck audit rules, it seems
2. Yes, compilation occurs when you open VO or EO, but it is not infinite after patch is applied.
3. In current JDEV, I experienced many issues with external Groovy files BCS (same as you mention). For now in all our projects will follow conservative approach and turning off Groovy creation in external BCS file - http://andrejusb.blogspot.lt/2015/12/adf-bc-groovy-improvements-in-adf-1221.html
Regards,
Andrejus
Hi,
i am getting this even in 12.2.1.3.0
java version 1.8.0_144
is it not fixed in 12.2.1.3.0 ?.
Thanks
Regards,
Venkat
Post a Comment