Return-Path: Delivered-To: apmail-karaf-issues-archive@minotaur.apache.org Received: (qmail 14044 invoked from network); 30 Nov 2010 17:14:38 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Nov 2010 17:14:38 -0000 Received: (qmail 94624 invoked by uid 500); 30 Nov 2010 17:14:38 -0000 Delivered-To: apmail-karaf-issues-archive@karaf.apache.org Received: (qmail 94607 invoked by uid 500); 30 Nov 2010 17:14:38 -0000 Mailing-List: contact issues-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@karaf.apache.org Delivered-To: mailing list issues@karaf.apache.org Received: (qmail 94598 invoked by uid 99); 30 Nov 2010 17:14:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Nov 2010 17:14:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Nov 2010 17:14:35 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oAUHEDiY017039 for ; Tue, 30 Nov 2010 17:14:13 GMT Message-ID: <16143907.26781291137253736.JavaMail.jira@thor> Date: Tue, 30 Nov 2010 12:14:13 -0500 (EST) From: "Guillaume Nodet (JIRA)" To: issues@karaf.apache.org Subject: [jira] Resolved: (KARAF-304) Startup problems: javax.naming.NoInitialContextException: Unable to determine caller'sBundleContext In-Reply-To: <31463484.22321291113856676.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/KARAF-304?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guillaume Nodet resolved KARAF-304. ----------------------------------- Resolution: Fixed Fix Version/s: 2.2.0 2.1.3 Assignee: Guillaume Nodet Committing to https://svn.apache.org/repos/asf/karaf/branches/karaf-2.1.x ... M management/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java Committed r1040647 Committing to https://svn.apache.org/repos/asf/karaf/trunk ... M features/enterprise/src/main/resources/features.xml M management/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java Committed r1040646 > Startup problems: javax.naming.NoInitialContextException: Unable to determine caller'sBundleContext > --------------------------------------------------------------------------------------------------- > > Key: KARAF-304 > URL: https://issues.apache.org/jira/browse/KARAF-304 > Project: Karaf > Issue Type: Bug > Affects Versions: 2.1.2 > Reporter: Bengt Rodehav > Assignee: Guillaume Nodet > Fix For: 2.1.3, 2.2.0 > > > On a clean startup (the data directory is empty) everything works OK. However, when I restart Karaf (without cleaning out the data directory) I consistently get the following exception: > Exception in thread "JMX Connector Thread [service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-root]" java.lang.RuntimeException: Could not start JMX connector server > at org.apache.karaf.management.ConnectorServerFactory$1.run(ConnectorServerFactory.java:103) > Caused by: java.io.IOException: Cannot bind to URL [rmi://localhost:1099/karaf-root]: javax.naming.NoInitialContextException: Unable to determine caller's BundleContext > at javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:804) > at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:417) > at org.apache.karaf.management.ConnectorServerFactory$1.run(ConnectorServerFactory.java:101) > Caused by: javax.naming.NoInitialContextException: Unable to determine caller'sBundleContext > at org.apache.aries.jndi.OSGiInitialContextFactoryBuilder.getInitialContext(OSGiInitialContextFactoryBuilder.java:53) > at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667) > at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) > at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:316) > at javax.naming.InitialContext.bind(InitialContext.java:400) > at javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServer.java:625) > at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:412) > ... 1 more > I'm thinking there may be timing errors. Note that the exception is only logged to the console - not to the log file. Perhaps it occurs before the logging bundle is installed? > I haven't seen this in previous versions of Karaf (2.1.0 and 1.6.0) but I've also added and changed a lot of bundles in addition to upgrading to Karaf 2.1.2. Thus I don't know for sure if this is a problem specific to Karaf 2.1.2. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.