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:
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.
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.
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.
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}
Bartosz Baranowski <bbaranow> updated the status of jira WFLY-794 to Resolved
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)
Stuart Douglas <stuart.w.douglas> updated the status of jira WFLY-794 to Reopened
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.
Brian Stansberry <brian.stansberry> made a comment on jira WFLY-794 Rejecting the PR as it seems it was closed unmerged.