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

We couldn't find tips for this exception.

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

Solutions on the web702

  • via strutstestcase by nobody
    ,
  • via oreports by alinv
    ,
  • via springframework by khem
    ,
  • 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:640) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243) at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280) at javax.naming.InitialContext.lookup(InitialContext.java:347) at net.sf.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:45) at net.sf.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:83) at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:161) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:618) at isp.apps.pgr.gms.persistence.hibernateFactory.<init>(hibernateFactory.java:30) at isp.apps.pgr.gms.persistence.hibernateFactory.getInstance(hibernateFactory.java:52) at isp.apps.pgr.gms.users.AccountManager.<clinit>(AccountManager.java:21) at isp.apps.pgr.gms.actions.searchPersonAction.execute(searchPersonAction.java:51) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at servletunit.struts.MockStrutsTestCase.actionPerform(MockStrutsTestCase.java:332) at isp.apps.pgr.gms.actionsTest.TestNavigation.testNavigateHome(TestNavigation.java:35) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at junit.textui.TestRunner.doRun(TestRunner.java:116) at junit.textui.TestRunner.doRun(TestRunner.java:109) at junit.textui.TestRunner.run(TestRunner.java:72) at isp.utils.ant.tasks.CustomJunitTask.execute(CustomJunitTask.java:90) at org.apache.tools.ant.Task.perform(Task.java:319) at org.apache.tools.ant.Target.execute(Target.java:309) at org.apache.tools.ant.Target.performTasks(Target.java:336) at org.apache.tools.ant.Project.executeTarget(Project.java:1306) at org.apache.tools.ant.Project.executeTargets(Project.java:1250) at org.apache.tools.ant.Main.runBuild(Main.java:610) at org.apache.tools.ant.Main.start(Main.java:196) at org.apache.tools.ant.Main.main(Main.java:235)

    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

    marcbouvierdavmarcbouvierdav
    12 times, last one
    ivanszkypeterivanszkypeter
    2 times, last one
    Andreas HäberAndreas Häber
    2 times, last one
    andyglickandyglick
    Once,
    Unknown visitor
    Unknown visitor2 times, last one
    52 more bugmates