Return-Path: Delivered-To: apmail-aries-dev-archive@www.apache.org Received: (qmail 4003 invoked from network); 24 Jan 2011 08:03:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Jan 2011 08:03:12 -0000 Received: (qmail 78304 invoked by uid 500); 24 Jan 2011 08:03:11 -0000 Delivered-To: apmail-aries-dev-archive@aries.apache.org Received: (qmail 78242 invoked by uid 500); 24 Jan 2011 08:03:09 -0000 Mailing-List: contact dev-help@aries.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aries.apache.org Delivered-To: mailing list dev@aries.apache.org Received: (qmail 78234 invoked by uid 99); 24 Jan 2011 08:03:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Jan 2011 08:03:07 +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; Mon, 24 Jan 2011 08:03:05 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p0O82hiW005200 for ; Mon, 24 Jan 2011 08:02:43 GMT Message-ID: <14045078.146371295856163311.JavaMail.jira@thor> Date: Mon, 24 Jan 2011 03:02:43 -0500 (EST) From: "Stephan Siano (JIRA)" To: dev@aries.apache.org Subject: [jira] Commented: (ARIES-554) aries JNDI bundle breaks remote JMX clients via RMI In-Reply-To: <9374767.125251295703823222.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/ARIES-554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985552#action_12985552 ] Stephan Siano commented on ARIES-554: ------------------------------------- The exception is the following (the backtrace is from felix, but the exception is the same on eqinox): org.osgi.framework.BundleException: Activator start error in bundle com.sap.esb.pico.jndi.barebone.test [1]. at org.apache.felix.framework.Felix.activateBundle(Felix.java:1909) at org.apache.felix.framework.Felix.startBundle(Felix.java:1779) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905) at org.apache.felix.gogo.command.Basic.start(Basic.java:758) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136) at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82) at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:421) at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:335) at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108) at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:184) at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:121) at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:78) at org.apache.felix.gogo.shell.Console.run(Console.java:62) at org.apache.felix.gogo.shell.Shell.console(Shell.java:197) at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:123) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136) at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82) at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:421) at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:335) at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108) at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:184) at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:121) at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:78) at org.apache.felix.gogo.shell.Activator.run(Activator.java:72) at java.lang.Thread.run(Thread.java:662) Caused by: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.NoInitialContextException: Unable to determine caller's BundleContext at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:338) at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248) at com.sap.esb.jndi.barebone.test.Activator.start(Activator.java:17) at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:633) at org.apache.felix.framework.Felix.activateBundle(Felix.java:1862) ... 32 more Caused by: javax.naming.NoInitialContextException: Unable to determine caller's BundleContext at org.apache.aries.jndi.OSGiInitialContextFactoryBuilder.getInitialContext(OSGiInitialContextFactoryBuilder.java:49) 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.lookup(InitialContext.java:392) at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1886) at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1856) at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:257) ... 36 more java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.NoInitialContextException: Unable to determine caller's BundleContext > aries JNDI bundle breaks remote JMX clients via RMI > --------------------------------------------------- > > Key: ARIES-554 > URL: https://issues.apache.org/jira/browse/ARIES-554 > Project: Aries > Issue Type: Bug > Components: JNDI > Affects Versions: 0.2, 0.3 > Reporter: Stephan Siano > > If the aries JNDI bundles are present in the environment, connections to remote JMX agents fail. I could recreate the issue with a bundle containing only the line > JMXConnectorFactory.connect(new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:1717/jmxrmi")); > in the start() method of the bundle activator (and nothing else). > The bundle will start both on equinox and felix as long as the aries jndi bundles (I tried version 0.2 and 0.3-SNAPSHOT) are not running and any java application that allows remote JMX at that port is running (check with jconsole if you are unsure). It will not start as soon as the jndi bundle is started. As far as I got in debugging this, the JMXConnectionFactory is trying to do a JNDI lookup for the RMI connection and is delegated to the Aries JNDI coding, that is trying to determine a bundle context for the call. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.