users@jersey.java.net

"access denied" for Jersey JARs

From: Arun Gupta <Arun.Gupta_at_Sun.COM>
Date: Tue, 17 Nov 2009 12:40:17 -0800

I'm signing and bundling jsr311-api.jar and other Jersey jars as part of
a JavaFX JNLP application. The permissions are explicitly set to:

  <security>
         <all-permissions/>
     </security>

Even then loading the JNLP throws "access denied" error with the
following traces.

Any suggestions on what might be causing this error ?


Reading certificates from 11
http://blogs.sun.com/arungupta/resource/glassfish/jsr311-api.jar |
/Users/arungupta/Library/Caches/Java/cache/6.0/39/bc906e7-554b6fd1.idx
Nov 17, 2009 12:36:09 PM
com.sun.jersey.core.spi.component.ProviderFactory __getComponentProvider
SEVERE: The provider class, class
com.sun.jersey.core.impl.provider.xml.SAXParserContextProvider, could
not be instantiated. Processing will continue but the class will not be
utilized
java.security.AccessControlException: access denied
(java.lang.reflect.ReflectPermission suppressAccessChecks)
        at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
        at
java.security.AccessController.checkPermission(AccessController.java:427)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
        at
java.lang.reflect.AccessibleObject.setAccessible(AccessibleObject.java:107)
        at
com.sun.jersey.core.spi.component.ComponentInjector$2.run(ComponentInjector.java:143)
        at java.security.AccessController.doPrivileged(Native Method)
        at
com.sun.jersey.core.spi.component.ComponentInjector.getFieldValue(ComponentInjector.java:139)
        at
com.sun.jersey.core.spi.component.ComponentInjector.inject(ComponentInjector.java:84)
        at
com.sun.jersey.core.spi.component.ComponentConstructor.getInstance(ComponentConstructor.java:141)
        at
com.sun.jersey.core.spi.component.ProviderFactory.__getComponentProvider(ProviderFactory.java:159)
        at
com.sun.jersey.core.spi.component.ProviderFactory.getComponentProvider(ProviderFactory.java:130)
        at
com.sun.jersey.core.spi.component.ProviderServices.getComponent(ProviderServices.java:190)
        at
com.sun.jersey.core.spi.component.ProviderServices.getProvidersAndServices(ProviderServices.java:139)
        at
com.sun.jersey.core.spi.factory.InjectableProviderFactory.configure(InjectableProviderFactory.java:98)
        at com.sun.jersey.api.client.Client.<init>(Client.java:210)



Nov 17, 2009 12:36:09 PM
com.sun.jersey.core.spi.component.ProviderFactory __getComponentProvider
SEVERE: The provider class, class
com.sun.jersey.core.impl.provider.xml.XMLStreamReaderContextProvider,
could not be instantiated. Processing will continue but the class will
not be utilized
java.security.AccessControlException: access denied
(java.lang.reflect.ReflectPermission suppressAccessChecks)
        at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
        at
java.security.AccessController.checkPermission(AccessController.java:427)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
        at
java.lang.reflect.AccessibleObject.setAccessible(AccessibleObject.java:107)
        at
com.sun.jersey.core.spi.component.ComponentInjector$2.run(ComponentInjector.java:143)
        at java.security.AccessController.doPrivileged(Native Method)
        at
com.sun.jersey.core.spi.component.ComponentInjector.getFieldValue(ComponentInjector.java:139)
        at
com.sun.jersey.core.spi.component.ComponentInjector.inject(ComponentInjector.java:84)
        at
com.sun.jersey.core.spi.component.ComponentConstructor.getInstance(ComponentConstructor.java:141)
        at
com.sun.jersey.core.spi.component.ProviderFactory.__getComponentProvider(ProviderFactory.java:159)
        at
com.sun.jersey.core.spi.component.ProviderFactory.getComponentProvider(ProviderFactory.java:130)
        at
com.sun.jersey.core.spi.component.ProviderServices.getComponent(ProviderServices.java:190)
        at
com.sun.jersey.core.spi.component.ProviderServices.getProvidersAndServices(ProviderServices.java:139)
        at
com.sun.jersey.core.spi.factory.InjectableProviderFactory.configure(InjectableProviderFactory.java:98)
        at com.sun.jersey.api.client.Client.<init>(Client.java:210)
        at com.sun.jersey.api.client.Client.<init>(Client.java:139)


Nov 17, 2009 12:36:09 PM
com.sun.jersey.core.spi.component.ProviderFactory __getComponentProvider
SEVERE: The provider class, class
com.sun.jersey.core.impl.provider.xml.DocumentBuilderFactoryProvider,
could not be instantiated. Processing will continue but the class will
not be utilized
java.security.AccessControlException: access denied
(java.lang.reflect.ReflectPermission suppressAccessChecks)
        at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
        at
java.security.AccessController.checkPermission(AccessController.java:427)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
        at
java.lang.reflect.AccessibleObject.setAccessible(AccessibleObject.java:107)
        at
com.sun.jersey.core.spi.component.ComponentInjector$2.run(ComponentInjector.java:143)
        at java.security.AccessController.doPrivileged(Native Method)
        at
com.sun.jersey.core.spi.component.ComponentInjector.getFieldValue(ComponentInjector.java:139)
        at
com.sun.jersey.core.spi.component.ComponentInjector.inject(ComponentInjector.java:84)


Nov 17, 2009 12:36:09 PM
com.sun.jersey.core.spi.component.ProviderFactory __getComponentProvider
SEVERE: The provider class, class
com.sun.jersey.core.impl.provider.xml.TransformerFactoryProvider, could
not be instantiated. Processing will continue but the class will not be
utilized
java.security.AccessControlException: access denied
(java.lang.reflect.ReflectPermission suppressAccessChecks)
        at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
        at
java.security.AccessController.checkPermission(AccessController.java:427)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
        at
java.lang.reflect.AccessibleObject.setAccessible(AccessibleObject.java:107)
        at
com.sun.jersey.core.spi.component.ComponentInjector$2.run(ComponentInjector.java:143)
        at java.security.AccessController.doPrivileged(Native Method)
        at
com.sun.jersey.core.spi.component.ComponentInjector.getFieldValue(ComponentInjector.java:139)
        at
com.sun.jersey.core.spi.component.ComponentInjector.inject(ComponentInjector.java:84)
        at
com.sun.jersey.core.spi.component.ComponentConstructor.getInstance(ComponentConstructor.java:141)

Thanks,
-Arun

-- 
Need Application Server ? Download from http://glassfish.org
Blog: http://blog.arungupta.me