Bug 1013644 - KIE module injection through CDI does not work in container with IBM java
Summary: KIE module injection through CDI does not work in container with IBM java
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ER6
: 6.0.0
Assignee: Mario Fusco
QA Contact: Marek Winkler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-30 13:56 UTC by Marek Winkler
Modified: 2014-08-06 20:16 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:16:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
WAR reproducing the problem when deployed (14.32 MB, application/x-webarchive)
2013-09-30 13:56 UTC, Marek Winkler
no flags Details
Maven project with reproducer WAR (11.87 KB, application/zip)
2013-09-30 13:58 UTC, Marek Winkler
no flags Details
server.log with IBM Java (18.91 KB, text/plain)
2013-09-30 14:01 UTC, Marek Winkler
no flags Details
server.log with OpenJDK (deployment succeeds) (14.55 KB, text/plain)
2013-09-30 14:02 UTC, Marek Winkler
no flags Details

Description Marek Winkler 2013-09-30 13:56:14 UTC
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 13:58:11 UTC
Created attachment 805220 [details]
Maven project with reproducer WAR

Comment 2 Marek Winkler 2013-09-30 14:01:04 UTC
Created attachment 805221 [details]
server.log with IBM Java

Comment 3 Marek Winkler 2013-09-30 14:02:25 UTC
Created attachment 805222 [details]
server.log with OpenJDK (deployment succeeds)

Comment 4 Marek Winkler 2013-09-30 14:23:22 UTC
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 15:15:57 UTC
Please ignore the additional info about CNFE in Arquillian tests - it is not related to this problem.

Comment 10 Edson Tirelli 2013-11-18 20:00:13 UTC
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 08:12:52 UTC
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 11:49:29 UTC
Fixed by https://github.com/droolsjbpm/drools/commit/ff7e0c620

Comment 13 Marek Winkler 2014-01-02 10:17:04 UTC
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.