aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Nuttall (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARIES-1238) Fix for ARIES-1216 can cause NPE if classToProxy is a class from the boot loader
Date Thu, 28 Aug 2014 10:45:59 GMT

    [ https://issues.apache.org/jira/browse/ARIES-1238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14113649#comment-14113649
] 

Mark Nuttall commented on ARIES-1238:
-------------------------------------

I've also run into this, and have found Tom's patch to be useful. Committing it for now. 

> Fix for ARIES-1216 can cause NPE if classToProxy is a class from the boot loader
> --------------------------------------------------------------------------------
>
>                 Key: ARIES-1238
>                 URL: https://issues.apache.org/jira/browse/ARIES-1238
>             Project: Aries
>          Issue Type: Bug
>          Components: Proxy
>            Reporter: Thomas Watson
>            Assignee: Mark Nuttall
>         Attachments: ARIES-1238.patch
>
>
> I'm not entirely sure on the scenario to reproduce this.  But I was getting an NPE when
the classToProxy is a class from the boot strap class loader.  In my scenario I think that
class is java.util.Properties:
> org.osgi.service.blueprint.container.ComponentDefinitionException: Error setting property:
PropertyDescriptor <name: props, getter: null, setter: [class bp.test.client.TestBean.setProps(class
java.util.Properties)]
>         at org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:941)
>         at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:907)
>         at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:888)
>         at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:820)
>         at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)
>         at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:273)
>         at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)
>         at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)
>         at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)
>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:681)
>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:378)
>         at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:269)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:482)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:273)
>         at org.apache.aries.blueprint.container.ExecutorServiceWrapper.run(ExecutorServiceWrapper.java:106)
>         at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:482)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:273)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:189)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:303)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1156)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:626)
>         at java.lang.Thread.run(Thread.java:804)
> Caused by: java.lang.NullPointerException
>         at org.apache.aries.proxy.impl.AsmProxyManager.createNewProxy(AsmProxyManager.java:117)
>         at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingInterceptingProxy(AbstractProxyManager.java:75)
>         at org.apache.aries.proxy.impl.AbstractProxyManager.createInterceptingProxy(AbstractProxyManager.java:53)
>         at org.apache.aries.blueprint.container.BeanRecipe.addInterceptors(BeanRecipe.java:767)
>         at org.apache.aries.blueprint.container.BeanRecipe.wrap(BeanRecipe.java:843)
>         at org.apache.aries.blueprint.container.AggregateConverter.convert(AggregateConverter.java:149)
>         at org.apache.aries.blueprint.container.BlueprintRepository.convert(BlueprintRepository.java:402)
>         at org.apache.aries.blueprint.utils.ReflectionUtils$PropertyDescriptor.convert(ReflectionUtils.java:394)
>         at org.apache.aries.blueprint.utils.ReflectionUtils$MethodPropertyDescriptor.internalSet(ReflectionUtils.java:628)
>         at org.apache.aries.blueprint.utils.ReflectionUtils$PropertyDescriptor.set(ReflectionUtils.java:378)
>         at org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:939)
>         ... 23 more



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message