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:38:48 -0700

Javadoc for CompositeName states: "Adjacent component separators
denote an empty component"
http://java.sun.com/javase/6/docs/api/javax/naming/CompositeName.html

(eg the "//" portion of "rmi://192.168.1.8:8686/management/rmi-jmx-
connector" )

So it appears to me that TransientContext does not correctly handle
the case of "empty components", whereas the default context
implementation does.

Lloyd


On Jul 25, 2008, at 2:31 PM, Lloyd Chambers wrote:

> It appears to me that the problem is that the "//" portion of the
> JMXServiceURL generates an empty string for part of the name. This
> does NOT cause an issue with a plain JVM, but TransientContext
> doesn't handle it.
>
>
> INFO: Glassfish v3 started in 1839 ms
> Jul 25, 2008 2:29:41 PM
> INFO: ### TransientContext.bind: rmi://192.168.1.8:8686/management/
> rmi-jmx-connector
> Jul 25, 2008 2:29:41 PM
> INFO: ### TransientContext.bind: CompositeName: CompositeName:
> "rmi://192.168.1.8:8686/management/rmi-jmx-connector" ===> {"rmi:",
> "", "192.168.1.8:8686", "management", "rmi-jmx-connector", }
> Jul 25, 2008 2:29:41 PM
> INFO: ### TransientContext.bind: suffix: "/192.168.1.8:8686/
> management/rmi-jmx-connector"
> Jul 25, 2008 2:29:41 PM
> INFO: ### TransientContext.bind: resolving context: "rmi:"
> Jul 25, 2008 2:29:41 PM
> INFO: ### TransientContext.bind: calling createSubcontext: "rmi:"
> Jul 25, 2008 2:29:41 PM
> INFO: ### TransientContext.createSubcontext: rmi:
> Jul 25, 2008 2:29:41 PM
> INFO: ### TransientContext.drillDownAndCreateSubcontext: rmi:
> Jul 25, 2008 2:29:41 PM
> INFO: ### TransientContext.drillDownAndCreateSubcontext:
> CompositeName = rmi:
> Jul 25, 2008 2:29:41 PM
> INFO: ### TransientContext.bind: /192.168.1.8:8686/management/rmi-
> jmx-connector
> Jul 25, 2008 2:29:41 PM
> INFO: ### TransientContext.bind: CompositeName: CompositeName: "/
> 192.168.1.8:8686/management/rmi-jmx-connector" ===> {"",
> "192.168.1.8:8686", "management", "rmi-jmx-connector", }
> Jul 25, 2008 2:29:41 PM
> INFO: ### TransientContext.bind: suffix: "192.168.1.8:8686/
> management/rmi-jmx-connector"
> Jul 25, 2008 2:29:41 PM
> INFO: ### TransientContext.bind: resolving context: ""
> Jul 25, 2008 2:29:41 PM
> INFO: ### TransientContext.bind: calling createSubcontext: ""
> Jul 25, 2008 2:29:41 PM
> INFO: ### TransientContext.createSubcontext:
> Jul 25, 2008 2:29:41 PM
> INFO: ### TransientContext.drillDownAndCreateSubcontext:
> Jul 25, 2008 2:29:41 PM
> INFO: ### TransientContext.drillDownAndCreateSubcontext:
> CompositeName =
>
>
>
>
> On Jul 25, 2008, at 2:22 PM, Mahesh Kannan wrote:
>
>> I'll take a look at it
>> --Mahesh
>>
>> 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
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>