Bug 1259589

Summary: Kie-ci sends MavenRequest without considering the repositories defined in user settings file
Product: [Retired] JBoss BRMS Platform 6 Reporter: Anton Giertli <agiertli>
Component: BREAssignee: Mario Fusco <mfusco>
Status: CLOSED EOL QA Contact: Marek Winkler <mwinkler>
Severity: unspecified Docs Contact:
Priority: high    
Version: 6.1.0CC: etirelli
Target Milestone: ER3   
Target Release: 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 19:04:47 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
[1] server.log none

Description Anton Giertli 2015-09-03 06:42:41 UTC
Description of problem:

Please see
https://issues.jboss.org/browse/DROOLS-899
Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
Use the attached files to reproduce the issue by following this procedure:

-- make sure that your ~/.m2/settings.xml includes auth settings against business-central/maven2

 --> something along these lines:
         <servers>
                  <server>
                    <id>guvnor-m2-repo</id>
                    <username>anton</username>
                    <password>password1!</password>
                    <configuration>
                          <wagonProvider>httpclient</wagonProvider>
                          <httpConfiguration>
                            <all>
                                  <usePreemptive>true</usePreemptive>
                            </all>
                          </httpConfiguration>
                    </configuration>
                  </server>
          </servers>

-- start the BRMS

-- execute following:

➜  clk.mortgage  pwd
/Users/osiris/Downloads/mortgage_project/clk.mortgage
➜  clk.mortgage  mvn clean install deploy

--> I have put https://maven.repository.redhat.com/techpreview/all/ maven repository into the settings.xml in order to successfully build the attached projects.

-- Create Decision Server via business-central; Create Container with following KJAR  com.td.clk:mortgage.brm-1.0-SNAPSHOT and START the container

-- The log from this procedure is attached too (with DEBUG level on relevant packages), the relevant snippet is here:

09:24:19,314 INFO  [org.guvnor.m2repo.backend.server.M2Servlet] (http-/0.0.0.0:8080-5) PUT request received for /com/td/clk/mortgage.brm.model/1.0-SNAPSHOT/mortgage.brm.model-1.0-20150826.072419-1.jar

The above line is a proof that the model jar is present in the local business-central maven repo.

When I start the Container following can be found in the log:
09:30:43,796 DEBUG [org.drools.compiler.kie.builder.impl.KieRepositoryImpl] (http-/0.0.0.0:8080-5) KieModule Lookup. ReleaseId com.td.clk:mortgage.brm.model:1.0-SNAPSHOT was not in cache, checking classpath
09:30:43,796 DEBUG [org.drools.compiler.kie.builder.impl.KieRepositoryImpl] (http-/0.0.0.0:8080-5) KieModule Lookup. ReleaseId com.td.clk:mortgage.brm.model:1.0-SNAPSHOT was not in cache, checking maven repository
09:30:46,313 ERROR [org.drools.compiler.kie.builder.impl.AbstractKieModule] (http-/0.0.0.0:8080-5) Unable to build KieBaseModel:MortgageKB
Unable to resolve ObjectType 'MortgageConfig' : [Rule name='ValidateMaxPurchasePrice']

As you can see, the Classes which are part of the JAR on which deployed KJAR depends can't be found.

While the logs shows these errors the UI looks like the container was started successfully. However, when I try to send POST request including the model class, it fails:

REQUEST:
<batch-execution lookup="MortgageSession">
        <insert>
                <com.td.clk.creditapplication.mortgage.brm.model.MortgageConfig>
                </com.td.clk.creditapplication.mortgage.brm.model.MortgageConfig>
        </insert>
        <fire-all-rules />
</batch-execution>


RESPONSE:

10:05:09,769 ERROR [org.kie.server.services.rest.KieServerRestImpl] (http-/0.0.0.0:8080-1) Error calling container 'MyBRMContainer': com.thoughtworks.xstream.converters.ConversionException: com.td.clk.creditapplication.mortgage.brm.model.MortgageConfig : com.td.clk.creditapplication.mortgage.brm.model.MortgageConfig
---- Debugging information ----
message             : com.td.clk.creditapplication.mortgage.brm.model.MortgageConfig
cause-exception     : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message       : com.td.clk.creditapplication.mortgage.brm.model.MortgageConfig
class               : org.drools.core.command.runtime.rule.InsertObjectCommand
required-type       : org.drools.core.command.runtime.rule.InsertObjectCommand
converter-type      : org.drools.core.runtime.help.impl.XStreamXML$InsertConverter
path                : /batch-execution/insert/com.td.clk.creditapplication.mortgage.brm.model.MortgageConfig
line number         : 3
class[1]            : org.drools.core.command.runtime.BatchExecutionCommandImpl
converter-type[1]   : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
version             : 1.4.7

Actual results:


Expected results:


Additional info:

Comment 1 Anton Giertli 2015-09-03 06:43:22 UTC
Created attachment 1069626 [details]
[1] server.log

Comment 2 Anton Giertli 2015-09-03 06:44:32 UTC
The issue was originally reproduced on (product) BRMS 6.1.2

Use the attached files in order to verify that the commit from DROOLS-899 solves this.

Comment 5 Marek Winkler 2015-10-14 07:05:19 UTC
Verified in BRMS 6.2.0 ER3.