[jboss-jira] [JBoss JIRA] (DROOLS-140) KIE module injection through CDI does not work in container

RH Bugzilla Integration (JIRA) jira-events at lists.jboss.org
Thu Jun 6 11:09:55 EDT 2013


    [ https://issues.jboss.org/browse/DROOLS-140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779833#comment-12779833 ] 

RH Bugzilla Integration commented on DROOLS-140:
------------------------------------------------

Marek Winkler <mwinkler at redhat.com> made a comment on [bug 955193|https://bugzilla.redhat.com/show_bug.cgi?id=955193]

I have tested the fix on Drools 6.0.0.Beta3 and the reproducer war still fails to deploy:

16:57:25,608 INFO  [stdout] (MSC service thread 1-7) 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
16:57:25,680 WARN  [org.drools.compiler.kie.builder.impl.ClasspathKieProject] (MSC service thread 1-7) Unable to load pom.properties tried recursing down from/home/mwinkler/QA/jenkins/WORKSPACE/jboss-eap-6.1/standalone/tmp/vfs/deploymentb4fd41fdc21cc66f/kie-cdi-war-kie-module-1.0.0-SNAPSHOT.jar-cecb296b30695181/contents
null
16:57:25,680 ERROR [org.drools.compiler.kie.builder.impl.ClasspathKieProject] (MSC service thread 1-7) 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
16:57:25,710 ERROR [org.drools.compiler.cdi.KieCDIExtension] (MSC service thread 1-7) Annotation @KSession(basicKSession) found, but no KieSessioneModel exist.
Either the required kproject.xml does not exist, was corrupted, or mising the KieBase entry

It seems the problem is related to reading pom.properties from jar files which are distributed as libraries in a war (as it is the case in the attached reproducer). The pom.properties file is not unpacked in the deployment directory, it is a part of a jar file in WEB-INF/lib/kie-cdi-war-kie-module-1.0.0-SNAPSHOT.jar.

The problem with vfs has been solved - the CDI works in case the kmodule is defined in the war file directly.
                
> KIE module injection through CDI does not work in container
> -----------------------------------------------------------
>
>                 Key: DROOLS-140
>                 URL: https://issues.jboss.org/browse/DROOLS-140
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>            Reporter: Mario Fusco
>            Assignee: Mario Fusco
>             Fix For: 6.0.0.CR1
>
>
> Description of problem:
> Injection of KIE module through CDI fails on JBoss EAP 6.0/6.1 due to wrong processing of resource URI when loading pom.properties in ClasspathKieProject.
> Version-Release number of selected component (if applicable):
> BRMS 6.0.0.Beta1
> EAP 6.0, 6.1.ER4
> How reproducible:
> Deploy the attached reproducer WAR. Deployment fails, server.log contains the following error (see attachment for all errors in log):
> 15:40:29,923 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:40:29,939 ERROR [org.drools.compiler.kie.builder.impl.ClasspathKieProject] (MSC service thread 1-2) Unable to load pom.properties from/content/kie-cdi-war-web-app-1.0.0-SNAPSHOT.war/WEB-INF/lib/kie-cdi-war-kie-module-1.0.0-SNAPSHOT.jar as jarPath cannot be found
> /content/kie-cdi-war-web-app-1.0.0-SNAPSHOT.war/WEB-INF/lib/kie-cdi-war-kie-module-1.0.0-SNAPSHOT.jar
> The first log line shows that ClasspathKieProject located kmodule.xml at URL starting with protocol 'vfs:'. Later, in method fixURLFromKProjectPath, the protocol prefix is removed, leading to URL /content/kie-cdi-war-web-app-1.0.0-SNAPSHOT.war/WEB-INF/lib/kie-cdi-war-kie-module-1.0.0-SNAPSHOT.jar which now references absolute path which is wrong.
> Steps to Reproduce:
> 1. Deploy attached reproducer WAR on EAP 6.
> 2. Watch server.log for deployment errors.
>   
> Actual results:
> Deployment fails due to failed injection.
> Expected results:
> Application deploys successfully and writes INFO message into server.log.
> Additional info:
> This issue blocks further testing if KIE module injection through CDI. It also renders the CDI feature unusable in real environment (e.g. some web or EJB container with CDI).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list