"NoInitialContextException" error when uploading GWT application via Eclipse

1

I'm trying to upload an application made in GWT 2.4 in Eclipse Kepler (4.3), using the Google Plugin for Eclipse.

When using the Run As > Web Application option, I immediately get the following error in the log:

Starting Jetty on port 8888
   [WARN] Failed startup of context com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload@19c0705{/,E:\projetos\_workspace\paymentmonitor\target\paymentmonitor-1.0-SNAPSHOT}
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:645)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325)
    at javax.naming.InitialContext.lookup(InitialContext.java:392)
    at org.mortbay.jetty.plus.webapp.EnvConfiguration.createEnvContext(EnvConfiguration.java:57)
    at org.mortbay.jetty.plus.webapp.EnvConfiguration.configureDefaults(EnvConfiguration.java:101)
    at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1231)
    at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
    at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:468)
    at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:468)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    at org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    at org.mortbay.jetty.Server.doStart(Server.java:224)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:672)
    at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
    at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)
    at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
    at com.google.gwt.dev.DevMode.main(DevMode.java:311)
    
asked by anonymous 11.02.2014 / 19:58

1 answer

3

After searching for the error, I noticed that the same occurs in this environment because of the order of loading dependencies in the classpath of the execution.

The solution was to access the Run > Run Configurations... menu, select its execution configuration, go to the Classpath tab and move the GWT related entry to the top of the list.

Order of entries causing the error:

Orderofentriesthatsolvestheproblem:

Note: I found detailed information on a Google Code issue related to the problem.

    
11.02.2014 / 19:58