Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1073818

Summary: NPE in server log when creating new rule (#2)
Product: [Retired] JBoss BRMS Platform 6 Reporter: Jiri Locker <jlocker>
Component: Business CentralAssignee: manstis
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Locker <jlocker>
Severity: medium Docs Contact:
Priority: high    
Version: 6.0.1CC: jlocker, kverlaen, manstis, mbiarnes, rrajasek
Target Milestone: ER1   
Target Release: 6.0.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 19:53:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
server.log with NPE
none
NPE at org.drools.compiler.compiler.io.memory.MemoryFileSystem none

Description Jiri Locker 2014-03-07 09:42:52 UTC
Created attachment 871823 [details]
server.log with NPE

Description of problem:
Looking at the stack trace, this was uncovered by fixing bug 1052131. This NPE is just a little beyond the previous one.

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

How reproducible:
Hardly by human interaction but frequently during automated testing.

Steps to Reproduce:
1. Create a new guided rule.

Actual results:
- Guided editor not rendered.
- Error dialog is shown with message: "Unable to complete your request. The following exception occured: null."
- NPE in server log.

Expected results:
NPE must be avoided.

Additional info:
See stack trace.

Comment 1 manstis 2014-03-07 09:46:09 UTC
Hello Jiri, is it possible to provide some details of your project (data model, dependencies, rule that led to the NPE etc); or even push to github (or bundle the repository some other way)?

Comment 2 Jiri Locker 2014-03-07 09:59:14 UTC
Good question. It admit it is related to the project and its data model.

What surprised me is that #1052131 was fixed in ER1 but I first saw this one in ER2, so it might rather be related to a change between ER1 and ER2 than to #1052131.

Comment 3 manstis 2014-03-07 10:42:08 UTC
The kmodule might be of most interest. 

The NPEs were thrown from different places, so I think this is a new error:-

#1052131
--------
2:13:23,601 ERROR [org.guvnor.common.services.builder.BuildServiceImpl] (pool-17-thread-2) null: java.lang.NullPointerException
	at org.drools.compiler.kie.builder.impl.KieBuilderImpl.generateKieModuleMetaInfo(KieBuilderImpl.java:222) [drools-compiler-6.0.1-redhat-2.jar:6.0.1-redhat-2]
	at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:194) [drools-compiler-6.0.1-redhat-2.jar:6.0.1-redhat-2]

#1073818
--------
17:48:28,462 ERROR [org.guvnor.common.services.builder.BuildServiceImpl] (pool-14-thread-2) null: java.lang.NullPointerException
	at org.drools.compiler.kie.builder.impl.KieMetaInfoBuilder.generateKieModuleMetaInfo(KieMetaInfoBuilder.java:54) [drools-compiler-6.0.2-redhat-4.jar:6.0.2-redhat-4]
	at org.drools.compiler.kie.builder.impl.KieMetaInfoBuilder.writeKieModuleMetaInfo(KieMetaInfoBuilder.java:38) [drools-compiler-6.0.2-redhat-4.jar:6.0.2-redhat-4]

The latest NPE is thrown in a class with the following comment. 

// TODO: I think this method is wrong because it is only inspecting packages that are included
// in at least one kbase, but I believe it should inspect all packages, even if not included in
// any kbase, as they could be included in the future.

Comment 4 manstis 2014-03-11 14:32:02 UTC
Jiri, I'm waiting for details of the project that exhibited the error (kmodule, in particular). Thanks, Mike

Comment 5 Jiri Locker 2014-03-17 15:14:54 UTC
Hi Mike, it's this project http://git.app.eng.bos.redhat.com/git/bpms-assets.git/tree/guvnor

Comment 8 Michael 2014-03-18 14:01:44 UTC
Ticket cherry-picked into 6.0.1.CR1. 
Commit: 7d245cb8bc9f3319c283634092a50e0d02c17fad

Comment 9 Jiri Locker 2014-03-24 08:19:45 UTC
Created attachment 877954 [details]
NPE at org.drools.compiler.compiler.io.memory.MemoryFileSystem

Hi Mike, I the NPE from attachment 871823 [details] is gone. Attaching another NPE on a different place but with the same effect on the UI level and under the same circumstances as the previous one.

As the issue persists from my point of view I suggest hunting it down in this ticket.

Comment 10 Jiri Locker 2014-03-25 14:14:30 UTC
We are one step further but there is still some work to be done. Reassigning.

Comment 11 manstis 2014-03-26 13:06:29 UTC
I managed to replicate a NPE using the given project and creating a RDRL in the <default> package. I'll investigate...

Comment 14 Jiri Locker 2014-05-07 14:55:35 UTC
The mentioned exceptions no longer occur.