You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Stephan Siano (JIRA)" <ji...@apache.org> on 2011/01/22 14:43:43 UTC

[jira] Created: (ARIES-554) aries JNDI bundle breaks remote JMX clients via RMI

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.


[jira] [Commented] (ARIES-554) aries JNDI bundle breaks remote JMX clients via RMI

Posted by "Felix Mayerhuber (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13128524#comment-13128524 ] 

Felix Mayerhuber commented on ARIES-554:
----------------------------------------

May I ask how the actual status of this problem is? The issue has the status resolved, but I have exactly the same problem. (Aries JNDI version 0.3)
                
> 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
>            Assignee: Alasdair Nottingham
>         Attachments: Utils.java.patch
>
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (ARIES-554) aries JNDI bundle breaks remote JMX clients via RMI

Posted by "Alasdair Nottingham (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13128535#comment-13128535 ] 

Alasdair Nottingham commented on ARIES-554:
-------------------------------------------

Hi,

The bug is resolved in the svn trunk, there hasn't been a release from trunk. The problem affected both 0.2 and 0.3 which is why you seeing the problem on 0.3. When we do a release the Fix version field will be updated to reflect the released version it was fixed in. We don't know the version until we do the release. Once the release goes out this problem will be closed.
                
> 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
>            Assignee: Alasdair Nottingham
>         Attachments: Utils.java.patch
>
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (ARIES-554) aries JNDI bundle breaks remote JMX clients via RMI

Posted by "Alasdair Nottingham (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ARIES-554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alasdair Nottingham reassigned ARIES-554:
-----------------------------------------

    Assignee: Alasdair Nottingham

> 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
>            Assignee: Alasdair Nottingham
>         Attachments: Utils.java.patch
>
>
> 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.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (ARIES-554) aries JNDI bundle breaks remote JMX clients via RMI

Posted by "Felix Mayerhuber (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13129704#comment-13129704 ] 

Felix Mayerhuber commented on ARIES-554:
----------------------------------------

I will do. Thank you :-)
                
> 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
>            Assignee: Alasdair Nottingham
>         Attachments: Utils.java.patch
>
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (ARIES-554) aries JNDI bundle breaks remote JMX clients via RMI

Posted by "Stephan Siano (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12992971#comment-12992971 ] 

Stephan Siano commented on ARIES-554:
-------------------------------------

I did some additional tests about this issue. The context issue goes away if I do a Thread.currentThread().setContextClassLoader(Activator.class.getClassLoader()); call before using the JMXConnectionFactory.connect() call. Alterrnatively I can put the BundleContext into the environment (with key "osgi.service.jndi.bundleContext"). I will run into another issue with proxy lookup then, but I will open a separate JIRA task for that.

> 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.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (ARIES-554) aries JNDI bundle breaks remote JMX clients via RMI

Posted by "Stephan Siano (JIRA)" <ji...@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.


[jira] [Updated] (ARIES-554) aries JNDI bundle breaks remote JMX clients via RMI

Posted by "Jeremy Hughes (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ARIES-554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeremy Hughes updated ARIES-554:
--------------------------------

    Fix Version/s: jndi uber bundle 0.3.1
                   jndi.core-0.3.1
    
> 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
>            Assignee: Alasdair Nottingham
>             Fix For: jndi.core-0.3.1, jndi uber bundle 0.3.1
>
>         Attachments: Utils.java.patch
>
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (ARIES-554) aries JNDI bundle breaks remote JMX clients via RMI

Posted by "Alasdair Nottingham (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12993481#comment-12993481 ] 

Alasdair Nottingham commented on ARIES-554:
-------------------------------------------

Hi,

You are right, the CT doesn't seem to test for this, but it is wrong. I was going to apply your patch and commit, but I started to look at the code and decided there were other issues here, such as potential class consistency errors. So I am going to put a different fix in, which will make the code a little more sane.

> 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
>         Attachments: Utils.java.patch
>
>
> 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.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (ARIES-554) aries JNDI bundle breaks remote JMX clients via RMI

Posted by "Alasdair Nottingham (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ARIES-554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alasdair Nottingham resolved ARIES-554.
---------------------------------------

    Resolution: Fixed

> 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
>            Assignee: Alasdair Nottingham
>         Attachments: Utils.java.patch
>
>
> 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.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (ARIES-554) aries JNDI bundle breaks remote JMX clients via RMI

Posted by "Felix Mayerhuber (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13128782#comment-13128782 ] 

Felix Mayerhuber commented on ARIES-554:
----------------------------------------

Hi,

thanks for the detailed explanation. Then my next question is, when is the next release planned? :-)
                
> 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
>            Assignee: Alasdair Nottingham
>         Attachments: Utils.java.patch
>
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (ARIES-554) aries JNDI bundle breaks remote JMX clients via RMI

Posted by "Alasdair Nottingham (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13129678#comment-13129678 ] 

Alasdair Nottingham commented on ARIES-554:
-------------------------------------------

Generally we do releases when someone says they would like one. The last one we were asked to do was for the JPA module which has been more challenging than we thought. Until the JPA release is live it doesn't make sense to do a JNDI release.

So if you would like a release I suggest you send an email to user@aries.apache.org and ask for one and we will see what we can do.
                
> 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
>            Assignee: Alasdair Nottingham
>         Attachments: Utils.java.patch
>
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (ARIES-554) aries JNDI bundle breaks remote JMX clients via RMI

Posted by "Stephan Siano (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ARIES-554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephan Siano updated ARIES-554:
--------------------------------

    Attachment: Utils.java.patch

Patch for context lookup issue

> 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
>         Attachments: Utils.java.patch
>
>
> 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.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (ARIES-554) aries JNDI bundle breaks remote JMX clients via RMI

Posted by "Stephan Siano (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12993088#comment-12993088 ] 

Stephan Siano commented on ARIES-554:
-------------------------------------

I have looked into the OSGi enterprise spec (section 126.7.3 Caller's Bundle Context). That described how the context is to be looked up:
1. use the environment variable I added to my previous comment as the first workaround.
2. use the thread context class loader which will never work without the second workaround (set the context class loader to the bundle class loader) because the thread context class loaders in exuinox and felix do not implement the BundleReference interface.
3. Walk the call stack until the invoker is found. The invoker can be the caller of the InitialContext class constructor or the NamingManager or DirectoryManager getObjectInstance methods.
• Get the class loader of the caller and see if it, or an ancestor, implements the BundleReference interface.
• If a Class Loader implementing the BundleReference interface is found call the getBundle method to get the clients Bundle; then call the getBundleContext method on the Bundle to get the clients Bundle Context.
• If the Bundle Context has been found stop, else continue with the next stack frame.

In the current implementation only the first two bullet points are implemented, the third one is missing. I attached a patch to the trunk that also includes support for the third bullet point and then the example will work.

> 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
>         Attachments: Utils.java.patch
>
>
> 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.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira