Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT+GAE error :failed org.mortbay.jetty.nio.SelectChannelConnector by running GWTTestCase-JUnit

I usually use Eclipse IDE for GAE+GWT project.

Environment:GWT2.1.1, GAE 1.4.0

In GWT Project(without GAE), using GWTTestCase in the project,,, →no problem. run well.

In GWT+GAE Project, using GWTTestCase in the project for GWT,,, →When running the test that extends GWTTestcase, error comes.

Error is below: java.lang.NoSuchMethodError: org.mortbay.thread.Timeout.(Ljava/lang/Object;)V at org.mortbay.io.nio.SelectorManager$SelectSet.(SelectorManager.java:306) at org.mortbay.io.nio.SelectorManager.doStart(SelectorManager.java:223) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:303) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.Server.doStart(Server.java:233) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:542) at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:431) at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1053) at com.google.gwt.junit.JUnitShell.getUnitTestShell(JUnitShell.java:680) at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:625) at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:456) at junit.framework.TestCase.runBare(TestCase.java:134) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:311) at junit.framework.TestSuite.runTest(TestSuite.java:232) at junit.framework.TestSuite.run(TestSuite.java:227) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Sources of test are below: package com.companyName.client;

import com.google.gwt.junit.client.GWTTestCase;

public class Test extends GWTTestCase {


@Override
public String getModuleName() {
    return "com.companyName.projectName";
}


/**
 * test
 */
public void testNumburOne () {
    System.out.println("testNumburOne");
}

}

without GAE, that will run normally.

like image 735
Tinoue Avatar asked Jan 25 '11 06:01

Tinoue


2 Answers

No need to remove the package. Just make sure that the GWT jar is refererenced ahead of the appengine jar in the build path.

like image 128
Bill Stokes Avatar answered Nov 03 '22 01:11

Bill Stokes


Sorry about the late reply, but I only just had this issue myself.

You have a ClassPath conflict.

The org.mortbay packages are included in both the GWT and Appengine libraries.

I just removed them from my copy of the Appengine library - so that they are still available from the GWT library. Everything now seems to be OK.

BestRegards

Geoff Bruckner

like image 29
brucko Avatar answered Nov 03 '22 00:11

brucko