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

Stack Overflow | Tim Kiese | 8 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Cargo Maven Tomcat NoInitialContextException When i already got Context

    Stack Overflow | 8 months ago | Tim Kiese
    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

    HFE examples

    Coderanch | 1 decade ago | Frank Malaga
    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.getNameInNamespace
      1. javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)[?:1.8.0_73]
      2. javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)[?:1.8.0_73]
      3. javax.naming.InitialContext.getNameInNamespace(InitialContext.java:563)[?:1.8.0_73]
      3 frames
    3. de.osg.gtm
      DBCPoolIT.getConnectionShouldReturnConnection
      1. de.osg.gtm.management.DBCPool.startup(DBCPool.java:34)[classes/:?]
      2. de.osg.gtm.management.DBCPoolIT.getConnectionShouldReturnConnection(DBCPoolIT.java:13)[test-classes/:?]
      2 frames
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[?:1.8.0_73]
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[?:1.8.0_73]
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[?:1.8.0_73]
      4. java.lang.reflect.Method.invoke(Method.java:497)[?:1.8.0_73]
      4 frames
    5. JUnit
      ParentRunner.run
      1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)[junit-4.8.2.jar:?]
      2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)[junit-4.8.2.jar:?]
      3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)[junit-4.8.2.jar:?]
      4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)[junit-4.8.2.jar:?]
      5. org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)[junit-4.8.2.jar:?]
      6. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)[junit-4.8.2.jar:?]
      7. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)[junit-4.8.2.jar:?]
      8. org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)[junit-4.8.2.jar:?]
      9. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)[junit-4.8.2.jar:?]
      10. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)[junit-4.8.2.jar:?]
      11. org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)[junit-4.8.2.jar:?]
      12. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)[junit-4.8.2.jar:?]
      13. org.junit.runners.ParentRunner.run(ParentRunner.java:236)[junit-4.8.2.jar:?]
      13 frames
    6. JUnit4 Provider
      JUnit4Provider.invoke
      1. org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)[surefire-junit4-2.19.1.jar:2.19.1]
      2. org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)[surefire-junit4-2.19.1.jar:2.19.1]
      3. org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)[surefire-junit4-2.19.1.jar:2.19.1]
      4. org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)[surefire-junit4-2.19.1.jar:2.19.1]
      4 frames
    7. SureFire
      ForkedBooter.main
      1. org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)[surefire-booter-2.19.1.jar:2.19.1]
      2. org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)[surefire-booter-2.19.1.jar:2.19.1]
      3. org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)[surefire-booter-2.19.1.jar:2.19.1]
      3 frames