Bug 1304051 - [GSS](6.2.z)Cannot find KieModule with LATEST
[GSS](6.2.z)Cannot find KieModule with LATEST
Status: VERIFIED
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
6.2.0
Unspecified Unspecified
urgent Severity urgent
: CR1
: 6.2.2
Assigned To: Mario Fusco
Tibor Zimanyi
:
Depends On: 1303018
Blocks: 1309326 1309327
  Show dependency treegraph
 
Reported: 2016-02-02 13:15 EST by Alessandro Lazarotti
Modified: 2016-03-08 03:08 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1303018
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker DROOLS-465 Major Resolved Cannot find KieModule with LATEST 2016-05-26 07:23 EDT

  None (edit)
Description Alessandro Lazarotti 2016-02-02 13:15:31 EST
+++ This bug was initially created as a clone of Bug #1303018 +++

Description of problem:

Customer is trying to access KieJar using "LATEST" key word via KieScanner but if jar is built today, it's working and if jar is old (not built today) than it's not working.

This is similar bug filed on community.

https://issues.jboss.org/browse/DROOLS-465

Version-Release number of selected component (if applicable):
BRMS 6.1.0 and BRMS 6.2.0

How reproducible:
try to access any old kie-jar (not built today) via KieScanner using LATEST key word.

For Example :
public class SampleRuleExecution {
	
	private  static KieServices ks = null;
	private static  KieContainer contnrExceptionLD = null;
	
	public static void main(String[] args){
		try{
	    	ks = KieServices.Factory.get();
	    	
	    	ReleaseId releaseId = ks.newReleaseId("example", "SampleProject", "LATEST"); //6.1.0
	    	System.out.println("releaseId : " + releaseId.getGroupId() + " : " + releaseId.getArtifactId() + " : " + releaseId.getVersion() );
			contnrExceptionLD = ks.newKieContainer(releaseId);
    	}catch(Exception e){
    		e.printStackTrace();
    	}
	}
}

Actual results:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
java.lang.RuntimeException: Cannot find KieModule: example:SampleProject:LATEST
	at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:86)
	at com.sample.SampleRuleExecution.main(SampleRuleExecution.java:24)



Expected results:
Latest KieJar should be accessed from local maven repository.

Additional info:

Following are few more findings while working on this issue.

- If I am trying to access KieJar from sample java code via Kie-Scanner using "LATEST" key word and if the jar is built recently (today) than it is working properly where as if the project is not built today than kie-scanner is not considering the old jar (which is previously built and not built today) and facing this issue on BRMS 6.1.0 and 6.2.0.
 
- One more finding : If the "maven-metadata-loacl.xml" file is being updated manually by changing value of "lastUpdated" tag with latest value than it's working fine and in this scenario, it's not required to re-build the jar.
 
- While accessing jar from sample code (jar with old timestamp), than "maven-metadata-loacl.xml" is being removed from local repository and if you create new meta-data file than it's working fine.

--- Additional comment from JBoss Product and Program Management on 2016-01-29 05:20:19 EST ---

Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

--- Additional comment from Petr Kočandrle on 2016-01-29 06:28:12 EST ---

I believe this is a problem in Business Central and not in the product Maven Repository delivered via CSP / hosted at maven.repository.redhat.com.

--- Additional comment from Suresh Pritmani on 2016-02-02 07:15:51 EST ---

As per SRM's request, prioritizing the bug request.
Comment 2 Mario Fusco 2016-02-24 08:59:16 EST
Cherry-picked to 6.3.x branch with https://github.com/droolsjbpm/drools/compare/014f29c...eae76a6
Comment 3 Tibor Zimanyi 2016-03-08 03:08:09 EST
Verified by running reproducer from [1].

[1] https://issues.jboss.org/browse/DROOLS-465

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