Bug 1008662 - Exception in thread when using a KieScanner and fireUntilHalt and removing a drl file from Maven repository
Summary: Exception in thread when using a KieScanner and fireUntilHalt and removing a ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.0.0
Hardware: x86_64
OS: Windows
unspecified
high
Target Milestone: ER5
: 6.0.0
Assignee: Mario Fusco
QA Contact: Tomas David
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-16 19:30 UTC by Richard Bourner
Modified: 2014-08-06 20:18 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:18:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Maven project demonstrating the issue (44.37 KB, application/x-zip-compressed)
2013-09-16 19:30 UTC, Richard Bourner
no flags Details

Description Richard Bourner 2013-09-16 19:30:35 UTC
Created attachment 798399 [details]
Maven project demonstrating the issue

Description of problem:
Environment: Drools 6.0.0.CR3

When using a KieScanner along with fireUntilHalt, we get an exception in thread when we change the version of the JAR file in the Maven rule repository.  
This exception is raised when 1 DRL file is removed from the new JAR in comparison with the previous version of that JAR. The problem doesn’t occur when a rule is removed from an existing .drl.
If we modify the Maven rule repository manually (typically by tampering the maven-metadata-local.xml file), the scanner triggers as expected and we also get the same exception as we were doing the deployment by Java code.

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


How reproducible:
Refer to attached JUnit test.

Steps to Reproduce:
1. Run the JUnit test.
2.
3.

Actual results:


Expected results:


Additional info:
Exception in thread "Timer-0" java.lang.NullPointerException
	at org.drools.core.util.IoUtils.readBytesFromInputStream(IoUtils.java:167)
	at org.drools.core.util.IoUtils.readBytesFromZipEntry(IoUtils.java:185)
	at org.drools.compiler.kie.builder.impl.ZipKieModule.getBytes(ZipKieModule.java:40)
	at org.drools.compiler.kie.builder.impl.AbstractKieModule.getResource(AbstractKieModule.java:273)
	at org.drools.compiler.kie.builder.impl.KieContainerImpl.updateToVersion(KieContainerImpl.java:112)
	at org.kie.scanner.KieRepositoryScannerImpl.updateKieModule(KieRepositoryScannerImpl.java:203)
	at org.kie.scanner.KieRepositoryScannerImpl.scanNow(KieRepositoryScannerImpl.java:193)
	at org.kie.scanner.KieRepositoryScannerImpl$ScanTask.run(KieRepositoryScannerImpl.java:180)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)

Comment 2 Mario Fusco 2013-09-30 13:15:53 UTC
Fixed by https://github.com/droolsjbpm/drools/commit/c1a1fcf93

Comment 3 Tomas David 2013-12-04 12:33:23 UTC
Verified on BRMS 6.0.0.ER5.


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