Bug 1013644 - KIE module injection through CDI does not work in container with IBM java
KIE module injection through CDI does not work in container with IBM java
Status: CLOSED CURRENTRELEASE
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: BRE (Show other bugs)
6.0.0
Unspecified Unspecified
urgent Severity urgent
: ER6
: 6.0.0
Assigned To: Mario Fusco
Marek Winkler
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-30 09:56 EDT by Marek Winkler
Modified: 2014-08-06 16:16 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-06 16:16:37 EDT
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)
WAR reproducing the problem when deployed (14.32 MB, application/x-webarchive)
2013-09-30 09:56 EDT, Marek Winkler
no flags Details
Maven project with reproducer WAR (11.87 KB, application/zip)
2013-09-30 09:58 EDT, Marek Winkler
no flags Details
server.log with IBM Java (18.91 KB, text/plain)
2013-09-30 10:01 EDT, Marek Winkler
no flags Details
server.log with OpenJDK (deployment succeeds) (14.55 KB, text/plain)
2013-09-30 10:02 EDT, Marek Winkler
no flags Details

  None (edit)
Description Marek Winkler 2013-09-30 09:56:14 EDT
Created attachment 805219 [details]
WAR reproducing the problem when deployed

Description of problem:

Kie module injection through CDI does not work when using IBM Java (1.6). I have tried deploying simple WAR containing a kie module jar to EAP 6.1 started using IBM Java and deployment fails (it is unable to load pom.properties - see attached server.log for details). When deploying the same WAR onto the same EAP started with OpenJDK, the deployment is successful.

The test WAR being deployed is essentially the same as used for BZ 955193.

Server log errors:

15:01:28,874 INFO  [stdout] (MSC service thread 1-2) kmodules: vfs:/content/kie-cdi-war-web-app-1.0.0-SNAPSHOT.war/WEB-INF/lib/kie-cdi-war-kie-module-1.0.0-SNAPSHOT.jar/META-INF/kmodule.xml
15:01:28,953 WARN  [org.drools.compiler.kie.builder.impl.ClasspathKieProject] (MSC service thread 1-2) Unable to load pom.properties tried recursing down from/home/mwinkler/QA/jenkins/WORKSPACE/jboss-eap-6.1/standalone/tmp/vfs/deploymentb88252bb62dd6221/kie-cdi-war-kie-module-1.0.0-SNAPSHOT.jar-9b89497e082a0c30/contents
null
15:01:29,027 ERROR [org.drools.compiler.kie.builder.impl.ClasspathKieProject] (MSC service thread 1-2) Unable to build index of kmodule.xml url=vfs:/content/kie-cdi-war-web-app-1.0.0-SNAPSHOT.war/WEB-INF/lib/kie-cdi-war-kie-module-1.0.0-SNAPSHOT.jar/META-INF/kmodule.xml
null
15:01:29,037 ERROR [org.drools.compiler.cdi.KieCDIExtension] (MSC service thread 1-2) Annotation @KSession(basicKSession) found, but no KieSessioneModel exist.
Either the required kproject.xml does not exist, was corrupted, or mising the KieBase entry


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

Drools 6.0.0.CR4
BRMS 6.0.0.ER3

EAP 6.1.0
IBM Java (IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux amd64-64 jvmxa6460sr12-20121024_126067 (JIT enabled, AOT enabled))

How reproducible:

1. Start EAP 6.1 with IBM JDK, e.g.
  JAVA_HOME=~/jdks/ibm-java-x86_64-60-SR12 ./standalone.sh

2. Deploy the attached kie-cdi-war-web-app-1.0.0-SNAPSHOT.war.

3. See server.log.

Actual results:

The deployment fails.

Expected results:

The deployment should succeed.

Additional info:

Several Arquillian tests also fail - if you try running tests from droolsjbpm-integration/drools-jboss-integration with IBM Java and -Parquillian-jbossas-managed, you get some ClassNotFoundExceptions (java.lang.NoClassDefFoundError: org.mortbay.log.Log). (Please do not forget to "unignore" at least one test first.)
Comment 1 Marek Winkler 2013-09-30 09:58:11 EDT
Created attachment 805220 [details]
Maven project with reproducer WAR
Comment 2 Marek Winkler 2013-09-30 10:01:04 EDT
Created attachment 805221 [details]
server.log with IBM Java
Comment 3 Marek Winkler 2013-09-30 10:02:25 EDT
Created attachment 805222 [details]
server.log with OpenJDK (deployment succeeds)
Comment 4 Marek Winkler 2013-09-30 10:23:22 EDT
I found this blog post, it might be relevant to the problem:

https://blogs.oracle.com/bhaktimehta/entry/ibm_jdk_and_classloader_getresources
Comment 5 Marek Winkler 2013-09-30 11:15:57 EDT
Please ignore the additional info about CNFE in Arquillian tests - it is not related to this problem.
Comment 10 Edson Tirelli 2013-11-18 15:00:13 EST
Raising the priority to get it done for the product release. 

Mario, do you have an environment to reproduce this problem?
Comment 11 Mario Fusco 2013-11-19 03:12:52 EST
Edson, yes I installed the IBM JVM on my machine and reproduced this problem. I hadn't much time to investigate this because there were issues with higher priority (I am seeing you raised the priority of this anyway).

At the moment I believe that this issue could be caused by (or at least related with) this difference between Oracle and IBM JVM; https://blogs.oracle.com/bhaktimehta/entry/ibm_jdk_and_classloader_getresources but, as I said, I need a bit more time to figure out what's actually going wrong here.
Comment 12 Mario Fusco 2013-11-20 06:49:29 EST
Fixed by https://github.com/droolsjbpm/drools/commit/ff7e0c620
Comment 13 Marek Winkler 2014-01-02 05:17:04 EST
Verified on BRMS 6.0.0 ER6, KieSession injection through CDI now works with IBM Java. 

On the other hand, it seems that kie-spring and kie-camel are still having issues with it, I need to investigate, but new bugs can be expected for this problem.

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