Bug 1259589 - Kie-ci sends MavenRequest without considering the repositories defined in user settings file
Kie-ci sends MavenRequest without considering the repositories defined in use...
Status: VERIFIED
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: BRE (Show other bugs)
6.1.0
Unspecified Unspecified
high Severity unspecified
: ER3
: 6.2.0
Assigned To: Mario Fusco
Marek Winkler
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-03 02:42 EDT by Anton Giertli
Modified: 2015-10-14 03:05 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
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)
[1] server.log (268.91 KB, text/plain)
2015-09-03 02:43 EDT, Anton Giertli
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker DROOLS-899 Major Resolved Kie-ci sends MavenRequest without considering the repositories defined in user settings file 2016-10-28 23:57 EDT

  None (edit)
Description Anton Giertli 2015-09-03 02:42:41 EDT
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 02:43:22 EDT
Created attachment 1069626 [details]
[1] server.log
Comment 2 Anton Giertli 2015-09-03 02:44:32 EDT
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 03:05:19 EDT
Verified in BRMS 6.2.0 ER3.

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