This discussion is archived
1 Reply Latest reply: Jul 9, 2008 5:43 PM by 3004 RSS

NameNotFoundException: Unable to resolve 'weblogic.management.mbeanservers.

666705 Newbie
Currently Being Moderated
Dear all,

I report this error during the creation of a MBeanServerConnection to the DomainRuntime.
The stack trace is
javax.naming.NameNotFoundException: Unable to resolve 'weblogic.management.mbeanservers.domainruntime'. Resolved 'weblogic.management.mbeanservers'; remainin
g name 'domainruntime'
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:252)
at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:171)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:269)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:362)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at weblogic.management.remote.common.ClientProviderBase.makeConnection(ClientProviderBase.java:126)
at weblogic.management.remote.common.ClientProviderBase.newJMXConnector(ClientProviderBase.java:79)
at javax.management.remote.JMXConnectorFactory.newJMXConnector(JMXConnectorFactory.java:326)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:247)

The code to acquire the connection is:

String protocol = "t3";
Integer portInteger = Integer.valueOf(portString);
int port = portInteger.intValue();
String jndiroot = "/jndi/";
String mserver = "weblogic.management.mbeanservers.domainruntime";

Hashtable h = new Hashtable();
h.put(Context.SECURITY_PRINCIPAL, username);
h.put(Context.SECURITY_CREDENTIALS, password);
h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES,
"weblogic.management.remote");
JMXServiceURL adminUrl = new JMXServiceURL(protocol, hostname, port,
jndiroot + mserver);
return JMXConnectorFactory.connect(adminUrl, h).getMBeanServerConnection();

The custom application which init the connection is configured as 'Startup Class' in WL console, then when i launch the admin server I catch the error.
What's wrong with it?

Thanks
  • 1. Re: NameNotFoundException: Unable to resolve 'weblogic.management.mbeanservers.
    3004 Newbie
    Currently Being Moderated
    Are you connecting to the admin server or a managed server? The domain
    runtime mbeanserver does not exist on managed servers?

    If the admin server, then check the server log to make sure there were
    no startup errors.

    Ettore Decio wrote:
    Dear all,

    I report this error during the creation of a MBeanServerConnection to the DomainRuntime.
    The stack trace is
    javax.naming.NameNotFoundException: Unable to resolve 'weblogic.management.mbeanservers.domainruntime'. Resolved 'weblogic.management.mbeanservers'; remainin
    g name 'domainruntime'
    at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
    at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:252)
    at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:171)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
    at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:269)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:362)
    at javax.naming.InitialContext.lookup(InitialContext.java:351)
    at weblogic.management.remote.common.ClientProviderBase.makeConnection(ClientProviderBase.java:126)
    at weblogic.management.remote.common.ClientProviderBase.newJMXConnector(ClientProviderBase.java:79)
    at javax.management.remote.JMXConnectorFactory.newJMXConnector(JMXConnectorFactory.java:326)
    at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:247)

    The code to acquire the connection is:

    String protocol = "t3";
    Integer portInteger = Integer.valueOf(portString);
    int port = portInteger.intValue();
    String jndiroot = "/jndi/";
    String mserver = "weblogic.management.mbeanservers.domainruntime";

    Hashtable h = new Hashtable();
    h.put(Context.SECURITY_PRINCIPAL, username);
    h.put(Context.SECURITY_CREDENTIALS, password);
    h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES,
    "weblogic.management.remote");
    JMXServiceURL adminUrl = new JMXServiceURL(protocol, hostname, port,
    jndiroot + mserver);
    return JMXConnectorFactory.connect(adminUrl, h).getMBeanServerConnection();

    The custom application which init the connection is configured as 'Startup Class' in WL console, then when i launch the admin server I catch the error..
    What's wrong with it?

    Thanks