IncompatibleClassChangeError when launching hosted mode (GWT 1.6 M2)

28 views
Skip to first unread message

grishag

unread,
Mar 27, 2009, 1:42:23 AM3/27/09
to Google Web Toolkit
Hi,

I started using GWT 1.6.1 M2 recently and things were going quite
smoothly until I tried using hosted mode (with -noserver option). I am
now getting the following exception. Does anyone know what this
actually means? As far as I can tell, HashSessionManager does
implemented SessionManager interface (that is indirectly by extending
the AbstractSessionManager class).

Thanks.

[java] Exception in thread "main"
java.lang.IncompatibleClassChangeError: Class
org.mortbay.jetty.servlet.HashSessionManager does not implement the
requested interface org.mortbay.jetty.SessionManager
[java] at
org.mortbay.jetty.servlet.SessionHandler.setSessionManager
(SessionHandler.java:88)
[java] at org.mortbay.jetty.servlet.SessionHandler.<init>
(SessionHandler.java:62)
[java] at org.mortbay.jetty.servlet.SessionHandler.<init>
(SessionHandler.java:53)
[java] at org.mortbay.jetty.webapp.WebAppContext.<init>
(WebAppContext.java:297)
[java] at com.google.gwt.dev.ServletValidator.create
(ServletValidator.java:59)
[java] at com.google.gwt.dev.ServletValidator.create
(ServletValidator.java:43)
[java] at com.google.gwt.dev.HostedMode.doStartup
(HostedMode.java:344)
[java] at com.google.gwt.dev.HostedModeBase.startUp
(HostedModeBase.java:583)
[java] at com.google.gwt.dev.HostedModeBase.run
(HostedModeBase.java:395)
[java] at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)

jvictor

unread,
Apr 9, 2009, 9:48:38 PM4/9/09
to Google Web Toolkit
If using Eclipse, try moving the GWT jars (or the GWT SDK library if
you are using the new Eclipse plugin) to the top of your classpath
order.

Right Click Project -> Properties -> Java Build Path -> Order and
Export

grishag

unread,
Apr 13, 2009, 9:02:57 PM4/13/09
to Google Web Toolkit
Thanks for that. You were right on the money. I had a Selenium jar on
the classpath that was causing this problem.

On Apr 10, 11:48 am, jvictor <jeffvic...@gmail.com> wrote:
> If using Eclipse, try moving the GWT jars (or the GWT SDK library if
> you are using the new Eclipse plugin) to the top of your classpath
> order.
>
> Right Click Project -> Properties -> Java Build Path -> Order and
> Export
>

Josué

unread,
May 12, 2009, 10:58:07 AM5/12/09
to Google Web Toolkit
Hi,

I have the same problem here but the suggestion did not worked to me.
Here is my scenario:

I have a pom.xml (maven) in which most (but not all) project´s
dependencies are placed. When i put the following, the problem
appears:
...
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
<version>1.0-beta-3</version>
<scope>test</scope>
</dependency>
...
In the moment the only jar that is not in the pom.xml is gwt-user.jar.
There is no available maven repository (at least the ones showed in
the search inside eclipse). I did as suggested here and my Order and
Export is in this way:

gwt-user.jar
projectName/src
projectName/test
JRE System Library [jre6]
JUnit 4
Maven Dependencies

And all other jars is inside Maven Dependencies. Any suggestions would
be very appreciated.

Abraços,

Josué.

Salvador Diaz

unread,
May 12, 2009, 4:25:52 PM5/12/09
to Google Web Toolkit
Hi Josué,

I recommend you learn more about dependecy management with maven as
the problem your facing is easily solvable once you've understood how
it works.

Anyway, the solution to your problem is excluding the conflicting
jetty dependency in your pom. Replace your selenium import with the
following:

<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
<version>1.0-beta-3</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>jetty</groupId>
<artifactId>org.mortbay.jetty</artifactId>
</exclusion>
</exclusions>
</dependency>

Hope that helps,

Salvador

Josué

unread,
Jun 17, 2009, 1:16:47 PM6/17/09
to Google Web Toolkit
Hi Salvador,

Sorry for this late response. I tried your suggestion, but the problem
remains.

Thanks anyway,

Josué.

Josué

unread,
Jun 17, 2009, 1:38:57 PM6/17/09
to Google Web Toolkit
As a information I changed the dependency in pom.xml to this one:

...
<dependency>
<groupId>org.apache.geronimo.testsupport</groupId>
<artifactId>testsupport-selenium</artifactId>
<version>2.1.3</version>
</dependency>
...

And it worked now. The only thing is the testng.jar that I don´t
wanna. But it is not a problem in the moment.
Reply all
Reply to author
Forward
0 new messages