aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alasdair Nottingham (JIRA)" <>
Subject [jira] Created: (ARIES-526) NPE from ServiceRecipe when proxying JDK classes
Date Thu, 23 Dec 2010 21:41:45 GMT
NPE from ServiceRecipe when proxying JDK classes

                 Key: ARIES-526
             Project: Aries
          Issue Type: Bug
          Components: Blueprint
    Affects Versions: 0.3
            Reporter: Alasdair Nottingham
            Assignee: Alasdair Nottingham
             Fix For: 0.3

The ProxyManager expects to be given a non-null Bundle when generating the proxy. Currently
in some scenarios Blueprint can pass in null. Causing the following:

[12/23/10 13:52:26:537 GMT] 00000017 ServiceRecipe I org.apache.aries.blueprint.container.ServiceRecipe$TriggerServiceFactory
getService A problem occurred trying to create a proxy object. Returning the original object
	at org.apache.aries.proxy.impl.AbstractProxyManager.getClassLoader(
	at org.apache.aries.proxy.impl.AsmProxyManager.createNewProxy(
	at org.apache.aries.proxy.impl.AbstractProxyManager.createProxy(
	at org.apache.aries.blueprint.container.ServiceRecipe$TriggerServiceFactory.getService(
	at org.eclipse.osgi.internal.serviceregistry.ServiceUse$

This is caused because in TriggerServiceFactory it calls FrameworkUtil.getBundle() this returns
null if the class isn't loaded from a bundle, e.g. is from the JDK, so proxying doesn't work.
In this scenario we should use the blueprint bundle instead to generate the proxy.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message