GWT Multi-Module Server Classpath Problem

166 views
Skip to first unread message

Geoffrey Wiseman

unread,
Aug 9, 2012, 12:15:33 PM8/9/12
to google-we...@googlegroups.com
I have a 2yo GWT project that's getting a little big for a single module, and we're bringing in a new project and we'd like to share some code.

Accordingly, I've split the project into a 'common' codebase and a project-specific codebase. That split isn't perfect yet, but I can't seem to get Eclipse to launch the project. If I launch the project through "mvn gwt:run", it launches successfully, but if I launch it through Eclipse (Run As > Web Application) the server part fails to start up when a filter can't find the SLF4J LoggerFactory.

If I do some introspection on the classpath from the servlet, it seems like all of the JARs in the project aren't on the classpath -- only the classes and dependent projects are there.

The launch configuration classpath seems ok, and the command-line startup seems to work. It doesn't seem to matter if I use m2e (with its Maven Dependencies container) or "mvn eclipse:eclipse", which adds the JARs to the project .classpath directly. I'm running low on ideas.

So:
  1. Anyone experience this or something like it and know what I should look for?
  2. How does the server get its classpath -- from the launch configuration classpath or something different?
  3. Is anyone using multiple eclipse projects with the Google Eclipse Plugin successfully? (from other threads, it sounded like there were people who had it working, but ...)
Any other thoughts or suggestions welcome.

Thomas Broyer

unread,
Aug 10, 2012, 10:34:19 AM8/10/12
to google-we...@googlegroups.com
Are the JARs "exported" by the common Eclipse project?

Rob

unread,
Aug 10, 2012, 7:58:24 PM8/10/12
to google-we...@googlegroups.com
Hi,

-> That split isn't perfect yet, but I can't seem to get Eclipse to launch the project. If I launch the project through "mvn gwt:run", it launches successfully, but if I launch it through Eclipse (Run As > Web Application) the server part fails to start up when a filter can't find the SLF4J LoggerFactory.

I have experienced this problem when trying to debug a multi-module GWT Maven application.

Take a look at this post:


Cheers
Rob

Kiahu.com

Geoffrey Wiseman

unread,
Aug 14, 2012, 4:05:07 PM8/14/12
to google-we...@googlegroups.com

On Friday, 10 August, 2012 at 10:34 AM, Thomas Broyer wrote:

Are the JARs "exported" by the common Eclipse project?
They aren't -- both M2E or eclipse:eclipse handles transitive dependencies by adding the JARs to the class path of the 'child' project, so you don't need the 'parent' to export, AFAICS.

Over the weekend, I discovered that the child project was showing up as a WST project; I haven't done much with WST so I don't know what its builders and natures do, and the Deployment Assembly seemed like it might be getting in the way. When I took those natures and builders out of my .project so that it more closely matched the single-project version I'd been using previously the SLF4J errors went away, but only because my problems got more severe. Now a launch configuration (even a completely new one) starts up without errors or warnings, but then 404s on all requests, including for the project's simple HTML page, e.g.:

[WARN] 404 - GET /Project.html?gwt.codesvr=127.0.0.1:9997 (127.0.0.1) 1395 bytes


I still don't feel like I have much of a sense of why this would be happening and in what way this project is different from other GWT projects that I can still launch from Eclipse, which is frustrating. The multi-project nature of this doesn't seem to explain all my problems (although perhaps it does).

The same project still launches successfully from a "mvn gwt:run", so it's not entirely a lost cause, but I'd prefer the Google Plugin for Eclipse to work with it too.

  - Geoffrey
-- 
Geoffrey Wiseman
http://www.geoffreywiseman.ca/


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Reply all
Reply to author
Forward
0 new messages