You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Dmitry Beransky <dm...@gmail.com> on 2009/01/31 02:03:29 UTC

IlegalAccessException

Hi,

I'm trying to get a simple embedded Felix scenario working and am
getting this exception:

java.lang.IllegalAccessException: Class
org.apache.felix.framework.Felix can not access a member of class
service.policy.osgi.PolicyServiceActivator with modifiers ""
	at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
	at java.lang.Class.newInstance0(Class.java:349)


What could be causing this?  Is my security manager not set up correctly?

Thanks
Dmitry

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: IlegalAccessException

Posted by Dmitry Beransky <dm...@gmail.com>.
D'oh!  that's what it was. Somehow the activator class was missig
"public".  Thanks.

On Sat, Jan 31, 2009 at 5:59 AM, Karl Pauls <ka...@gmail.com> wrote:
> Is it possible that your PolicyServiceActivator is not a public class?
> Otherwise, I guess I need a little more context from you. Please
> provide the full stacktrace if possible and or explain how I can
> recreate the issue. Furthermore, it would be helpful if you let us
> know what your set-up is (i.e., do you have security enabled, what
> bundle are you trying to start etc.).
>
> regards,
>
> Karl
>
> On Sat, Jan 31, 2009 at 2:03 AM, Dmitry Beransky <dm...@gmail.com> wrote:
>> Hi,
>>
>> I'm trying to get a simple embedded Felix scenario working and am
>> getting this exception:
>>
>> java.lang.IllegalAccessException: Class
>> org.apache.felix.framework.Felix can not access a member of class
>> service.policy.osgi.PolicyServiceActivator with modifiers ""
>>        at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
>>        at java.lang.Class.newInstance0(Class.java:349)
>>
>>
>> What could be causing this?  Is my security manager not set up correctly?
>>
>> Thanks
>> Dmitry
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>
>
>
> --
> Karl Pauls
> karlpauls@gmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: IlegalAccessException

Posted by Karl Pauls <ka...@gmail.com>.
Is it possible that your PolicyServiceActivator is not a public class?
Otherwise, I guess I need a little more context from you. Please
provide the full stacktrace if possible and or explain how I can
recreate the issue. Furthermore, it would be helpful if you let us
know what your set-up is (i.e., do you have security enabled, what
bundle are you trying to start etc.).

regards,

Karl

On Sat, Jan 31, 2009 at 2:03 AM, Dmitry Beransky <dm...@gmail.com> wrote:
> Hi,
>
> I'm trying to get a simple embedded Felix scenario working and am
> getting this exception:
>
> java.lang.IllegalAccessException: Class
> org.apache.felix.framework.Felix can not access a member of class
> service.policy.osgi.PolicyServiceActivator with modifiers ""
>        at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
>        at java.lang.Class.newInstance0(Class.java:349)
>
>
> What could be causing this?  Is my security manager not set up correctly?
>
> Thanks
> Dmitry
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>



-- 
Karl Pauls
karlpauls@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: IlegalAccessException

Posted by Felix Meschberger <fm...@gmail.com>.
Hi,

Karl Pauls schrieb:
> On Sat, Jan 31, 2009 at 8:00 PM, Felix Meschberger <fm...@gmail.com> wrote:
>> This looks like the service.policy.osgi.PoliyServiceActivator class
>> should be instantiated with a non-public constructor. Could it be that
>> the default constructor might be used, which has default (i.e. package)
>> access instead of public ?
> 
> Or, as I said, the class itself is not public?

Yes, sorry, I only saw your reply, when I already have hit Send on mine ;-)

Regards
Felix

> 
> regards,
> 
> Karl
> 
>> Regards
>> Felix
>>
>>
>> Dmitry Beransky schrieb:
>>> Hi,
>>>
>>> I'm trying to get a simple embedded Felix scenario working and am
>>> getting this exception:
>>>
>>> java.lang.IllegalAccessException: Class
>>> org.apache.felix.framework.Felix can not access a member of class
>>> service.policy.osgi.PolicyServiceActivator with modifiers ""
>>>       at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
>>>       at java.lang.Class.newInstance0(Class.java:349)
>>>
>>>
>>> What could be causing this?  Is my security manager not set up correctly?
>>>
>>> Thanks
>>> Dmitry
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: IlegalAccessException

Posted by Karl Pauls <ka...@gmail.com>.
On Sat, Jan 31, 2009 at 8:00 PM, Felix Meschberger <fm...@gmail.com> wrote:
> This looks like the service.policy.osgi.PoliyServiceActivator class
> should be instantiated with a non-public constructor. Could it be that
> the default constructor might be used, which has default (i.e. package)
> access instead of public ?

Or, as I said, the class itself is not public?

regards,

Karl

> Regards
> Felix
>
>
> Dmitry Beransky schrieb:
>> Hi,
>>
>> I'm trying to get a simple embedded Felix scenario working and am
>> getting this exception:
>>
>> java.lang.IllegalAccessException: Class
>> org.apache.felix.framework.Felix can not access a member of class
>> service.policy.osgi.PolicyServiceActivator with modifiers ""
>>       at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
>>       at java.lang.Class.newInstance0(Class.java:349)
>>
>>
>> What could be causing this?  Is my security manager not set up correctly?
>>
>> Thanks
>> Dmitry
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>



-- 
Karl Pauls
karlpauls@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: IlegalAccessException

Posted by Felix Meschberger <fm...@gmail.com>.
This looks like the service.policy.osgi.PoliyServiceActivator class
should be instantiated with a non-public constructor. Could it be that
the default constructor might be used, which has default (i.e. package)
access instead of public ?

Regards
Felix


Dmitry Beransky schrieb:
> Hi,
> 
> I'm trying to get a simple embedded Felix scenario working and am
> getting this exception:
> 
> java.lang.IllegalAccessException: Class
> org.apache.felix.framework.Felix can not access a member of class
> service.policy.osgi.PolicyServiceActivator with modifiers ""
> 	at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
> 	at java.lang.Class.newInstance0(Class.java:349)
> 
> 
> What could be causing this?  Is my security manager not set up correctly?
> 
> Thanks
> Dmitry
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org