Bug 1265709 - ClassNotFoundException: org.guvnor.rest.client.CreateOrCloneRepositoryRequest
Summary: ClassNotFoundException: org.guvnor.rest.client.CreateOrCloneRepositoryRequest
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ER5
: 6.2.0
Assignee: manstis
QA Contact: Marián Macik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-23 13:59 UTC by Jiri Locker
Modified: 2020-03-27 20:05 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 20:05:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Full server.log (125.90 KB, text/plain)
2015-09-23 13:59 UTC, Jiri Locker
no flags Details
BZ-1265709-simulation-eap7.0.9-and-bpms6.4.11.zip (2.50 KB, application/octet-stream)
2018-10-23 14:06 UTC, Paulo Henrique Alves
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1275703 0 urgent CLOSED AssetMgmt: Branches not set up completely when creating managed repository 2021-02-22 00:41:40 UTC

Internal Links: 1275703

Description Jiri Locker 2015-09-23 13:59:47 UTC
Created attachment 1076244 [details]
Full server.log

Description of problem:
Happens during REST request to clone a repository when both business-central.war and kie-server.war are deployed. Sometimes on BRMS, sometimes on BPM Suite.

Important parts of server.log:

JNDI bindings for session bean named AvailableJobsExecutor in deployment unit deployment "kie-server.war" are as follows:
...
        java:module/AvailableJobsExecutor
...
JNDI bindings for session bean named AvailableJobsExecutor in deployment unit deployment "business-central.war" are as follows:
...
        java:module/AvailableJobsExecutor
...
23:02:24,836 INFO  [AssetMgmt] (http-/127.0.0.1:8080-4) Auto approve for request: org.guvnor.rest.client.CreateOrCloneRepositoryRequest@7b483c8
...
23:02:25,901 WARN  [org.jbpm.executor.impl.AbstractAvailableJobsExecutor] (EJB default - 3) Error during command org.guvnor.rest.backend.cmd.CreateOrCloneRepositoryCmd error message org.guvnor.rest.client.CreateOrCloneRepositoryRequest from [Module "deployment.kie-server.war:main" from Service Module Loader]: java.lang.ClassNotFoundException: org.guvnor.rest.client.CreateOrCloneRepositoryRequest from [Module "deployment.kie-server.war:main" from Service Module Loader]

My impression is that AvailableJobsExecutor bean is registered twice (from business-central and kie-server) under the same JNDI binding and so the REST business-central request may be (inadvertently) handled by kie-server, which does not have guvnor-rest-client lib.

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

How reproducible:
Some installations are affected, some are not. But once it happens, it happens every time.

Steps to Reproduce:
1. Install BRMS on EAP 6.4.3.GA.
2. Start the server in standalone mode.
3. Run:
> $ curl -s -u '<user>:<password>' -H 'Accept: application/json' -H 'Content-Type: application/json' -X POST -d '{"name":"guvnorng-playground","description":"","userName":"","password":"","requestType":"clone","gitURL":"https://github.com/guvnorngtestuser1/guvnorng-playground.git","organizationalUnitName":"example"}' 'localhost:8080/business-central/rest/repositories/'

Actual results:
The REST job fails due to ClassNotFoundException.

Expected results:
The REST job should complete successfully even when kie-server.war is deployed.

Additional info:
Workaround: do not deploy kie-server together with business-central.

Comment 1 manstis 2015-09-30 12:09:13 UTC
I spoke with Kris and Maciejs about this. 

As you've noted we have two AvailableJobsExecutor's running: one in kie-server and the other in business-central. Both instances share a common queue of pending jobs. When the instance in kie-server attempts to run the jobs created in business-central in response to certain REST operations the ClassLoader issue in the log is encountered.

Maciejs advised that the solution is to ensure kie-server and business-central use distinct queues for their respective AvailableJobsExecutor. This can be achieved by defining an additional DataSource within the container and setting System Property "org.kie.server.persistence.ds" to the new DataSource's JNDI name.

Maciejs also advised he's been speaking to "ksuta" about this issue already. You may want to connect with them too.

Comment 3 Karel Suta 2015-10-26 15:32:43 UTC
Solution from comment 1 checked and seems to work, didn't get CNFE any more, repository seems to be cloned successfully every time.

Comment 4 Marián Macik 2015-10-27 12:13:46 UTC
Moving back to assigned because it needs to be documented properly as said in comment 2.

Comment 9 Marián Macik 2015-11-03 12:53:08 UTC
As Radovan noted in comment 2, this note should be present in the docs: the new DataSource for Kie Server should point to a different DB schema than the DataSource used by Business Central. It is not sufficient to have different just data sources. DB schemas must be different as well. Can you add it to docs, please? Just to make it clear. Thanks.

Comment 10 Lukáš Petrovický 2015-11-03 15:26:32 UTC
This is a documentation issue now. The problem itself has been fixed, VERIFIED with ER5.

Comment 11 Paulo Henrique Alves 2018-10-23 14:06:30 UTC
Created attachment 1496703 [details]
BZ-1265709-simulation-eap7.0.9-and-bpms6.4.11.zip

Comment 12 Paulo Henrique Alves 2018-10-23 14:06:50 UTC
Bug still present on BPMS 6.4.11 with EAP 7.0.9, see attach BZ-1265709-simulation-eap7.0.9-and-bpms6.4.11.zip.

Comment 13 Jiri Locker 2018-10-23 14:16:51 UTC
Paulo, BRMS/BPMS issues are no longer tracked in Bugzilla. Consider this tracking tool read-only for purposes of these two products.

This particular ticket has been migrated to https://issues.jboss.org/browse/RHBRMS-556. Since you have found the problem in BPMS (and since the original issue has been fixed and verified a long time ago), I would recommend you to clone RHBRMS-556 into RHBPM project in JIRA and re-attach your reproducer there. I think it is a better approach than to reopen RHBRMS-556.


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