admin@glassfish.java.net

Re: anyone understand "InvalidNameException: Cannot create empty subcontext"?

From: Lloyd Chambers <Lloyd.Chambers_at_Sun.COM>
Date: Fri, 25 Jul 2008 14:14:42 -0700

The code is committed (common/mbeanserver), along with a unit tests
that always succeeds.

I instrumented the code. From what I can tell, bind() turns "/
192.168.1.8:8686/management/rmi-jmx-connector" into a CompositeName
whose 0th part is the empty string which causes the exception to be
thrown.

INFO: ### TransientContext.bind: rmi://192.168.1.8:8686/management/rmi-
jmx-connector
Jul 25, 2008 2:12:31 PM
INFO: ### TransientContext.bind: CompositeName: rmi://192.168.1.8:8686/
management/rmi-jmx-connector
Jul 25, 2008 2:12:31 PM
INFO: ### TransientContext.createSubcontext: rmi:
Jul 25, 2008 2:12:31 PM
INFO: ### TransientContext.drillDownAndCreateSubcontext: rmi:
Jul 25, 2008 2:12:31 PM
INFO: ### TransientContext.drillDownAndCreateSubcontext: CompositeName
= rmi:
Jul 25, 2008 2:12:31 PM
INFO: ### TransientContext.bind: /192.168.1.8:8686/management/rmi-jmx-
connector
Jul 25, 2008 2:12:31 PM
INFO: ### TransientContext.bind: CompositeName: /192.168.1.8:8686/
management/rmi-jmx-connector
Jul 25, 2008 2:12:31 PM
INFO: ### TransientContext.createSubcontext:
Jul 25, 2008 2:12:31 PM
INFO: ### TransientContext.drillDownAndCreateSubcontext:
Jul 25, 2008 2:12:31 PM
INFO: ### TransientContext.drillDownAndCreateSubcontext: CompositeName =
Jul 25, 2008 2:12:31 PM
SEVERE: java.io.IOException: Cannot bind to URL [rmi://
192.168.1.8:8686/management/rmi-jmx-connector]:
javax.naming.InvalidNameException: Cannot create empty subcontext


Lloyd


On Jul 25, 2008, at 1:12 PM, Kedar Mhaswade wrote:

