I was attempting to connect to the OC4J MBeanServer in my opmn managed OC4J instance and was using the online documentation below.
I found that in the example the service URL was specified incorrectly.
// Create a variable for a URL containing data needed to access
// the connection target; in this case, an OPMN-managed OC4J instance
It is missing the : in the service URL. The correct way is shown below you will see the : added after rmi. A documentation bug has been filed.
private String url="service:jmx:rmi:///opmn://papicell-au2.au.oracle.com:6003/home";