"Noinitialcontextexception" error while boosting GWT application via Eclipse

Asked

Viewed 109 times

1

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

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

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)

1 answer

3


After researching about the error, I realized that the same occurs in this environment due to the order of loading the dependencies in classpath of the execution.

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

Order of entries causing error:

inserir a descrição da imagem aqui

Order of entries that solves the problem:

inserir a descrição da imagem aqui

Note: I found detailed information in a Download in Google Code problem-related.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.