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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via strutstestcase by nobody
, 1 year ago
Need to specify class name in environment or system property, or as an applet parameter, or in an application resource filejava.naming.factory.initial
via Stack Overflow by vicky
, 2 years 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 programask.com by Unknown author, 2 years 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 Oracle Community by 843830, 1 year 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 Stack Overflow by portoalet
, 2 years 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 Manish Shinde, 1 year 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
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.(SessionFactoryImpl.java:161)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:618)
at isp.apps.pgr.gms.persistence.hibernateFactory.(hibernateFactory.java:30)
at isp.apps.pgr.gms.persistence.hibernateFactory.getInstance(hibernateFactory.java:52)
at isp.apps.pgr.gms.users.AccountManager.(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 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)

Users with the same issue

26 times, 3 months ago
12 times, 6 months ago
2 times, 8 months ago
Once, 1 year ago
176 times, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.