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
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  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

    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