[ 
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.

Reply via email to