Bug 959565 - [WFLY-794] javax.naming.NameNotFoundException: rmi://127.0.0.1:1090/jmxrmi thrown when creating MBeanServerConnection
Summary: [WFLY-794] javax.naming.NameNotFoundException: rmi://127.0.0.1:1090/jmxrmi th...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: JMX
Version: 6.0.1,6.1.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: TBD EAP 6
Assignee: baranowb
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-03 19:53 UTC by csams
Modified: 2013-10-15 16:44 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-06-03 10:01:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker WFLY-794 0 Major Pull Request Sent javax.naming.NameNotFoundException: rmi://127.0.0.1:1090/jmxrmi thrown when creating MBeanServerConnection 2014-07-02 20:09:14 UTC

Description csams 2013-05-03 19:53:50 UTC
Description of problem:
When trying to create a MBeanServerConnection to a NON-JBoss application from within an deployed component, a "javax.naming.NameNotFoundException" is thrown.

Version-Release number of selected component (if applicable):
JBoss Enterprise Application Platform (EAP) 6.0.1

How reproducible:
Always

Steps to Reproduce:
1.  Start an external MBeanServer exposed by an RMIConnector
2.  Try to connect to it from a component deployed in EAP. 

Actual results:
javax.naming.NameNotFoundException is thrown.

Expected results:
The client should connect without error.

Additional info:

Comment 3 JBoss JIRA Server 2013-05-06 11:50:23 UTC
Bartosz Baranowski <bbaranow> made a comment on jira WFLY-794

[~jsanda] Did you add export statement? By default AS7 does not export RMI url stuff, hence it cant load context factory.
Ive seen this bug in IBM and OpenJDK, no idea about Mac. With export statement it works for me.

[~csams] Again ^^  did you add the export statement? With it it does not fail for me.

Comment 4 JBoss JIRA Server 2013-05-06 22:17:09 UTC
Chris Sams <csams> made a comment on jira WFLY-794

I can get the work-around to work by adding the path mentioned and then using either a custom factory as described, or by adding <path name="com/sun/jndi/rmi/registry"/> and explicitly setting the initial context factory to com.sun.jndi.rmi.registry.RegistryContextFactory instead of the custom factory.

Comment 5 JBoss JIRA Server 2013-05-08 08:32:10 UTC
Bartosz Baranowski <bbaranow> made a comment on jira WFLY-794

[~csams] Well... "workaround" is a bit wrong statment. It is a "make it work as it should". If Im not mistaken the RMI path is not exported by default because it is bugged as hell( even InitialContext.lookup(String) vs InitialContext.lookup(Name) does NOT produce same result)
If the RMI path is not exported, it wont work, since AS classloader cant load RMI URL context factory (even if there was some kind of hack in AS naming provider).

Exporting path should be enough to make it work. Test case does only that and it works.

Comment 7 JBoss JIRA Server 2013-06-03 09:20:59 UTC
Stuart Douglas <stuart.w.douglas> made a comment on jira WFLY-794

Note that it should be possible to work around this using jboss-deployment-structure.xml:

{code}
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
  <deployment>
    <dependencies>
      <system>
        <paths>
          <path name="com/sun/jndi/url/rmi"/>
        </paths>
      </system>
    </dependencies>  
  </deployment>
</jboss-deployment-structure>
{code}

Comment 8 JBoss JIRA Server 2013-06-03 09:27:40 UTC
Bartosz Baranowski <bbaranow> updated the status of jira WFLY-794 to Resolved

Comment 9 JBoss JIRA Server 2013-06-03 09:27:40 UTC
Bartosz Baranowski <bbaranow> made a comment on jira WFLY-794

'WontFix' as 'rmi' path is not exported on purpose. Workaround available:
1. create global export in 'sun' module
2. use deployment-structure
3. (TestCase is available)

Comment 10 JBoss JIRA Server 2013-10-01 10:28:42 UTC
Stuart Douglas <stuart.w.douglas> updated the status of jira WFLY-794 to Reopened

Comment 11 JBoss JIRA Server 2013-10-01 10:33:51 UTC
Stuart Douglas <stuart.w.douglas> made a comment on jira WFLY-794

Given that no-one can remember what the original issue is, and this keeps coming up over and over again, I think we should just add this to the sun.jdk module.

Comment 12 JBoss JIRA Server 2013-10-15 16:44:13 UTC
Brian Stansberry <brian.stansberry> made a comment on jira WFLY-794

Rejecting the PR as it seems it was closed unmerged.


Note You need to log in before you can comment on or make changes to this bug.