Problems connecting to Super Dev Mode server with 2.8 / multi-module project

858 views
Skip to first unread message

Drew Spencer

unread,
Aug 18, 2016, 8:54:12 AM8/18/16
to GWT Users
Hey all, I have recently changed the structure of my project to separate client, server and shared code into their own maven projects (modules).

I am getting a HTTP Error 500 related to the Servlet API: java.lang.NoSuchMethodError: javax.servlet.http.HttpServletResponse.getHeader(Ljava/lang/String;)Ljava/lang/String;

If anyone can help me it would be massively appreciated, as I can't really do much without Super Dev Mode


Thanks to all for your great work on GWT 2.8. It really is appreciated :)

Frank Taffelt

unread,
Aug 18, 2016, 9:44:39 AM8/18/16
to GWT Users
if your are restructuring your project setup. maybe you should consider switching to:


you will get a clean separation of your code and a working development environment.

JonL

unread,
Aug 18, 2016, 12:08:28 PM8/18/16
to GWT Users
Besides possibly switching to the gwt-maven-archetypes as Frank suggested, I just added a comment to my answer.  The problem is that you don't need servlet-api jars on your classpath at all. GWT provides the appropriate classes for compile time in gwt-user and gwt-dev.

Drew Spencer

unread,
Aug 18, 2016, 1:20:28 PM8/18/16
to google-we...@googlegroups.com
Thanks for the help. I'm not sure why, but I still have servlet-api:2.5 in my dependencies, as well as javax.servlet-api:3.1.0. I read somewhere that javax.servlet-api replaced servlet-api... I removed it manually but it's being brough in from somewhere and I can't work out where. For the first time in a year I wish I was back in eclipse instead of IntelliJ IDEA :( Any chance you can look at my pom.xml files and help me work it out? https://gist.github.com/slugmandrew/1d9acf86be2c7db89031dc60de9df6e2

--
You received this message because you are subscribed to a topic in the Google Groups "GWT Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/dF8KhbxnlBY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsub...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.



--
Drew Spencer

JonL

unread,
Aug 18, 2016, 1:31:23 PM8/18/16
to GWT Users
I don't use maven, so not 100% familiar with it.  It appears that there is a dependency report that should tell you where it is coming from:


Then you should just exclude it:

To post to this group, send email to google-we...@googlegroups.com.



--
Drew Spencer

Drew Spencer

unread,
Aug 18, 2016, 2:01:11 PM8/18/16
to GWT Users
I was just posting that I think I found the culprit... appengine-gcs-client seems to have a dependency on servlet-api:2.5:


I have just added the exclusion in my server pom.xml like so:

<!--Google Cloud Storage-->
<dependency>
   
<groupId>com.google.appengine.tools</groupId>
   
<artifactId>appengine-gcs-client</artifactId>
   
<version>0.6</version>
   
<scope>provided</scope>
   
<exclusions>
       
<exclusion>
           
<groupId>javax.servlet</groupId>
           
<artifactId>servlet-api</artifactId>
       
</exclusion>
   
</exclusions>
</dependency>

Seems to have removed the dependency from the list and the codeserver now starts up, but appengine crashed because of the cloud storage servlet :'(

Getting closer though! Thanks a lot, you really helped me understand the problem better :)

Drew

Drew Spencer

unread,
Aug 18, 2016, 2:15:09 PM8/18/16
to GWT Users
Hmm, it seems app engine is fine - tried it again after clearing cache and it runs fine. SDM seems to work, but it's not recompiling when I make a change to a page and refresh. Very odd. trying with incremental=true now...

Drew Spencer

unread,
Aug 18, 2016, 2:24:16 PM8/18/16
to GWT Users
And that doesn't work :(

Jens

unread,
Aug 18, 2016, 3:41:15 PM8/18/16
to GWT Users
SDM generates a special module.nocache.js file which contains the "recompile on reload" feature. You have to make sure that you have deployed that generated file. If you start the DevMode class the file is placed into the directory your DevMode -war parameter is pointing to. If you start CodeServer you have to use the -launcherDir parameter (DevMode delegates -war to -launcherDir). Make sure its pointing to the directory you deploy.

-- J.

Drew Spencer

unread,
Aug 19, 2016, 10:16:40 AM8/19/16
to GWT Users
The SDM recompile happens first time, it's just that when I reload the page I see the "skipped compile because no input files have changed" message.

I think I have a similar problem to this: http://stackoverflow.com/questions/27433642/gwt-superdevmode-fails-to-see-changes but if I remove src/main/java from the resources I get errors that my BootstrapperImpl.java can't be found: 

[ERROR] The type 'com.utilitiessavings.usavappv7.client.gin.BootstrapperImpl' was not found, either the class name is wrong or there are compile errors in your code.

That's essentially my EntryPoint, so looks like no sources are found at all.

harshyadav

unread,
Sep 21, 2016, 5:24:28 PM9/21/16
to GWT Users
Hi Drew,

Did you find any solution for this?
I am facing a similar issue.

Thanks!

Cyril Souti

unread,
Oct 23, 2016, 12:07:20 PM10/23/16
to GWT Users
Up, I have this issue too :(

Craig Mitchell

unread,
Oct 14, 2017, 4:08:09 AM10/14/17
to GWT Users
I ran into this problem.  For me, I was just using Eclipse with Google App Engine (GAE) and GWT 2.8.1.

GAE was bringing in an old HttpServletResponse, which didn't have the required methods.

The solution was to go to my project properties -> Java Build Path -> Order and Export.  Then move the GWT SDK above the App Engine SDK.

Renat Kabirov

unread,
Feb 6, 2018, 9:47:25 AM2/6/18
to GWT Users
Hi, have you found any solution? 

Renat Kabirov

unread,
Feb 6, 2018, 9:47:38 AM2/6/18
to GWT Users
Hi, have you found any solution? 

Renat Kabirov

unread,
Feb 6, 2018, 9:47:48 AM2/6/18
to GWT Users
Hi, have you found any solution? 

Reply all
Reply to author
Forward
0 new messages