> Mahesh,
>
> Can you help?
>
> Thanks,
> Kedar
>
> Lloyd Chambers wrote:
>> Followup—
>> The problem is apparently caused by the GlassFish V3 runtime
>> environment; The code works just fine in a standalone program.
>> I've even tested connecting to it with JConsole.
>> It appears that either
>> com
>> .sun
>> .enterprise
>> .naming.impl.TransientContext.drillDownAndCreateSubcontext() is
>> broken or there is some other environmental cause.
>> Lloyd
>> On Jul 24, 2008, at 5:59 PM, Lloyd Chambers wrote:
>>> Does ANYONE know what might be causing this?
>>>
>>>
>>> On Jul 24, 2008, at 5:48 PM, Lloyd Chambers wrote:
>>>
>>>> Kedar,
>>>>
>>>> I'm trying to bring up the RMI JMX connector server.
>>>>
>>>> Does anyone understand the "InvalidNameException: Cannot create
>>>> empty subcontext" thing?
>>>>
>>>> Lloyd
>>>>
>>>> INFO: ### JmxConnector: system, Protocol = rmi_jrmp, Address =
>>>> 0.0.0.0, Port = 8686, AcceptAll = false, AuthRealmName = admin-
>>>> realm, SecurityEnabled = false
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: java.io.IOException: Cannot bind to URL [rmi://
>>>> 192.168.1.8:8686/management/rmi-jmx-connector]:
>>>> javax.naming.InvalidNameException: Cannot create empty subcontext
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at
>>>> javax
>>>> .management
>>>> .remote
>>>> .rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:814)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at
>>>> javax
>>>> .management
>>>> .remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:431)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at
>>>> org
>>>> .glassfish
>>>> .admin
>>>> .jmxremote
>>>> .rmi
>>>> .JmxConnectorServerDriver
>>>> .startConnectorServer(JmxConnectorServerDriver.java:191)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at
>>>> org
>>>> .glassfish
>>>> .admin
>>>> .mbeanserver
>>>> .ConnectorStartupService
>>>> .startConnector(ConnectorStartupService.java:122)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at
>>>> org
>>>> .glassfish
>>>> .admin
>>>> .mbeanserver
>>>> .ConnectorStartupService
>>>> .postConstruct(ConnectorStartupService.java:144)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at
>>>> com
>>>> .sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:
>>>> 150)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at
>>>> com
>>>> .sun
>>>> .hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:86)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at
>>>> com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:
>>>> 75)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at
>>>> com
>>>> .sun
>>>> .hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at
>>>> com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at
>>>> com
>>>> .sun
>>>> .hk2
>>>> .component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:
>>>> 60)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at com.sun.enterprise.v3.server.AppServerStartup
>>>> $1.run(AppServerStartup.java:118)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at java.util.concurrent.Executors
>>>> $RunnableAdapter.call(Executors.java:417)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at java.util.concurrent.FutureTask
>>>> $Sync.innerRun(FutureTask.java:269)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at
>>>> java.util.concurrent.FutureTask.run(FutureTask.java:123)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at java.util.concurrent.ThreadPoolExecutor
>>>> $Worker.runTask(ThreadPoolExecutor.java:650)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at java.util.concurrent.ThreadPoolExecutor
>>>> $Worker.run(ThreadPoolExecutor.java:675)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at java.lang.Thread.run(Thread.java:613)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: Caused by: javax.naming.InvalidNameException: Cannot
>>>> create empty subcontext
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at
>>>> com
>>>> .sun
>>>> .enterprise
>>>> .naming
>>>> .impl
>>>> .TransientContext
>>>> .drillDownAndCreateSubcontext(TransientContext.java:103)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at
>>>> com
>>>> .sun
>>>> .enterprise
>>>> .naming
>>>> .impl.TransientContext.createSubcontext(TransientContext.java:59)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at
>>>> com
>>>> .sun
>>>> .enterprise
>>>> .naming.impl.TransientContext.bind(TransientContext.java:224)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at
>>>> com
>>>> .sun
>>>> .enterprise
>>>> .naming.impl.TransientContext.bind(TransientContext.java:226)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at
>>>> com
>>>> .sun
>>>> .enterprise
>>>> .naming
>>>> .impl
>>>> .SerialContextProviderImpl.bind(SerialContextProviderImpl.java:98)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at
>>>> com
>>>> .sun
>>>> .enterprise
>>>> .naming
>>>> .impl
>>>> .LocalSerialContextProviderImpl
>>>> .bind(LocalSerialContextProviderImpl.java:76)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at
>>>> com
>>>> .sun.enterprise.naming.impl.SerialContext.bind(SerialContext.java:
>>>> 297)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at
>>>> javax.naming.InitialContext.bind(InitialContext.java:359)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at
>>>> javax
>>>> .management
>>>> .remote.rmi.RMIConnectorServer.bind(RMIConnectorServer.java:635)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: at
>>>> javax
>>>> .management
>>>> .remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:427)
>>>> Jul 24, 2008 5:45:52 PM
>>>> SEVERE: ... 16 more
>>>> Jul 24, 2008 5:45:52 PM
>>>> INFO: JMXMP connector server URL = service:jmx:jmxmp://localhost:
>>>> 8888
>>>> Jul 24, 2008 5:45:52 PM
>>>> com.sun.enterprise.v3.server.AppServerStartup run
>>>> INFO: Glassfish v3 started in 1843 ms
>>>>
>>>>
>>>>
>>>> ..............................................
>>>> Lloyd Chambers
>>>> lloyd.chambers_at_sun.com
>>>> GlassFish team, admin
>>>>
>>>>
>>>>
>>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>