java.io.IOException: Cannot bind to URL: javax.naming.NameNotFoundException: rmi:

Oracle Community | icordoba | 6 years ago
  1. 0

    Glassfish v3 dies when restarting from web console

    Oracle Community | 6 years ago | icordoba
    java.io.IOException: Cannot bind to URL: javax.naming.NameNotFoundException: rmi:
  2. 0

    Deploy EJB in multiple wars to same app server (Glassfish)

    Stack Overflow | 3 years ago | sdoca
    javax.naming.NameNotFoundException: Cannot find name to unbind
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Original Java.net forum thread is http://www.java.net/forum/topic/glassfish/glassfish/namenotfoundexception-thrown-during-undeployment-war-containing-ejbs --- The following exception stacktrace was produced during undeployment of a Web Archive containing EJBs with an explicit global and portable JNDI name: [#|2011-09-26T17:39:47.229+0530|WARNING|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=20;_ThreadName=Thread-4;|WEB0610: [/WebEJBExample] failed to unbind namespace javax.naming.NameNotFoundException: Cannot find name to unbind at com.sun.enterprise.naming.impl.TransientContext.doUnbind(TransientContext.java:398) at com.sun.enterprise.naming.impl.TransientContext.unbind(TransientContext.java:420) at com.sun.enterprise.naming.impl.TransientContext.unbind(TransientContext.java:424) at com.sun.enterprise.naming.impl.TransientContext.unbind(TransientContext.java:424) at com.sun.enterprise.naming.impl.SerialContextProviderImpl.unbind(SerialContextProviderImpl.java:124) at com.sun.enterprise.naming.impl.SerialContext.unbind(SerialContext.java:740) at javax.naming.InitialContext.unbind(InitialContext.java:416) at javax.naming.InitialContext.unbind(InitialContext.java:416) at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.unpublishObject(GlassfishNamingManagerImpl.java:246) at com.sun.enterprise.container.common.impl.ComponentEnvManagerImpl.unbindFromComponentNamespace(ComponentEnvManagerImpl.java:355) at com.sun.enterprise.web.WebModuleContextConfig.unbindFromComponentNamespace(WebModuleContextConfig.java:454) at com.sun.enterprise.web.WebModuleContextConfig.stop(WebModuleContextConfig.java:447) at com.sun.enterprise.web.WebModuleContextConfig.lifecycleEvent(WebModuleContextConfig.java:174) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:149) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:5603) at com.sun.enterprise.web.WebModule.stop(WebModule.java:527) at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1049) at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2211) at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2166) at com.sun.enterprise.web.WebApplication.stop(WebApplication.java:159) at org.glassfish.internal.data.EngineRef.stop(EngineRef.java:169) at org.glassfish.internal.data.ModuleInfo.stop(ModuleInfo.java:302) at org.glassfish.internal.data.ApplicationInfo.stop(ApplicationInfo.java:322) at com.sun.enterprise.v3.server.ApplicationLifecycle.unload(ApplicationLifecycle.java:999) at com.sun.enterprise.v3.server.ApplicationLifecycle.undeploy(ApplicationLifecycle.java:1025) at org.glassfish.deployment.admin.UndeployCommand.execute(UndeployCommand.java:330) at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232) at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:459) at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168) at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:662) |#] The error appears to occur when Glassfish attempts to undeploy the web module after undeploying the EJB module. The EJB module appears to be the one that owns the portable JNDI name, and when the web module attempts to unbind the non-existent JNDI name, the afore-mentioned exception is thrown. This has grave consequences in a more complicated scenario (like the usage of Hibernate as a JPA provider within the application), as the web-module does not appear to be completely undeployed, resulting in vague exceptions being thrown on a subsequent deployment and use of the application. Surprisingly, the exception is not thrown when the EJB module is packaged in a EAR file, as an ejb-jar file. Also, no exceptions are thrown when no portable JNDI names are specified for the EJB using the @EJB annotation. A testcase (an Eclipse project) to reproduce this is attached.

    Java.net JIRA | 5 years ago | Vineet Reynolds
    javax.naming.NameNotFoundException: Cannot find name to unbind
  5. 0

    Glassfish 3.1 exception using ActiveMQ RA

    Oracle Community | 6 years ago | joseguerra
    javax.naming.NameNotFoundException: Cannot find name to unbind

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. javax.naming.NameNotFoundException

      rmi:

      at com.sun.enterprise.naming.impl.TransientContext.resolveContext()
    2. Glassfish Naming
      SerialContext.unbind
      1. com.sun.enterprise.naming.impl.TransientContext.resolveContext(TransientContext.java:252)
      2. com.sun.enterprise.naming.impl.TransientContext.unbind(TransientContext.java:355)
      3. com.sun.enterprise.naming.impl.SerialContextProviderImpl.unbind(SerialContextProviderImpl.java:105)
      4. com.sun.enterprise.naming.impl.SerialContext.unbind(SerialContext.java:650)
      4 frames
    3. Java RT
      RMIConnectorServer.stop
      1. javax.naming.InitialContext.unbind(InitialContext.java:416)
      2. javax.management.remote.rmi.RMIConnectorServer.stop(RMIConnectorServer.java:547)
      2 frames
    4. MBeanServer
      JMXStartupService$ShutdownListener.event
      1. org.glassfish.admin.mbeanserver.JMXStartupService$JMXConnectorsStarterThread.shutdown(JMXStartupService.java:198)
      2. org.glassfish.admin.mbeanserver.JMXStartupService.shutdown(JMXStartupService.java:145)
      3. org.glassfish.admin.mbeanserver.JMXStartupService.access$000(JMXStartupService.java:78)
      4. org.glassfish.admin.mbeanserver.JMXStartupService$ShutdownListener.event(JMXStartupService.java:112)
      4 frames
    5. Kernel Classes
      AppServerStartup.stop
      1. org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:125)
      2. com.sun.enterprise.v3.server.AppServerStartup.stop(AppServerStartup.java:402)
      2 frames
    6. HK2 OSGi Adapter
      HK2Main.stop
      1. org.jvnet.hk2.osgiadapter.HK2Main.stop(HK2Main.java:154)
      1 frame
    7. Apache Felix Framework
      BundleImpl.stop
      1. org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:662)
      2. org.apache.felix.framework.Felix.stopBundle(Felix.java:2071)
      3. org.apache.felix.framework.BundleImpl.stop(BundleImpl.java:951)
      4. org.apache.felix.framework.BundleImpl.stop(BundleImpl.java:938)
      4 frames
    8. HK2 OSGi Adapter
      OSGiModuleImpl.stop
      1. org.jvnet.hk2.osgiadapter.OSGiModuleImpl.detach(OSGiModuleImpl.java:249)
      2. org.jvnet.hk2.osgiadapter.OSGiModuleImpl.stop(OSGiModuleImpl.java:227)
      2 frames
    9. Kernel Classes
      RestartDomainCommand.execute
      1. com.sun.enterprise.v3.admin.RestartDomainCommand.execute(RestartDomainCommand.java:93)
      1 frame
    10. AMX
      RuntimeRootImpl.restartDomain
      1. org.glassfish.admin.amx.impl.ext.RuntimeRootImpl.restartDomain(RuntimeRootImpl.java:246)
      1 frame
    11. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    12. AMX
      AMXImplBase.invoke
      1. org.glassfish.admin.amx.impl.mbean.AMXImplBase.invoke(AMXImplBase.java:1038)
      1 frame
    13. Java RT
      MBeanServerInvocationHandler.invoke
      1. com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
      2. com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
      3. javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:288)
      3 frames
    14. AMX
      AMXProxyHandler.invoke
      1. org.glassfish.admin.amx.util.jmx.MBeanProxyHandler.invoke(MBeanProxyHandler.java:453)
      2. org.glassfish.admin.amx.core.proxy.AMXProxyHandler._invoke(AMXProxyHandler.java:822)
      3. org.glassfish.admin.amx.core.proxy.AMXProxyHandler.invoke(AMXProxyHandler.java:526)
      3 frames
    15. Unknown
      $Proxy299.restartDomain
      1. $Proxy299.restartDomain(Unknown Source)
      1 frame
    16. org.glassfish.admingui
      InstanceHandler.restartDomain
      1. org.glassfish.admingui.common.handlers.InstanceHandler.restartDomain(InstanceHandler.java:178)
      1 frame
    17. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    18. com.sun.jsftemplating
      CommandActionListener.processAction
      1. com.sun.jsftemplating.layout.descriptors.handler.Handler.invoke(Handler.java:442)
      2. com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:420)
      3. com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:394)
      4. com.sun.jsftemplating.layout.event.CommandActionListener.invokeCommandHandlers(CommandActionListener.java:150)
      5. com.sun.jsftemplating.layout.event.CommandActionListener.processAction(CommandActionListener.java:98)
      5 frames
    19. JavaEE 7
      UICommand.broadcast
      1. javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
      2. javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:772)
      3. javax.faces.component.UICommand.broadcast(UICommand.java:300)
      3 frames
    20. com.sun.webui
      WebuiCommand.broadcast
      1. com.sun.webui.jsf.component.WebuiCommand.broadcast(WebuiCommand.java:166)
      1 frame
    21. JavaEE 7
      UIViewRoot.processApplication
      1. javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:775)
      2. javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1267)
      2 frames
    22. JSF
      LifecycleImpl.execute
      1. com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
      2. com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      3. com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
      3 frames
    23. JavaEE 7
      FacesServlet.service
      1. javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
      1 frame
    24. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
      2. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
      3. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
      3 frames
    25. com.sun.webui
      UploadFilter.doFilter
      1. com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:233)
      1 frame
    26. Glassfish Core
      StandardPipeline.invoke
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
      5. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
      5 frames
    27. Glassfish
      PESessionLockingStandardPipeline.invoke
      1. com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
      2. com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
      2 frames
    28. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
      2. org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
      3. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
      3 frames
    29. Kernel Classes
      ContainerMapper.service
      1. com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:239)
      1 frame
    30. Grizzly WS
      AbstractThreadPool$Worker.run
      1. com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
      2. com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
      3. com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
      4. com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
      5. com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
      6. com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
      7. com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
      8. com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
      9. com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
      10. com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
      11. com.sun.grizzly.ContextTask.run(ContextTask.java:69)
      12. com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
      13. com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
      13 frames
    31. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:619)
      1 frame