aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Bosschaert (JIRA)" <>
Subject [jira] [Created] (ARIES-916) Lookup of System BundleContext via JNDI causes AccessControlException
Date Tue, 04 Sep 2012 09:52:08 GMT
David Bosschaert created ARIES-916:

             Summary: Lookup of System BundleContext via JNDI causes AccessControlException
                 Key: ARIES-916
             Project: Aries
          Issue Type: Bug
          Components: JNDI
         Environment: Aries util 1.0.0 (but also happens on 0.3.1)
This happens with both Equinox 3.7.2 as well as JBoss OSGi 7.2.x

(Note that these versions aren't available yet in the JIRA versions selector)
            Reporter: David Bosschaert

When using Aries JNDI to do the following lookup an AccessControlException below occurs:
{{BundleContext bc = (BundleContext) initialContext.lookup("osgi:framework/bundleContext");}}
Note that the framework is *not* running with security enabled.

BTW ordinary service lookups using {{initialContext.lookup("osgi:service/org.acme.Foo")}}
do succeed.

The exception is:
{code}The Caller does not have permissions to get the BundleContext. [Root exception is
access denied (org.osgi.framework.AdminPermission (id=7) context)]
 	at org.apache.aries.jndi.url.ServiceRegistryContext.lookup(
	at org.apache.aries.jndi.url.ServiceRegistryContext.lookup(
	at org.apache.aries.jndi.DelegateContext.lookup(
	at javax.naming.InitialContext.lookup(
	at jndibundle.Activator.start(
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl$
	at Method)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(
	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(
	at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(
	at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(
	at org.eclipse.osgi.framework.internal.core.FrameworkConsole.runConsole(
Caused by: access denied (org.osgi.framework.AdminPermission
(id=7) context)
	at org.apache.aries.jndi.url.ServiceRegistryContext.lookup(
	... 21 more{code}

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

View raw message