Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1294029

Summary: Not able to create container using REST API if we upload kjar into server maven repository using maven command.
Product: [Retired] JBoss BPMS Platform 6 Reporter: Abhijit humbe <abhumbe>
Component: Kie-ServerAssignee: Edson Tirelli <etirelli>
Status: CLOSED EOL QA Contact: Karel Suta <ksuta>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.1.0CC: abhumbe, alazarot
Target Milestone: ---Flags: abhumbe: needinfo-
Target Release: ---   
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:10:32 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:

Description Abhijit humbe 2015-12-24 06:13:45 UTC
Description of problem:
If we try to create container using REST API it fails if kjar is uploaded into server maven repository through maven command.

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


How reproducible:


Steps to Reproduce:
1. clone porject from business-central to IDE, and add <distributionManagement> tag in pom.xml, like as:
============
<distributionManagement>
   <repository>
     <id>guvnor-m2-repo</id>
     <url>http://localhost:8080/business-central/maven2/</url>
     <layout>default</layout>
   </repository>
</distributionManagement>
============
2. Use 'mvn deploy' command to push kjar into server maven repository.
3. Now try to create container using RESt API

http://127.0.0.1:8080/kie-server/services/rest/server/containers/Test  [PUT]

~~~~
<kie-container container-id="Test">
   <release-id>
	<group-id>com.sample</group-id>
	<artifact-id>DemoProject</artifact-id>
        <version>1.0.01</version>
   </release-id>
</kie-container>
~~~~
Container creation failed with exception:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><response type="FAILURE" msg="Failed to create container Test with module com.sample:DemoProject:1.0.01: java.lang.RuntimeException: Cannot find KieModule: com.sample:DemoProject:1.0.01"/>


Actual results:
Container creation fails if kajr is uploaded into maven repository through maven command.

Expected results:
We should be able to create container if kjar is present in server maven repository.

Additional info:

Comment 2 Edson Tirelli 2016-01-06 14:28:35 UTC
Did you configure the settings.xml in the kie-server environment for the kie-server to fetch kjars from the maven repository?

Comment 4 Abhijit humbe 2016-03-01 16:10:51 UTC
Yes, business-central repository is configured correctly in setting.xml file which is located under User_HOME/.m2 directory.

Comment 5 Edson Tirelli 2016-03-01 16:21:53 UTC
Abhijit, as I mentioned to Alessandro, the kie-server delegates this to maven. So my suggestion is check what is the result of deploying the kjar with "mvn deploy". I.e., which path it is deployed under?

If the kie-server can't find the jar, it is because of something not properly named in the deploy path.