dev@glassfish.java.net

I am trying to use amx and gf 3 but it return exception

From: sarah.kho <sarah.kho_at_gmail.com>
Date: Mon, 15 Dec 2008 13:20:56 -0800 (PST)

Hi
Thank you for reading my post.
I am trying to connect to gf v3 using following code which end up in an
exception which i include.
can someone please let me know what is wrong?

sample code:

AppserverConnectionSource con =Connect.connectNoTLS("127.0.0.1", 8686,
"admin", "adminadmin");
DomainRoot domainroot = con.getDomainRoot();


exception is raised the second line.


java.lang.RuntimeException: java.io.IOException: Failed to retrieve
RMIServer stub: javax.naming.NameNotFoundException:
management/rmi-jmx-connector
        at
com.sun.appserv.management.client.ProxyFactory.getInstance(ProxyFactory.java:459)
        at
com.sun.appserv.management.client.ProxyFactory.getInstance(ProxyFactory.java:409)
        at
com.sun.appserv.management.client.AppserverConnectionSource.getDomainRoot(AppserverConnectionSource.java:516)
        at myproject.Glassfish.main(Glassfish.java:23)
Caused by: java.io.IOException: Failed to retrieve RMIServer stub:
javax.naming.NameNotFoundException: management/rmi-jmx-connector
        at
javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:323)
        at
javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
        at
com.sun.appserv.management.client.AppserverConnectionSource.createNew(AppserverConnectionSource.java:409)
        at
com.sun.appserv.management.client.AppserverConnectionSource.getJMXConnector(AppserverConnectionSource.java:472)
        at
com.sun.appserv.management.client.AppserverConnectionSource.getMBeanServerConnection(AppserverConnectionSource.java:501)
        at
com.sun.appserv.management.client.ProxyFactory.getInstance(ProxyFactory.java:435)
        ... 3 more
Caused by: javax.naming.NameNotFoundException: management/rmi-jmx-connector
        at
com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:99)
        at
com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:185)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at
javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1871)
        at
javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1841)
        at
javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:257)
        ... 8 more

-- 
View this message in context: http://www.nabble.com/I-am-trying-to-use-amx-and-gf-3-but-it-return-exception-tp21022318p21022318.html
Sent from the java.net - glassfish dev mailing list archive at Nabble.com.