mavengwtgwt-super-dev-modegwt-maven-plugingwt-2.8

Why can't GWT connect to superdevmode server in multi module maven project?


I recently changed my GWT + App Engine project setup from a single module maven project, to a multi module maven project:

enter image description here

My project builds using mvn install (on the parent) with no errors, and as long as the whole project has been compiled, it runs fine.

However, I need to have <superDevMode>false</superDevMode> in the configuration of the Mojo gwt-maven-plugin to do this. Here is some of my pom.xml:

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>gwt-maven-plugin</artifactId>
            <version>${gwt-maven-plugin.version}</version>

            <configuration>
                <strict>true</strict>
                <testTimeOut>180</testTimeOut>
                <!-- With multiple tests use GwtTestSuite.java for speed -->
                <includes>**/*GwtTest.java</includes>
                <mode>htmlunit</mode>

                <logLevel>INFO</logLevel>
                <style>PRETTY</style>

                <copyWebapp>true</copyWebapp>
                <hostedWebapp>${webappDirectory}</hostedWebapp>

                <server>com.google.appengine.tools.development.gwt.AppEngineLauncher</server>
                <appEngineVersion>${gae.version}</appEngineVersion>
                <extraJvmArgs>-Ddatastore.default_high_rep_job_policy_unapplied_job_pct=10 -Xmx2g -Dappengine.sdk.root=${mvn.gae.home}
                </extraJvmArgs>

                <!--<port>8888</port>-->
                <superDevMode>false</superDevMode>
                <!--<incremental>true</incremental>-->
                <!--<bindAddress>0.0.0.0</bindAddress>-->

                <runTarget>Project.html</runTarget>
                <modules>
                    <module>com.utilitiessavings.usavappv7.Project</module>
                </modules>

            </configuration>

            <executions>
                <execution>
                    <goals>
                        <goal>compile</goal>
                        <goal>test</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

If I turn on SDM, I don't seem to get any errors when it starts up (using gwt:run):

[INFO] --- gwt-maven-plugin:2.8.0-rc1:run (default-cli) @ UsavAppV7 ---
[INFO] create exploded Jetty webapp in C:\Users\Drew\IntelliJ\UsavApp\app\target\UsavAppV7-1.0-SNAPSHOT
[INFO] extract appengine 1.9.40 sdk to C:\Users\Drew\IntelliJ\UsavApp\app\target\appengine-sdk
[INFO] Super Dev Mode starting up
[INFO]    workDir: C:\Users\Drew\AppData\Local\Temp\gwt-codeserver-4487617494656562585.tmp
[ERROR] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
[ERROR] SLF4J: Defaulting to no-operation (NOP) logger implementation
[ERROR] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO]    Loading Java files in com.utilitiessavings.usavappv7.Project.
[INFO]    Module setup completed in 16220 ms
[INFO] 
[INFO] The code server is ready at http://127.0.0.1:9876/
[ERROR] Aug 16, 2016 4:35:26 PM com.google.appengine.tools.development.SystemPropertiesManager setSystemProperties
[ERROR] INFO: Overwriting system property key 'java.util.logging.config.file', value 'C:\Users\Drew\.m2\repository\com\google\appengine\appengine-java-sdk\1.9.40\appengine-java-sdk\appengine-java-sdk-1.9.40\config\sdk\logging.properties' with value 'WEB-INF/logging.properties' from 'C:\Users\Drew\IntelliJ\UsavApp\app\target\UsavAppV7-1.0-SNAPSHOT\WEB-INF\appengine-web.xml'
[ERROR] Aug 16, 2016 4:35:26 PM com.google.apphosting.utils.jetty.JettyLogger info
[ERROR] INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
[ERROR] Aug 16, 2016 3:35:27 PM com.google.appengine.tools.development.IsolatedAppClassLoader checkWorkingDirectory
[ERROR] WARNING: Your working directory, (C:\Users\Drew\IntelliJ\UsavApp\app) is not equal to your 
[ERROR] web application root (C:\Users\Drew\IntelliJ\UsavApp\app\target\UsavAppV7-1.0-SNAPSHOT)
[ERROR] You will not be able to access files from your working directory on the production server.
[ERROR] 
[ERROR] Aug 16, 2016 3:35:27 PM com.google.apphosting.utils.jetty.JettyLogger info
[ERROR] INFO: jetty-6.1.x
[INFO] ChatServiceImpl constructed
[INFO] BlobServiceImpl constructed
[INFO] UploadPricesServlet constructed
[ERROR] Aug 16, 2016 3:35:30 PM com.google.apphosting.utils.jetty.JettyLogger info
[ERROR] INFO: Started SelectChannelConnector@0.0.0.0:8888
[ERROR] Aug 16, 2016 3:35:30 PM com.google.appengine.tools.development.AbstractModule startup
[ERROR] INFO: Module instance default is running at http://localhost:8888/
[ERROR] Aug 16, 2016 3:35:30 PM com.google.appengine.tools.development.AbstractModule startup
[ERROR] INFO: The admin console is running at http://localhost:8888/_ah/admin
[ERROR] Aug 16, 2016 4:35:30 PM com.google.appengine.tools.development.DevAppServerImpl doStart
[ERROR] INFO: Dev App Server is now running

But when I open localhost:8888 I get the "Couldn't load project from Super Dev Mode" error:

enter image description here

If I go to http://localhost:9876 I see this message:

HTTP ERROR: 500

Problem accessing /. Reason:

java.lang.NoSuchMethodError: javax.servlet.http.HttpServletResponse.getHeader(Ljava/lang/String;)Ljava/lang/String;


EDIT: pom.xml setup requested

I have created a gist with the 5 pom.xml files here: https://gist.github.com/slugmandrew/1d9acf86be2c7db89031dc60de9df6e2

EDIT 2: Have had some success getting SDM to run, but for some reason file changes aren't being detected, so it never recompiles.

Google Groups post: https://groups.google.com/forum/#!topic/google-web-toolkit/dF8KhbxnlBY


Solution

  • The getHeader method of HttpServletResponse is part of the Servlet 3.0 API. Check your classpath for an older version of the Servlet API, ie conflicting GWT version jars (2.6 vs 2.7), conflicting Jetty jars, or conflicting servlet-api jars.