problem with javax.servlet.ServletContext in gwt-user.jar

417 views
Skip to first unread message

gabriele.prandini

unread,
May 20, 2013, 4:27:17 AM5/20/13
to google-we...@googlegroups.com
I'm using GWT (2.5.0) with grails (www.grails.org)
I just upgraded from grails 1.3.7 to grails 2.2.2
Tryng to compile my project i got this error

Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()Ljavax/servlet/SessionCookieConfig;

you can find some information here:
http://www.javamonamour.org/2012/07/tomcat-error-on-startup.html

there seems to be a problem with the wrong version of javax.servlet.ServletContext in gwt-user.jar

I have, in my project some versione of the servletcontext, for example in grails library, that have the method public SessionCookieConfig getSessionCookieConfig()

but in the servletcontext in the gwt-user.jar the servletcontext doesn't have such method

what i can do?

Thomas Broyer

unread,
May 20, 2013, 8:47:19 PM5/20/13
to google-we...@googlegroups.com
How is it that gwt-user is deployed? It's only needed at compile-time and must not be deployed (gwt-servlet should, if you use GWT-RPC) 

Gabriele Prandini

unread,
May 21, 2013, 4:30:44 AM5/21/13
to google-we...@googlegroups.com
I'm not deployng the app...
the error comes in compile time.

Deleting the servletcontext.class in the jar resolved the problem


2013/5/21 Thomas Broyer <t.br...@gmail.com>

--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/JMp7pOX08VA/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jens

unread,
May 21, 2013, 4:38:38 AM5/21/13
to google-we...@googlegroups.com
During compilation you have a servlet 3.0 vs. servlet 2.5 (which is embedded in gwt-user.jar/gwt-servlet.jar) mismatch. Make sure you have servlet 3.0 api on classpath before gwt-user.jar.

-- J.

Thomas Broyer

unread,
May 21, 2013, 4:54:40 AM5/21/13
to google-we...@googlegroups.com


On Tuesday, May 21, 2013 10:30:44 AM UTC+2, gabriele.prandini wrote:
I'm not deployng the app...
the error comes in compile time.

Er, you're running Tomcat at compile-time? (or is the blog you linked to actually unrelated to your issue?)

Deleting the servletcontext.class in the jar resolved the problem


The correct fix is that you shouldn't compile your server-side classes with gwt-user. I don't know Grails build system and I don't know how the Grails GWT plugin works (heck I don't actually know Grails but by name), so I can't tell how to solve your problem in Grails, but you should only use gwt-user for client-side code, and use gwt-servlet for server-side code (and for deployment).
You should ask the Grails-GWT guys.

Gabriele Prandini

unread,
May 21, 2013, 5:12:31 AM5/21/13
to google-web-toolkit
Thanks Jens, i thik the problem is what you explain


2013/5/21 Thomas Broyer <t.br...@gmail.com>

--
Reply all
Reply to author
Forward
0 new messages