Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 980378 - NullPointerException when declaring facts in DRL
Summary: NullPointerException when declaring facts in DRL
Keywords:
Status: CLOSED DUPLICATE of bug 976498
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: ---
Assignee: Edson Tirelli
QA Contact: Marek Winkler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-02 08:16 UTC by Marek Winkler
Modified: 2013-07-02 11:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-02 11:12:48 UTC
Type: Bug


Attachments (Terms of Use)

Description Marek Winkler 2013-07-02 08:16:34 UTC
Description of problem:

When compiling DRL declaring facts extending each other:

declare Person
    name : String
    age : int
end

declare Man extends Person

end

declare Woman extends Person

end


The PackageBuilder throws the following NPE:

java.lang.NullPointerException: null
	at org.drools.compiler.compiler.PackageBuilder.processTypeDeclarations(PackageBuilder.java:2253)
	at org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.buildTypeDeclarations(CompositeKnowledgeBuilderImpl.java:268)
	at org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.buildTypeDeclarations(CompositeKnowledgeBuilderImpl.java:247)
	at org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.buildPackages(CompositeKnowledgeBuilderImpl.java:85)
	at org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:75)
	at org.drools.compiler.kie.builder.impl.AbstractKieModule.buildKnowledgePackages(AbstractKieModule.java:186)
	at org.drools.compiler.kie.builder.impl.AbstractKieProject.verify(AbstractKieProject.java:39)
	at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieModule(KieBuilderImpl.java:269)
	at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:169)

Version-Release number of selected component (if applicable):

Drools 6.0.0-SNAPSHOT
Drools 6.0.0.Beta4

This worked in 6.0.0.Beta3, marking as regression.

Comment 1 Marek Winkler 2013-07-02 11:09:48 UTC
It turns out that the problem is related to inclusion of one KieBase by another. The exception is thrown only in such cases.

Comment 2 Marek Winkler 2013-07-02 11:12:48 UTC
Fixed by fixing of https://bugzilla.redhat.com/show_bug.cgi?id=976498.

*** This bug has been marked as a duplicate of bug 976498 ***


Note You need to log in before you can comment on or make changes to this bug.