2 Replies Latest reply on Nov 14, 2002 10:49 PM by David Newman

    Problem accessing Naming Service from MBean

    David Newman Newbie

      I am trying to access JNDI from an MBean that is in its postregistration phase (which was also loaded during the JBOSS server startup). I have tried to build a dependency so that my MBean (Export Manager from JMX book) is started before the Naming service. Unfortunately this does not seem to work.

      Any ideas on how I can get this to work during the startup phase?


      jboss:service=Naming


      ctx.rebind(exportName, handle);

      Gets following error:

      javax.naming.CommunicationException: Host unreachable: Datagram send failed. Root exception is java.net.NoRouteToHostException: Host unreachable: Datagram send failed
      at java.net.PlainDatagramSocketImpl.send(Native Method)
      at java.net.DatagramSocket.send(DatagramSocket.java:316)
      at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:927)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1029)
      at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:352)
      at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:345)
      at javax.naming.InitialContext.rebind(InitialContext.java:361)
      at com.wellsfargo.ice.management.ExportManager.export(ExportManager.java:86)
      at com.wellsfargo.ice.management.ExportManager.postRegister(ExportManager.java:145)
      at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:291)
      at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:975)
      at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:922)
      at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:294)
      at org.jboss.system.ServiceCreator.install(ServiceCreator.java:86)
      at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:167)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:130)
      at org.jboss.system.ServiceController.install(ServiceController.java:225)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy3.install(Unknown Source)
      at org.jboss.deployment.SARDeployer.create(SARDeployer.java:209)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:755)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:615)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:580)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:564)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:324)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:221)
      at org.jboss.Main.boot(Main.java:148)
      at org.jboss.Main$1.run(Main.java:381)
      at java.lang.Thread.run(Thread.java:479)