Can't run in hosted mode with Spring 3.0.4

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Can't run in hosted mode with Spring 3.0.4

Postby nlif » Thu Oct 14, 2010 8:11 am

Hi all.

I am trying to use GWT Designer on Eclipse 3.6, with GWT 2.0.4. I recently added Spring 3.0.4 to the mix, and now, when I try to launch in hosted mode (using Jetty as server), Spring code throws a noSuchMethodException on a the servletContext class.

I suspect this is an issue of Spring compiled against a different version of the servlet-api than the one used by GWT Designer.

I have another Eclipse project, which is identical, but does not use GWT Designer (just the Google Eclipse plugin), and that application works (but I prefer using the Designer for it's great features...).

Is anyone using GWT designer with Spring (those versions)?
Has anyone encountered such a problem?
I'd appreciate any help.

Thanks,
Naaman
nlif
 
Posts: 3
Joined: Thu Oct 14, 2010 8:04 am

Re: Can't run in hosted mode with Spring 3.0.4

Postby Eric Clayberg » Fri Oct 15, 2010 7:09 pm

We are not aware of any issues like this.

We would need to see an actual test case project in order to analyze this further.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Can't run in hosted mode with Spring 3.0.4

Postby nlif » Sun Oct 17, 2010 5:59 am

Eric, thank you for the quick reply.

After posting my question I gave it another shot, and was finally able to work-around this (although I am not sure it's the "right" solution). In my project's .classpath file, I commented out one line -

Code: Select all
<classpath>
   <classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
   <!-- <classpathentry kind="con" path="com.instantiations.j2ee.J2EE14_CONTAINER"/> -->
   <classpathentry kind="src" path="src/main/java"/>
   <classpathentry kind="src" path="src/test/java"/>
   <classpathentry kind="src" path="src/main/resources"/>
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
   <classpathentry kind="con" path="com.instantiations.j2ee.webInfLibs"/>
   <classpathentry kind="output" path="war/WEB-INF/classes"/>
</classpath>


Does this shed some light on the original problem? Is my solution a legit one?

I also noticed another problem, which is not a show-stopper, but is definitely inconvenient: I am unable to attach source-code to libraries in WEB-INF\lib. The jars are marked "non modifiable". I assume this is not how it should be, is it? because I have always used open-source libraries and was able to attach source-code. It's very useful for debugging.

Thanks again.
Naaman
nlif
 
Posts: 3
Joined: Thu Oct 14, 2010 8:04 am

Re: Can't run in hosted mode with Spring 3.0.4

Postby Eric Clayberg » Sun Oct 17, 2010 1:22 pm

What kind of project is this supposed to be?

If it is a GWT project, the piece you commented out should not have been there to begin with.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Can't run in hosted mode with Spring 3.0.4

Postby nlif » Sun Oct 17, 2010 11:32 pm

I am trying to create a JEE web-app, which is based on GWT, but will also contain server-side stuff. To be perfectly honest, I can't say for sure what steps I took in creating this project (I must have gone thru several attempts, while trying to setup a working project), but I think I created a new "GWT Java Project", and then, finding this http://code.google.com/webtoolkit/tools/gwtdesigner/features/gwt/web_project_creation.html in the documentation - I added things manually :(

To make things even worse, I want to use Maven for build automation and dependency management, and Maven and the Eclipse plugin do not seem to play together nicely at all. I actually don't want to place the 3rd party jars in the WEB-INF/lib at all - I prefer to use Maven for that.

I am new to both GWT and to the GWT-Designer, so I'm the first to admit it's likely I have done something wrong. All in all this is a very humbling experience :)

Thanks again,
Naaman
nlif
 
Posts: 3
Joined: Thu Oct 14, 2010 8:04 am

Re: Can't run in hosted mode with Spring 3.0.4

Postby Eric Clayberg » Mon Oct 18, 2010 2:57 am

One of the key notes in the docs is the following...

Note that GWT projects and Web projects are distinct entities and should not be mixed. A Web project can reference GWT modules via its Web Project properties. A Web project should not contain any GWT elements directly.

Also, note that we are removing the GWT Web project feature entirely as it is redundant to standard Eclipse Web projects and/or to web projects created with the Google Plugin for Eclipse (GPE).
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 2 guests

cron