camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Müller <christian.muel...@gmail.com>
Subject Re: property-placeholder + OSGI
Date Tue, 11 Dec 2012 20:00:10 GMT
Camel 2.10. and before is tested with Karaf 2.2.x as you can read here:
http://camel.apache.org/karaf.html
Camel 2.11 will be the first version officially supporting Karaf 2.3.x.

Best,
Christian

On Tue, Dec 11, 2012 at 8:43 AM, SpinWin <pierre.yvesn@gmail.com> wrote:

> Hi,
>
> To answer your questions :
>
> Karaf version : 2.3.0
>
> And the NPE Stack Trace :
>
> org.osgi.service.blueprint.container.ComponentDefinitionException:
> java.lang.NullPointerException
>         at
>
> org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:116)[7:org.apache.aries.blueprint.core:1.0.1]
>         at
>
> org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[7:org.apache.aries.blueprint.core:1.0.1]
>         at
>
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_27]
>         at
> java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_27]
>         at
>
> org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[7:org.apache.aries.blueprint.core:1.0.1]
>         at
>
> org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:933)[7:org.apache.aries.blueprint.core:1.0.1]
>         at
>
> org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:907)[7:org.apache.aries.blueprint.core:1.0.1]
>         at
>
> org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:888)[7:org.apache.aries.blueprint.core:1.0.1]
>         at
>
> org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:820)[7:org.apache.aries.blueprint.core:1.0.1]
>         at
>
> org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[7:org.apache.aries.blueprint.core:1.0.1]
>         at
>
> org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[7:org.apache.aries.blueprint.core:1.0.1]
>         at
>
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_27]
>         at
> java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_27]
>         at
>
> org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[7:org.apache.aries.blueprint.core:1.0.1]
>         at
>
> org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)[7:org.apache.aries.blueprint.core:1.0.1]
>         at
>
> org.apache.aries.blueprint.container.BlueprintRepository.createInstance(BlueprintRepository.java:230)[7:org.apache.aries.blueprint.core:1.0.1]
>         at
>
> org.apache.aries.blueprint.container.BlueprintRepository.create(BlueprintRepository.java:155)[7:org.apache.aries.blueprint.core:1.0.1]
>         at
>
> org.apache.aries.blueprint.container.BlueprintContainerImpl.processProcessors(BlueprintContainerImpl.java:496)[7:org.apache.aries.blueprint.core:1.0.1]
>         at
>
> org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:338)[7:org.apache.aries.blueprint.core:1.0.1]
>         at
>
> org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1]
>         at
>
> org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1]
>         at
>
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_27]
>         at
>
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_27]
>         at
> java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_27]
>         at
>
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)[:1.6.0_27]
>         at
>
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)[:1.6.0_27]
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_27]
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_27]
>         at java.lang.Thread.run(Thread.java:662)[:1.6.0_27]
> Caused by: java.lang.NullPointerException
>         at
>
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1432)
>         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:295)[:1.6.0_27]
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_27]
>         at java.lang.Class.forName0(Native Method)[:1.6.0_27]
>         at java.lang.Class.forName(Class.java:247)[:1.6.0_27]
>         at
>
> org.apache.aries.proxy.impl.interfaces.ProxyClassLoader.isInvalid(ProxyClassLoader.java:109)[12:org.apache.aries.proxy.impl:1.0.0]
>         at
>
> org.apache.aries.proxy.impl.interfaces.InterfaceProxyGenerator.getProxyInstance(InterfaceProxyGenerator.java:84)[12:org.apache.aries.proxy.impl:1.0.0]
>         at
>
> org.apache.aries.proxy.impl.AsmProxyManager.createNewProxy(AsmProxyManager.java:72)[12:org.apache.aries.proxy.impl:1.0.0]
>         at
>
> org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingInterceptingProxy(AbstractProxyManager.java:75)[12:org.apache.aries.proxy.impl:1.0.0]
>         at
>
> org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingProxy(AbstractProxyManager.java:40)[12:org.apache.aries.proxy.impl:1.0.0]
>         at
>
> org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.createProxy(AbstractServiceReferenceRecipe.java:299)[7:org.apache.aries.blueprint.core:1.0.1]
>         at
>
> org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:100)[7:org.apache.aries.blueprint.core:1.0.1]
>         ... 28 more
>
> and my test configuration:
>
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:camel="http://camel.apache.org/schema/blueprint"
>         xmlns:cm="
> http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
>         xsi:schemaLocation="
>        http://www.osgi.org/xmlns/blueprint/v1.1.0
>        http://www.osgi.org/xmlns/blueprint/v1.1.0/blueprint.xsd
>        http://camel.apache.org/schema/blueprint
>        http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
>        http://aries.apache.org/blueprint/xmlns/blueprint-cm/
>        http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd
> ">
>
>         <cm:property-placeholder persistent-id="fr.spinwin.test">
>                 <cm:default-properties>
>                         <cm:property name="blabla" value="test" />
>                 </cm:default-properties>
>         </cm:property-placeholder>
>
>         <bean id="helloBean" class="fr.spinwin.test.HelloBean">
>                 <property name="say" value="${blabla}" />
>         </bean>
>
>         <camelContext id="blueprintContext" trace="false"
> xmlns="http://camel.apache.org/schema/blueprint">
>                 <route id="timerToLog">
>                         <from uri="timer:foo?period=5000" />
>                         <setBody>
>                                 <method ref="helloBean" method="hello" />
>                         </setBody>
>                         <log message="The message contains ${body}" />
>                 </route>
>         </camelContext>
> </blueprint>
>
> I used this test from the maven archetype "camel-archetype-blueprint."
>
> Thank you for your help
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/property-placeholder-OSGI-tp5723850p5723884.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>



--

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message