aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johan Huylebroeck (JIRA)" <>
Subject [jira] [Updated] (ARIES-894) Using blueprintBundle as a factory bean for resources throws IllegalAccessException
Date Tue, 31 Jul 2012 10:52:33 GMT


Johan Huylebroeck updated ARIES-894:

    Attachment: aries-894.patch.gz

created a patch against the latest aries trunk on github of blueprint-core. Moved some code
from BeanRecipe to separate classes (MethodResolver, ...). Test were moved/added accordingly.
> Using blueprintBundle as a factory bean for resources throws IllegalAccessException
> -----------------------------------------------------------------------------------
>                 Key: ARIES-894
>                 URL:
>             Project: Aries
>          Issue Type: Bug
>          Components: Blueprint
>    Affects Versions: blueprint-0.3.1
>            Reporter: Johan Huylebroeck
>              Labels: patch
>         Attachments: aries-894.patch.gz
> I’m using apache aries 0.3.2 and I was trying to lookup a script in the bundle like
> <bean id="script" factory-ref="blueprintBundle" factory-method="getEntry">
>        <argument value="scripts/myScript"/>
> </bean>
> But it fails with this exception:
> java.lang.IllegalAccessException: Class org.apache.aries.blueprint.utils.ReflectionUtils
can not access a member of class org.apache.felix.framework.BundleImpl with modifiers "public"
>                 at sun.reflect.Reflection.ensureMemberAccess([:1.6.0_32]
>                 at java.lang.reflect.Method.invoke([:1.6.0_32]
>                 at org.apache.aries.blueprint.utils.ReflectionUtils.invoke([10:org.apache.aries.blueprint:0.3.2]
>                 at org.apache.aries.blueprint.container.BeanRecipe.invoke([10:org.apache.aries.blueprint:0.3.2]
>                 at org.apache.aries.blueprint.container.BeanRecipe.getInstance([10:org.apache.aries.blueprint:0.3.2]
>                 ... 15 more
> The problem seems to be that the factory method is resolved against the implementation
class BundleImpl which is package private and not the interface org.osgi.framework.Bundle
which is public.
> There is a workaround by injecting the bundle in a wrapper bean and using this bean to
do the lookup.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message