Bug 1036556

Summary: Kie-spring cannot create KieModule in EAP 6.1.1
Product: [Retired] JBoss BRMS Platform 6 Reporter: Marek Winkler <mwinkler>
Component: BREAssignee: Mario Fusco <mfusco>
Status: CLOSED CURRENTRELEASE QA Contact: Marek Winkler <mwinkler>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0CC: etirelli
Target Milestone: ER6Keywords: Regression
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:19:31 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:
Bug Depends On: 1035775    
Bug Blocks:    
Attachments:
Description Flags
server.log part
none
Maven project with reproducer none

Description Marek Winkler 2013-12-02 09:42:41 UTC
Created attachment 831481 [details]
server.log part

Description of problem:

Kie-spring is unable to create a KIE Module when run in EAP 6.1.1, the NPE below is thrown:

java.lang.NullPointerException: null
	at java.io.File.<init>(File.java:277)
	at org.drools.compiler.kie.builder.impl.ClasspathKieProject.getPomProperties(ClasspathKieProject.java:228)
	at org.kie.spring.KModuleBeanFactoryPostProcessor.postProcessBeanFactory(KModuleBeanFactoryPostProcessor.java:93)
	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663)
	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:653)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
	at org.jboss.qa.brms.test.SpringContainerTest.getApplicationContext(SpringContainerTest.java:46)
	at org.jboss.qa.brms.test.SpringContainerTest.getApplicationContext(SpringContainerTest.java:36)
	at org.jboss.qa.brms.bre.spring.EventListenersTest.getSession(EventListenersTest.java:81)
	at org.jboss.qa.brms.bre.spring.EventListenersTest.testProcessEventMemoryListener(EventListenersTest.java:66)

It seems this problem is a part of the problem described in BZ 996144, which was fixed in ER3.

Please see the attached server.log part, it shows that KIE Builder tries to load pom.properties from one of the EAP modules instead of the application WAR:

(http-/127.0.0.1:8080-1) Unable to load pom.properties tried recursing down from/home/mwinkler/QA/jenkins/WORKSPACE/jboss-eap-6.1/modules/system/layers/base/sun/jdk/main/service-loader-resources/
null

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

Drools 6.0.0-SNAPSHOT
BRMS 6.0.0 ER5
EAP 6.1.1

This worked in ER4, marking as a regression.

How reproducible:

I wanted to check this against the test drools-jboss-integration/src/test/java/org/drools/jboss/integration/spring/KieSpringTest.java (it was used to reproduce the problem in ER3), but the test seems currently broken (Arquillian throws a ClassNotFoundException when the test is run). 

If the test could be fixed, it would probably reproduce the issue (when run with profile 'arquillian-jbossas-managed'). Please let me know, if there was a problem with fixing this test, I would provide another reproducer.

Comment 1 Edson Tirelli 2013-12-03 16:12:40 UTC
Linking the two tickets as they seem related.

Comment 2 Marek Winkler 2013-12-03 17:27:03 UTC
Created attachment 832217 [details]
Maven project with reproducer

Attaching Maven project with reproducer which does not need Arquillian. You need to do mvn clean install and deploy target/kie-spring-war-1.0.0-SNAPSHOT.war into EAP 6.1.1.

It deploys successfully (the web app does not actually do anything apart from initialization of Spring context), but see the server.log for the error.

Comment 4 Marek Winkler 2014-01-09 13:18:33 UTC
Verified on BRMS 6.0.0 ER7.

Very similar problem is however present on EWS 2.0 - created new BZ 1050987.