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
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
Target Milestone: ---
: ---
Assignee: Edson Tirelli
QA Contact: Marek Winkler
Depends On:
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:
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

declare Man extends Person


declare Woman extends Person


The PackageBuilder throws the following NPE:

java.lang.NullPointerException: null
	at org.drools.compiler.compiler.PackageBuilder.processTypeDeclarations(
	at org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.buildTypeDeclarations(
	at org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.buildTypeDeclarations(
	at org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.buildPackages(
	at org.drools.compiler.kie.builder.impl.AbstractKieModule.buildKnowledgePackages(
	at org.drools.compiler.kie.builder.impl.AbstractKieProject.verify(
	at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieModule(
	at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(

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

*** 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.