problem description
referencing Example: Using a Java Program to Display the Status of Oracle Business Intelligence
an exception occurred when you followed the steps to run the command.
the environmental background of the problems and what methods you have tried
has checked that there is no problem with the Url construct, and the server is normally accessible.
referred to NoInitialContextException error , but still don"t know how to solve it.
related codes
[oracle@biapptst jmx]$ java -classpath .:./wlclient.jar MBeanAPIExample1 localhost 9500 weblogic password
Connecting using URL: service:jmx:iiop://localhost:9500/jndi/weblogic.management.mbeanservers.domainruntime ...
Exception in thread "main" java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:369)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:270)
at MBeanAPIExample1.connect(MBeanAPIExample1.java:50)
at MBeanAPIExample1.main(MBeanAPIExample1.java:85)
Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:350)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1955)
at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1922)
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:287)
... 3 more
what result do you expect? What is the error message actually seen?
look forward to running through.