Bug 1036556 - Kie-spring cannot create KieModule in EAP 6.1.1
Summary: Kie-spring cannot create KieModule in EAP 6.1.1
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ER6
: 6.0.0
Assignee: Mario Fusco
QA Contact: Marek Winkler
URL:
Whiteboard:
Depends On: 1035775
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-02 09:42 UTC by Marek Winkler
Modified: 2014-08-06 20:19 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:19:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
server.log part (1.18 KB, text/plain)
2013-12-02 09:42 UTC, Marek Winkler
no flags Details
Maven project with reproducer (6.38 KB, application/zip)
2013-12-03 17:27 UTC, Marek Winkler
no flags Details

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.


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