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.)
Created attachment 805220 [details] Maven project with reproducer WAR
Created attachment 805221 [details] server.log with IBM Java
Created attachment 805222 [details] server.log with OpenJDK (deployment succeeds)
I found this blog post, it might be relevant to the problem: https://blogs.oracle.com/bhaktimehta/entry/ibm_jdk_and_classloader_getresources
Please ignore the additional info about CNFE in Arquillian tests - it is not related to this problem.
Raising the priority to get it done for the product release. Mario, do you have an environment to reproduce this problem?
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.
Fixed by https://github.com/droolsjbpm/drools/commit/ff7e0c620
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.