Replace uber workaround jar file by individual bundles (features) #48

Merged
merged 1 commit into from Mar 25, 2013

Conversation

Projects
None yet
3 participants
Member

cmoulliard commented Mar 25, 2013

The goal of this pull request is to replace uber workaround jar file by individual bundles for OSGI platform.

The request contains :

  • Replacement of uber workaround jar file by individual bundles (core, compiler, kie-api, kie-interna) in features file used to provision Apache Karaf project,
  • Add of missing bundles required by drools (jaxb-impl, jaxb-xjc)
  • Remove non required dependencies for drools-camel-example
Charles Moulliard Replace uber workaround jar file by individual bundles (core, compile…
…r, kie-api, kie-interna), add missing bundles (jaxb-impl, jaxb-xjc)
a6549df

@ge0ffrey ge0ffrey added a commit that referenced this pull request Mar 25, 2013

@ge0ffrey ge0ffrey Merge pull request #48 from cmoulliard/drools-osgi2
Replace uber workaround jar file by individual bundles (features)
1a45d96

@ge0ffrey ge0ffrey merged commit 1a45d96 into kiegroup:master Mar 25, 2013

Charles,

very nice example!
I tried to install your sample according to the README with a fresh Karaf 2.3.1, but I am getting an error (see below). Any idea ?

Best regards, Hauke

karaf@root> list
START LEVEL 100 , List Threshold: 50
ID State Blueprint Spring Level Name
[ 68] [Active ] [ ] [ ] [ 50] camel-core (2.10.3)
[ 69] [Active ] [Created ] [ ] [ 50] camel-karaf-commands (2.10.3)
[ 76] [Active ] [ ] [ ] [ 50] geronimo-jta_1.1_spec (1.1.1)
[ 77] [Active ] [ ] [ ] [ 50] camel-spring (2.10.3)
[ 78] [Active ] [Created ] [ ] [ 50] camel-blueprint (2.10.3)
[ 79] [Active ] [ ] [ ] [ 80] Protocol Buffer Java API (2.5.0)
[ 80] [Active ] [ ] [ ] [ 80] Apache ServiceMix :: Bundles :: antlr (3.5.0.1)
[ 81] [Active ] [ ] [ ] [ 80] Apache ServiceMix :: Bundles :: woodstox (3.2.9.3)
[ 82] [Active ] [ ] [ ] [ 80] Apache ServiceMix :: Bundles :: xstream (1.4.3.1)
[ 84] [Active ] [ ] [ ] [ 80] mvel2 (2.1.4.Final)
[ 85] [Active ] [ ] [ ] [ 80] Eclipse Compiler for Java(TM) (3.8.2.v20120814-155456)
[ 86] [Active ] [ ] [ ] [ 80] Codehaus-Janino (2.6.1)
[ 87] [Active ] [ ] [ ] [ 80] Apache ServiceMix :: Bundles :: quartz (2.1.6.1)
[ 88] [Active ] [ ] [ ] [ 80] Apache Geronimo JSR-330 Spec API (1.0)
[ 89] [Active ] [ ] [ ] [ 80] wrap_mvn_javax.enterprise_cdi-api_1.0-SP4 (0)
[ 90] [Active ] [ ] [ ] [ 80] KIE API (6.0.0.20130407-0019)
[ 91] [Active ] [ ] [ ] [ 80] KIE Internal (6.0.0.20130407-0019)
[ 92] [Active ] [ ] [ ] [ 80] Drools :: Core (6.0.0.20130407-0453)
[ 93] [Active ] [ ] [ ] [ 80] Drools :: Compiler (6.0.0.20130407-0453)
[ 180] [Active ] [ ] [ ] [ 80] Drools Spring (6.0.0.20130407-0647)
[ 263] [Active ] [ ] [ ] [ 50] Apache CXF Compatibility Bundle Jar (2.6.6)
[ 264] [Active ] [ ] [ ] [ 50] camel-cxf-transport (2.10.3)
[ 265] [Active ] [Created ] [ ] [ 50] camel-cxf (2.10.3)
[ 266] [Active ] [ ] [ ] [ 80] Drools Camel (6.0.0.20130407-0647)
karaf@root> features:install drools-camel-example
karaf@root> Exception in thread "SpringOsgiExtenderThread-2" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'k
base1': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Unable to instantiate service for Class 'org.kie.int
ernal.builder.KnowledgeBuilderFactoryService'
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:589)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:925)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationCont
ext.java:69)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.ja
va:355)
at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplication
Context.java:320)
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(Dependen
cyWaiterApplicationContextExecutor.java:132)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.IllegalArgumentException: Unable to instantiate service for Class 'org.kie.internal.builder.KnowledgeBuilderFactoryService'
at org.kie.internal.utils.ServiceRegistryImpl.get(ServiceRegistryImpl.java:168)
at org.kie.internal.builder.KnowledgeBuilderFactory.loadServiceFactory(KnowledgeBuilderFactory.java:130)
at org.kie.internal.builder.KnowledgeBuilderFactory.getKnowledgeBuilderServiceFactory(KnowledgeBuilderFactory.java:124)
at org.kie.internal.builder.KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration(KnowledgeBuilderFactory.java:74)
at org.drools.container.spring.beans.KnowledgeBaseBeanFactory.afterPropertiesSet(KnowledgeBaseBeanFactory.java:80)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514
)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
... 14 more
Caused by: java.lang.IllegalArgumentException: Unable to instantiate 'org.drools.compiler.builder.impl.KnowledgeBuilderFactoryServiceImpl'
at org.kie.internal.utils.ServiceRegistryImpl$ReflectionInstantiator.newInstance(ServiceRegistryImpl.java:233)
at org.kie.internal.utils.ServiceRegistryImpl$ReflectionInstantiator.call(ServiceRegistryImpl.java:225)
at org.kie.internal.utils.ServiceRegistryImpl.get(ServiceRegistryImpl.java:166)
... 20 more
Caused by: java.lang.ClassNotFoundException: org.drools.compiler.builder.impl.KnowledgeBuilderFactoryServiceImpl not found by org.kie.internalapi [91]

    at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1460)
    at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:186)
    at org.kie.internal.utils.ServiceRegistryImpl$ReflectionInstantiator.newInstance(ServiceRegistryImpl.java:230)
    ... 22 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment