AccessControlException in EquinoxServiceDiscoverer with Java2 security enabled ------------------------------------------------------------------------------
Key: TUSCANY-3887 URL: https://issues.apache.org/jira/browse/TUSCANY-3887 Project: Tuscany Issue Type: Bug Reporter: Greg Dritschler Priority: Minor An AccessControlException occurs when a client program calls SCAClientFactory, if a security manager is enabled and the EquinoxServiceDiscoverer is in use. java.security.AccessControlException: Access denied (org.osgi.framework.AdminPermission (id=1) metadata) at java.security.AccessController.checkPermission(AccessController.java:108) at java.lang.SecurityManager.checkPermission(SecurityManager.java:544) at com.ibm.ws.security.core.SecurityManager.checkPermission(SecurityManager.java:208) at org.eclipse.osgi.framework.internal.core.Framework.checkAdminPermission(Framework.java:1177) at org.eclipse.osgi.framework.internal.core.AbstractBundle.getHeaders(AbstractBundle.java:943) at org.eclipse.osgi.framework.internal.core.AbstractBundle.getHeaders(AbstractBundle.java:901) at org.apache.tuscany.sca.extensibility.equinox.EquinoxServiceDiscoverer.isProviderBundle(EquinoxServiceDiscoverer.java:218) at org.apache.tuscany.sca.extensibility.equinox.EquinoxServiceDiscoverer.getBundles(EquinoxServiceDiscoverer.java:242) at org.apache.tuscany.sca.extensibility.equinox.EquinoxServiceDiscoverer.getServiceDeclarations(EquinoxServiceDiscoverer.java:274) at org.apache.tuscany.sca.extensibility.ServiceDiscovery.getServiceDeclarations(ServiceDiscovery.java:107) at org.apache.tuscany.sca.extensibility.ServiceDiscovery.getServiceDeclarations(ServiceDiscovery.java:165) at org.apache.tuscany.sca.extensibility.ServiceDiscovery.getServiceDeclaration(ServiceDiscovery.java:224) at org.apache.tuscany.sca.core.DefaultExtensionPointRegistry.getExtensionPoint(DefaultExtensionPointRegistry.java:105) at org.apache.tuscany.sca.core.context.impl.ComponentContextImpl.getInterfaceContract(ComponentContextImpl.java:471) at org.apache.tuscany.sca.core.context.impl.ComponentContextImpl.createEndpointReference(ComponentContextImpl.java:416) at org.apache.tuscany.sca.core.context.impl.ComponentContextImpl.createEndpointReference(ComponentContextImpl.java:392) at org.apache.tuscany.sca.core.context.impl.ComponentContextImpl.createSelfReference(ComponentContextImpl.java:300) at org.apache.tuscany.sca.core.context.impl.ComponentContextImpl.createSelfReference(ComponentContextImpl.java:254) at org.apache.tuscany.sca.core.assembly.impl.RuntimeComponentImpl.getServiceReference(RuntimeComponentImpl.java:154) at org.apache.tuscany.sca.client.impl.SCAClientFactoryImpl.getService(SCAClientFactoryImpl.java:90) EquinoxServiceDiscoverer.getServiceDeclarations() needs to use a doPriviledged block to avoid requiring the client to have osgi permissions. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira