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

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web1234

  • via Oracle Community by hoffman462, 11 months ago
    Need to specify class name in environment or system property or applet parameter, or in an application resource file: java.naming.factory.initial
  • via Coderanch by bala kumar, 7 months ago
    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
  • via Coderanch by Pramod Kumar, 7 months ago
    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 trace

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

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    12 times, 4 weeks ago
    2 times, 2 months ago
    2 times, 3 months ago
    Once, 6 months ago
    176 times, 9 months ago
    51 more bugmates