Details
-
Bug
-
Resolution: Done
-
Major
-
6.0.0.Beta3
-
None
-
None
Description
Hi,
When the following drools + camel example is deployed on Apache Karaf :
features:addurl mvn:org.drools/drools-karaf-features/6.0.0-SNAPSHOT/xml/features
features:install drools-module
features:install drools-decisiontable
features:install kie-spring
features:install kie-camel
features:install drools-camel-example
Then, the following exception is created :
2013-06-21 09:42:34,649 | ERROR | ExtenderThread-2 | ClasspathKieProject | builder.impl.ClasspathKieProject 93 | 80 - org.drools.compiler - 6.0.0.20130621-0836 | Unable to build index of kmodule.xml url=bundle://212.1:1/META-INF/kmodule.xml It is necessary to have the drools-osgi-integration module on the path in order to create a KieProject from an ogsi bundle 2013-06-21 09:42:34,651 | INFO | ExtenderThread-2 | DefaultListableBeanFactory | ort.DefaultSingletonBeanRegistry 422 | 91 - org.springframework.beans - 3.0.7.RELEASE | Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@12b7530: defining beans [droolsHelper,personHelper,ksession-dt-1,AgeVerification,camel-1:beanPostProcessor,camel-1,ksession1,camel-2:beanPostProcessor,camel-2]; root of factory hierarchy 2013-06-21 09:42:34,661 | ERROR | ExtenderThread-2 | ContextLoaderListener | BundleApplicationContextListener 50 | 131 - org.springframework.osgi.extender - 1.2.1 | Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=org.drools.camel-example, config=osgibundle:/META-INF/spring/*.xml)) org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ksession-dt-1': Invocation of init method failed; nested exception is java.lang.NullPointerException at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1422)[91:org.springframework.beans:3.0.7.RELEASE] at ... Caused by: java.lang.NullPointerException at org.kie.spring.KieObjectsResolver.resolveKSession(KieObjectsResolver.java:69)[125:org.kie.spring:6.0.0.20130620-0250] at org.kie.spring.factorybeans.KSessionFactoryBean.afterPropertiesSet(KSessionFactoryBean.java:146)[125:org.kie.spring:6.0.0.20130620-0250] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1479)[91:org.springframework.beans:3.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1419)[91:org.springframework.beans:3.0.7.RELEASE] ... 14 more
It seems that we have 2 issues :
1) Even if drools-osgi-integration (fragment bundle) is deployed and classes added to the classloader of drools-compiler, the following error is reported :
2013-06-21 09:42:34,649 | ERROR | ExtenderThread-2 | ClasspathKieProject | builder.impl.ClasspathKieProject 93 | 80 - org.drools.compiler - 6.0.0.20130621-0836 | Unable to build index of kmodule.xml url=bundle://212.1:1/META-INF/kmodule.xml
2) During the creation of kcontainer, something happens as the Map of GAVs is equal to zero, reason why we get a NPE