Bug 1008662 - Exception in thread when using a KieScanner and fireUntilHalt and removing a drl file from Maven repository
Exception in thread when using a KieScanner and fireUntilHalt and removing a ...
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: BRE (Show other bugs)
x86_64 Windows
unspecified Severity high
: ER5
: 6.0.0
Assigned To: Mario Fusco
Tomas David
Depends On:
  Show dependency treegraph
Reported: 2013-09-16 15:30 EDT by Richard Bourner
Modified: 2014-08-06 16:18 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-08-06 16:18:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Richard Bourner 2013-09-16 15:30:35 EDT
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.

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 09:15:53 EDT
Fixed by https://github.com/droolsjbpm/drools/commit/c1a1fcf93
Comment 3 Tomas David 2013-12-04 07:33:23 EST
Verified on BRMS 6.0.0.ER5.

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