| Summary: | PackageBuilder fails with StackOverflowError if declared model contains recursive data types | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise BRMS Platform 5 | Reporter: | Jiri Locker <jlocker> | ||||||
| Component: | BRE (Expert, Fusion) | Assignee: | Mario Fusco <mfusco> | ||||||
| Status: | ASSIGNED --- | QA Contact: | Jiri Locker <jlocker> | ||||||
| Severity: | unspecified | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | BRMS 5.3.0.GA | CC: | atangrin, lpetrovi, mproctor, rzhang | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: |
PackageBuilder fails with the StackOverflowError if the declared model contains recursive data types.
|
Story Points: | --- | ||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | Type: | --- | |||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Attachments: |
|
||||||||
Created attachment 534514 [details]
model-recursive.drl
Created attachment 534515 [details]
model-circular.drl
Mario Fusco <mario.fusco> updated the status of jira JBRULES-3229 to Resolved Mario Fusco <mario.fusco> made a comment on jira JBRULES-3229 Fixed also for circular type declarations like in: declare FactA fieldB: FactB end declare FactB fieldA: FactA end The fix only get in master branch in project and is not merged in 5.3.x branch, so it is not picked in the BRMS 5.3 product branch as well. So Assign back to developer. This issue also has no block+ flag. Need PM to decide wanted or not. This fix is tightly related with the CompositeKnowledgeBuilder, a brand new feature added in Drools 5.4 that allows to build more cross referencing DRL files at once. I don't think it will be easy to decouple the two, so my advice is to avoid to try to backport this fix unless strictly necessary. In that case, then we can move this to future release.
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
PackageBuilder fails with StackOverflowError if declared model contains recursive data types.
|
Description of problem: See attached drl files for sample models. When adding these resources to a KnowledgeBuilder, the compilation fails with java.lang.StackOverflowError. Version-Release number of selected component (if applicable): BRMS 5.3.0.DEV5 How reproducible: always Steps to Reproduce: run something like > Resource res = ResourceFactory.newClassPathResource("model-recursive.drl", getClass()); > KnowledgeBuilderFactory.newKnowledgeBuilder().add(res, ResourceType.DRL); Actual results: Exception in thread "main" java.lang.StackOverflowError at java.util.LinkedList$Entry.<init>(LinkedList.java:787) at java.util.LinkedList.addBefore(LinkedList.java:795) at java.util.LinkedList.add(LinkedList.java:215) at org.drools.compiler.PackageBuilder$Node.accept(PackageBuilder.java:2801) at org.drools.compiler.PackageBuilder$Node.accept(PackageBuilder.java:2805) ... Expected results: PackageBuilder should be able to compile packages with attached models or it should throw an exception if such models are not supported. Additional info: