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

Bug 1072679

Summary: Kie Workbench is not working in large scale enterprise app.
Product: [Retired] JBoss BRMS Platform 6 Reporter: David Tse <dtse>
Component: Business CentralAssignee: manstis
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Locker <jlocker>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.2CC: dtse, etirelli, kverlaen, mbaluch, mbiarnes, mwinkler, rrajasek
Target Milestone: CR1   
Target Release: 6.0.1   
Hardware: i586   
OS: Windows   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 19:56:54 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
contents
none
Minimal JAR reproducing the problem
none
Test JAR source project none

Description David Tse 2014-03-05 02:49:18 UTC
Description of problem:
Kie Workbench is not working in scale enterprise app that has other lib dependencies.  Not all the required lib been installed.  How to register functions is not clear.  Is this feature supported?  Rule editor does not show up when build error occurs.

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

How reproducible:
Reproduce every time when a clean set up is used. 

Steps to Reproduce:
1. Upload POJO jar https://mojo.redhat.com/docs/DOC-941476
2a. Upload rules which use functions: https://mojo.redhat.com/docs/DOC-941884
2b. Or upload rules which do not use functions: https://mojo.redhat.com/docs/DOC-942518

Actual results:
1. Rule editor does not show up when build error occurs.
2. The following build error:
Caused by: java.lang.NoClassDefFoundError: org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter
        at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_45]
        at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_45]
        at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:344) [jboss-modules.jar:1.2.2.
Final-redhat-1]
        at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:422) [jboss-modules.jar:1.2.2.Final-re
dhat-1]
        ... 65 more
Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter from [Module
"org.jboss.as.web:main" from local module loader @376f2723 (finder: local module finder @62728743 (roots: C:\bpms\EAP-6
.1.1\jboss-eap-6.1\modules,C:\bpms\EAP-6.1.1\jboss-eap-6.1\modules\system\layers\bpms,C:\bpms\EAP-6.1.1\jboss-eap-6.1\mo
dules\system\layers\base))]
        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:196) [jboss-modules.jar:1.2.2.Final-redh
at-1]
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444) [jboss-modu
les.jar:1.2.2.Final-redhat-1]
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432) [jboss-module
s.jar:1.2.2.Final-redhat-1]
        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374) [jboss-modules.jar:1
.2.2.Final-redhat-1]
        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119) [jboss-modules.jar:1.2.2.Fi
nal-redhat-1]
        ... 69 more

Expected results:
Rule editor should still show up when build error occurs.

Additional info:
Even if you fix all the compilation error, see https://mojo.redhat.com/docs/DOC-943171.  The work bench can build and deploy, rule editor is not showing up.

Comment 2 manstis 2014-03-05 13:56:28 UTC
I downloaded the JAR, but its content appears corrupt (there are 2 pom.properties files and 2 pom.xml files). Please see the attached.

Comment 3 manstis 2014-03-05 13:57:03 UTC
Created attachment 870980 [details]
contents

Comment 4 manstis 2014-03-05 14:01:03 UTC
I tried to skip over the above peculiarity however receive the following error. Do I need to configure an additional maven repository?

org.apache.maven.project.ProjectBuildingException: 1 problem was encountered while building the effective model for com.cigna.coderunner:coderunner-pojo:6.0.2-redhat-2
[FATAL] Non-resolvable parent POM: Failure to find org.drools:drools-multiproject:pom:6.0.2-redhat-2 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced @ line 6, column 11
 for project com.cigna.coderunner:coderunner-pojo:6.0.2-redhat-2

Comment 5 David Tse 2014-03-05 14:35:18 UTC
You can get the source code for the POJO from https://mojo.redhat.com/docs/DOC-945827

Comment 6 David Tse 2014-03-05 15:26:54 UTC
6.0.0.GA does not comes with a maven repository.  You can setup one using the following procedure: https://mojo.redhat.com/docs/DOC-940017

Comment 7 manstis 2014-03-07 10:33:13 UTC
I could not build the JAR from source:

[INFO] Scanning for projects...
Downloading: http://download.devel.redhat.com/brewroot/repos/soa-brms-5.3-updates-build/latest/maven/org/drools/drools-multiproject/6.0.2-redhat-2/drools-multiproject-6.0.2-redhat-2.pom
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.cigna.coderunner:coderunner-pojo:6.0.2-redhat-2 (/home/manstis/Downloads/coderunner-src/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM: Could not find artifact org.drools:drools-multiproject:pom:6.0.2-redhat-2 in jboss-internal (http://download.devel.redhat.com/brewroot/repos/soa-brms-5.3-updates-build/latest/maven/) and 'parent.relativePath' points at wrong local POM @ line 6, column 11 -> [Help 2]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

Do I need an additional Maven repository defined?

Comment 8 David Tse 2014-03-07 14:36:56 UTC
open the pom file and change it

  <parent>
    <groupId>org.drools</groupId>
    <artifactId>drools-multiproject</artifactId>
    <version>6.0.2-redhat-2</version>
  </parent>

The code was tested with 6.0.0.CR5
6.0.1.Final
6.0.2.SNAPSHOT

6.0.2-redhat-2 is build from the source shipped with 6.0.0.GA

Comment 13 David Tse 2014-03-11 21:35:19 UTC
POJO jar for 6.0.2-SNAPSHOT: https://mojo.redhat.com/docs/DOC-947355

Comment 14 manstis 2014-03-13 14:22:53 UTC
Created attachment 874019 [details]
Minimal JAR reproducing the problem

Comment 15 manstis 2014-03-13 15:25:07 UTC
Created attachment 874028 [details]
Test JAR source project

Comment 17 manstis 2014-03-14 11:43:49 UTC
1) Kie Workbench is not working in scale enterprise app that has other lib dependencies.  Not all the required lib been installed.  

I've made changes to better handle missing classes; but we can do nothing about their absence. A project would need to include the missing libraries.

2) How to register functions is not clear.  Is this feature supported?

Functions are supported; they are plain DRL. You will need to create a new "DRL" and define your function. See http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/DroolsLanguageReferenceChapter.html#d0e5676

3) Rule editor does not show up when build error occurs.

It does now.

Comment 19 Michael 2014-03-18 10:11:13 UTC
Ticket cherry-picked into 6.0.1.CR1. 
Commit: 2a038138beff33adc674ea0ab361ef56d1abc8f1

Comment 20 Marek Winkler 2014-03-24 18:48:56 UTC
Verified that missing classes are handled better on BRMS 6.0.1 CR1.

However, the handling of project dependencies seems not to work flawlessly, I have fired a separate issue for that (BZ 1080121).