users@jersey.java.net

Re: [Jersey] Jersey client and unsigned applet

From: Aaron Bruegl <abruegl_at_nighthawkrad.net>
Date: Tue, 28 Oct 2008 14:34:01 -0500

Yes, providing a signed applet works - though it would be nice not to
have had that requirement ;-) ...not a big deal


Paul Sandoz wrote:
> On Oct 28, 2008, at 3:19 PM, Aaron Bruegl wrote:
>
>> I was hoping to be able to use this without signing my applet and
>> grating this permission:
>> grant {
>> permission java.lang.reflect.ReflectPermission
>> "suppressAccessChecks";
>> };
>>
>
> Did you try that?
>
> Paul.
>
>>
>> ________________________________
>>
>> From: Paul Sandoz [mailto:Paul.Sandoz_at_Sun.COM]
>> Sent: Tue 10/28/2008 2:43 AM
>> To: users_at_jersey.dev.java.net
>> Subject: Re: [Jersey] Jersey client and unsigned applet
>>
>>
>>
>> Hi Aaron,
>>
>> I am not that knowledgeable about security access control and setting
>> of the policy. I think you need to set security permissions so that
>> the Jersey client has permissions to set a field to be accessible.
>>
>> Paul.
>>
>> On Oct 28, 2008, at 12:25 AM, Aaron Bruegl wrote:
>>
>>> I am wondering if it is possible to use the Jersey client in an
>>> unsigned applet (where the applet is talking to the same server it
>>> was downloaded from). I am currently getting an exception on use of:
>>> Client.create();
>>>
>>> Below is stack trace:
>>>
>>> java.security.AccessControlException: access denied
>>> (java.lang.reflect.ReflectPermission suppressAccessChecks)
>>> at
>>> java
>>> .security
>>> .AccessControlContext.checkPermission(AccessControlContext.java:323)
>>> at
>>> java.security.AccessController.checkPermission(AccessController.java:
>>> 546)
>>> at java.lang.SecurityManager.checkPermission(SecurityManager.java:
>>> 532)
>>> at
>>> java
>>> .lang.reflect.AccessibleObject.setAccessible(AccessibleObject.java:
>>> 107)
>>> at com.sun.jersey.impl.application.InjectableProviderFactory
>>> $2.run(InjectableProviderFactory.java:406)
>>> at java.security.AccessController.doPrivileged(Native Method)
>>> at
>>> com
>>> .sun
>>> .jersey
>>> .impl
>>> .application
>>> .InjectableProviderFactory
>>> .getFieldValue(InjectableProviderFactory.java:402)
>>> at
>>> com
>>> .sun
>>> .jersey
>>> .impl
>>> .application
>>> .InjectableProviderFactory
>>> .injectResources(InjectableProviderFactory.java:346)
>>> at com.sun.jersey.api.client.Client.injectResources(Client.java:410)
>>> at com.sun.jersey.api.client.Client.access$000(Client.java:87)
>>> at com.sun.jersey.api.client.Client
>>> $DefaultComponentProvider.getInstance(Client.java:157)
>>> at
>>> com
>>> .sun
>>> .jersey
>>> .impl
>>> .application
>>> .ComponentProviderCache.getComponent(ComponentProviderCache.java:179)
>>> at
>>> com
>>> .sun
>>> .jersey
>>> .impl
>>> .application
>>> .ComponentProviderCache
>>> .getProvidersAndServices(ComponentProviderCache.java:122)
>>> at
>>> com
>>> .sun
>>> .jersey
>>> .impl
>>> .application
>>> .MessageBodyFactory.getProviderMap(MessageBodyFactory.java:133)
>>> at
>>> com
>>> .sun
>>> .jersey
>>> .impl
>>> .application.MessageBodyFactory.initReaders(MessageBodyFactory.java:
>>> 107)
>>> at
>>> com
>>> .sun
>>> .jersey
>>> .impl.application.MessageBodyFactory.init(MessageBodyFactory.java:102)
>>> at com.sun.jersey.api.client.Client.<init>(Client.java:284)
>>> at com.sun.jersey.api.client.Client.<init>(Client.java:198)
>>> at com.sun.jersey.api.client.Client.create(Client.java:419)
>>>
>>>
>>> --
>>> Aaron Bruegl
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>>
>>
>> <winmail.dat>---------------------------------------------------------------------
>>
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>