javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial

Oracle Community | user_00 | 5 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Unable to deploy a simple web application on GlassFish

    Oracle Community | 5 years ago | user_00
    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
  2. 0

    MC4J JMX Console / Mailing Lists

    sourceforge.net | 1 year ago
    javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247) at javax.naming.InitialContext.init(InitialContext.java:223) at javax.naming.InitialContext.<init>(InitialContext.java:197) at org.mc4j.console.connection.JBossConnectionNode.getInitialContext(JBossConnectionNode.java:102) at org.mc4j.console.connection.JBossConnectionNode.retrieveMEJB(JBossConnectionNode.java:139) at org.mc4j.console.connection.JBossConnectionNode.getMEJB(JBossConnectionNode.java:131) at org.mc4j.console.mejb.MBeanFilterNode.registerListener(MBeanFilterNode.java:190) at org.mc4j.console.mejb.MBeanFilterNode.<init>(MBeanFilterNode.java:101) at org.mc4j.console.mejb.MEJBChildren.loadChildren(MEJBChildren.java:160) at org.mc4j.console.mejb.MEJBChildren.access$000(MEJBChildren.java:36) at org.mc4j.console.mejb.MEJBChildren$1.run(MEJBChildren.java:73)
  3. 0

    Developing a SIP application with SEAM framework

    Google Groups | 7 years ago | Roberto
    javax.naming.NoInitialContextException: Cannot instantiate >>>>>>>>>>> class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: >>>>>>>>>>> org.jnp.interfaces.NamingContextFactory] at >>>>>>>>>>> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657) at >>>>>>>>>>> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) at >>>>>>>>>>> javax.naming.InitialContext.init(InitialContext.java:223) at >>>>>>>>>>> javax.naming.InitialContext.<init>(InitialContext.java:197) at >>>>>>>>>>> com.mycompany.TEST.servlet.TESTSipServlet.getSipActionBean(TESTSipServlet.java:238) at >>>>>>>>>>> com.mycompany.TEST.servlet.TESTSipServlet.doSuccessResponse(TESTSipServlet.java:180) at >>>>>>>>>>> javax.servlet.sip.SipServlet.doResponse(SipServlet.java:268) at >>>>>>>>>>> com.mycompany.TEST.servlet.TESTSipServlet.doResponse(TESTSipServlet.java:147) at >>>>>>>>>>> javax.servlet.sip.SipServlet.service(SipServlet.java:327) at >>>>>>>>>>> org.mobicents.servlet.sip.core.dispatchers.MessageDispatcher.callServlet(MessageDispatcher.java:281) at >>>>>>>>>>> org.mobicents.servlet.sip.core.dispatchers.ResponseDispatcher$1.dispatch(ResponseDispatcher.java:297) at >>>>>>>>>>> org.mobicents.servlet.sip.core.dispatchers.DispatchTask.dispatchAndHandleExceptions(DispatchTask.java:55) at >>>>>>>>>>> org.mobicents.servlet.sip.core.dispatchers.DispatchTask.run(DispatchTask.java:50) at >>>>>>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at >>>>>>>>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Re: Jetty configuration problem

    servicemix-users | 4 years ago | Vincenzo Laudizio
    javax.naming.NoInitialContextException: Cannot instantiate class: org.eclipse.jetty.jndi.InitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.eclipse.jetty.jndi.InitialContextFactory] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)[:1.6.0_37] at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)[:1.6.0_37] at javax.naming.InitialContext.init(InitialContext.java:223)[:1.6.0_37] at javax.naming.InitialContext.<init>(InitialContext.java:175)[:1.6.0_37] at org.eclipse.jetty.server.session.JDBCSessionIdManager.initializeDatabase(JDBCSessionIdManager.java:459)[107:org.eclipse.jetty.server:7.4.5.v20110725] at org.eclipse.jetty.server.session.JDBCSessionIdManager.doStart(JDBCSessionIdManager.java:407)[107:org.eclipse.jetty.server:7.4.5.v20110725] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58)[119:org.eclipse.jetty.util:7.4.5.v20110725] at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:41)[119:org.eclipse.jetty.util:7.4.5.v20110725] at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:50)[107:org.eclipse.jetty.server:7.4.5.v20110725] at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)[107:org.eclipse.jetty.server:7.4.5.v20110725] at org.eclipse.jetty.server.Server.doStart(Server.java:258)[107:org.eclipse.jetty.server:7.4.5.v20110725] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58)[119:org.eclipse.jetty.util:7.4.5.v20110725] at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.start(JettyServerImpl.java:98)[122:org.ops4j.pax.web.pax-web-jetty:1.0.7] at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Stopped.start(ServerControllerImpl.java:356)[122:org.ops4j.pax.web.pax-web-jetty:1.0.7] at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.start(ServerControllerImpl.java:67)[122:org.ops4j.pax.web.pax-web-jetty:1.0.7] at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Unconfigured.configure(ServerControllerImpl.java:510)[122:org.ops4j.pax.web.pax-web-jetty:1.0.7] at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.configure(ServerControllerImpl.java:84)[122:org.ops4j.pax.web.pax-web-jetty:1.0.7] at org.ops4j.pax.web.service.internal.Activator$2.updated(Activator.java:150)[124:org.ops4j.pax.web.pax-web-runtime:1.0.7] at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1160)[5:org.apache.felix.configadmin:1.2.8] at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:104)[5:org.apache.felix.configadmin:1.2.8]
  6. 0

    Re: Jetty configuration problem

    servicemix-users | 4 years ago | Vincenzo Laudizio
    javax.naming.NoInitialContextException: Cannot instantiate class: org.eclipse.jetty.jndi.InitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.eclipse.jetty.jndi.InitialContextFactory] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)[:1.6.0_37] at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)[:1.6.0_37] at javax.naming.InitialContext.init(InitialContext.java:223)[:1.6.0_37] at javax.naming.InitialContext.<init>(InitialContext.java:175)[:1.6.0_37] at org.eclipse.jetty.server.session.JDBCSessionIdManager.initializeDatabase(JDBCSessionIdManager.java:459)[107:org.eclipse.jetty.server:7.4.5.v20110725] at org.eclipse.jetty.server.session.JDBCSessionIdManager.doStart(JDBCSessionIdManager.java:407)[107:org.eclipse.jetty.server:7.4.5.v20110725] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58)[119:org.eclipse.jetty.util:7.4.5.v20110725] at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:41)[119:org.eclipse.jetty.util:7.4.5.v20110725] at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:50)[107:org.eclipse.jetty.server:7.4.5.v20110725] at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)[107:org.eclipse.jetty.server:7.4.5.v20110725] at org.eclipse.jetty.server.Server.doStart(Server.java:258)[107:org.eclipse.jetty.server:7.4.5.v20110725] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58)[119:org.eclipse.jetty.util:7.4.5.v20110725] at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.start(JettyServerImpl.java:98)[122:org.ops4j.pax.web.pax-web-jetty:1.0.7] at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Stopped.start(ServerControllerImpl.java:356)[122:org.ops4j.pax.web.pax-web-jetty:1.0.7] at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.start(ServerControllerImpl.java:67)[122:org.ops4j.pax.web.pax-web-jetty:1.0.7] at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Unconfigured.configure(ServerControllerImpl.java:510)[122:org.ops4j.pax.web.pax-web-jetty:1.0.7] at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.configure(ServerControllerImpl.java:84)[122:org.ops4j.pax.web.pax-web-jetty:1.0.7] at org.ops4j.pax.web.service.internal.Activator$2.updated(Activator.java:150)[124:org.ops4j.pax.web.pax-web-runtime:1.0.7] at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1160)[5:org.apache.felix.configadmin:1.2.8] at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:104)[5:org.apache.felix.configadmin:1.2.8]

    Root Cause Analysis

    1. javax.naming.NoInitialContextException

      Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial

      at javax.naming.spi.NamingManager.getInitialContext()
    2. Java RT
      InitialContext.rebind
      1. javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
      2. javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
      3. javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:385)
      4. javax.naming.InitialContext.rebind(InitialContext.java:412)
      4 frames
    3. Glassfish Naming
      GlassfishNamingManagerImpl.publishObject
      1. com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.publishObject(GlassfishNamingManagerImpl.java:204)
      2. com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.publishObject(GlassfishNamingManagerImpl.java:187)
      2 frames
    4. Embedded GlassFish Web
      MEJBService.postConstruct
      1. org.glassfish.kernel.javaee.MEJBService.postConstruct(MEJBService.java:77)
      1 frame
    5. Inversion of Control / Autodependency mechanism
      ConstructorWomb$1.run
      1. com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:174)
      2. com.sun.hk2.component.ConstructorWomb$1.run(ConstructorWomb.java:87)
      2 frames
    6. Java RT
      AccessController.doPrivileged
      1. java.security.AccessController.doPrivileged(Native Method)
      1 frame
    7. Inversion of Control / Autodependency mechanism
      AbstractInhabitantImpl.get
      1. com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:84)
      2. com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:77)
      3. com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)
      4. com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)
      5. com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)
      5 frames
    8. Kernel Classes
      AppServerStartup.start
      1. com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:212)
      2. com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:128)
      2 frames
    9. HK2 core module
      Main.launch
      1. com.sun.enterprise.module.bootstrap.Main.launch(Main.java:457)
      2. com.sun.enterprise.module.bootstrap.Main.launch(Main.java:401)
      2 frames
    10. HK2 OSGi Adapter
      HK2Main.start
      1. org.jvnet.hk2.osgiadapter.HK2Main.start(HK2Main.java:125)
      1 frame
    11. Apache Felix Framework
      BundleImpl.start
      1. org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:640)
      2. org.apache.felix.framework.Felix.activateBundle(Felix.java:1700)
      3. org.apache.felix.framework.Felix.startBundle(Felix.java:1622)
      4. org.apache.felix.framework.BundleImpl.start(BundleImpl.java:915)
      4 frames
    12. org.jvnet.hk2
      Main.start
      1. org.jvnet.hk2.osgimain.Main.start(Main.java:140)
      1 frame
    13. Apache Felix Framework
      StartLevelImpl.run
      1. org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:640)
      2. org.apache.felix.framework.Felix.activateBundle(Felix.java:1700)
      3. org.apache.felix.framework.Felix.startBundle(Felix.java:1622)
      4. org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)
      5. org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
      5 frames
    14. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:619)
      1 frame