Server class 'XXX' could not be found in the web app, but was found on the system classpath

1,571 views
Skip to first unread message

joerg.h...@googlemail.com

unread,
Jul 9, 2012, 4:01:50 PM7/9/12
to google-we...@googlegroups.com
I am developing an open-source software using GWT 2.4.0 and maven3 with ~100 modules.
Now I have trouble with GWT development mode in Eclipse (I just started with the new GWT client).

There are various warnings of this kind:

[WARN] Server class 'XXX' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'XXX' to the web app classpath for this session

So far so good - I read and understood the documentation what this is about.
However, I now have the opposite problem:

[09 Jul 2012 21:30:46] ERROR [org.springframework.web.servlet.DispatcherServlet][initServletBean]: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'RemoteInvocationGenericServiceUrlMapping' defined in class path resource [net/sf/mmm/service/beans-service-gwt.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'RemoteInvocationGenericServiceServlet' is defined

The reason for this problem is that I am using CDI annotations like @Named and therefore make spring to find my server-side components automatically on the classpath.
Now only these modules get on the classpath that are somehow directly referenced from my web.xml and what is happening from there explicitly.
In other words as long as the module (JAR) containing RemoteInvocationGenericServiceUrlMapping is not somehow referenced on bootstrap causing the according:
   [WARN] Adding classpath entry 'XXX' to the web app classpath for this session
the class will not be on Jettys classpath and is therefore not found by spring.

Acording to:
http://google-web-toolkit.googlecode.com/svn/trunk/distro-source/core/src/doc/helpInfo/webAppClassPath.html

You this behaviour is reaching the opposite of what it aims to do:
My application does not run in dev mode but works fine in prod mode if deployed to any servlet container.
Of course I could add all the JARs of my modules to WEB-INF/lib but then I would need to build all of them for each development cycle I do and
GWT is already slow enough to startup so then I could also go and build and deploy my entire WAR for every test I do what makes efficient development totally impossible.

So in the end my question is:
Is there some magic way to trigger this
   [WARN] Adding classpath entry 'XXX' to the web app classpath for this session
thing by a configuration or so for all my entries of the system classpath?

Thanks a lot
  Jörg

joerg.h...@googlemail.com

unread,
Jul 12, 2012, 2:31:51 PM7/12/12
to google-we...@googlegroups.com
I installed m2e-wtp (http://download.jboss.org/jbosstools/updates/m2eclipse-wtp/) and the problem is fixed.

Joseph Lust

unread,
Dec 10, 2012, 10:39:22 PM12/10/12
to google-we...@googlegroups.com
Ran into this same issue tonight when setting my Spring/Hibernate GWT app up on Kubuntu and Indigo. I removed the Eclipse.org "Maven Integration for Eclipse" I installed from the Eclipse Marketplace and installed the m2e plugin from http://download.jboss.org/jbosstools/updates/m2eclipse-wtp/. That fixed the issue like Joerg suggested. Thanks Jorge!


Sincerely,
Joseph
Reply all
Reply to author
Forward
0 new messages