You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Mike Wilson (JIRA)" <ji...@apache.org> on 2012/12/05 14:52:59 UTC

[jira] [Created] (ARIES-980) Aries JNDI breaks JNDI calls from outside OSGI container in embedded scenarios

Mike Wilson created ARIES-980:
---------------------------------

             Summary: Aries JNDI breaks JNDI calls from outside OSGI container in embedded scenarios
                 Key: ARIES-980
                 URL: https://issues.apache.org/jira/browse/ARIES-980
             Project: Aries
          Issue Type: Bug
          Components: JNDI
         Environment: Application with embedded Karaf 2.3.0 containing installed Apache Aries JNDI 1.0.0
            Reporter: Mike Wilson


When doing
{code}
new InitialContext();
{code}
from application code outside OSGI container, the following exception is thrown:
{code}
javax.naming.NoInitialContextException: The calling code's BundleContext could not be determined.
	at org.apache.aries.jndi.OSGiInitialContextFactoryBuilder.getInitialContext(OSGiInitialContextFactoryBuilder.java:46)
	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
	at javax.naming.InitialContext.init(InitialContext.java:242)
	at javax.naming.InitialContext.<init>(InitialContext.java:192)
{code}
Thus, the outside application can't use JNDI.

--
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: http://www.atlassian.com/software/jira