2011-01-25 20 views
5

我通常使用Eclipse IDE进行GAE + GWT项目。GWT + GAE错误:运行GWTTestCase -JUnit时失败org.mortbay.jetty.nio.SelectChannelConnector

环境:GWT2.1.1,GAE 1.4.0

在GWT项目(不含GAE),在项目中使用GWTTestCase ,,, →没问题。运行良好。

在GWT + GAE项目中,在GWT项目中使用GWTTestCase ,,, →运行扩展GWTTestcase的测试时,会出现 错误。

误差低于: java.lang.NoSuchMethodError:。org.mortbay.thread.Timeout(Ljava /郎/对象;)V 在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) com.google.gwt.junit.JUnitShell.getUnitTestShell(JUnitShell.java:680) 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在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) 在org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)测试的

来源是如下: 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"); 
} 

} 

没有GAE,那将正常运行。

回答

13

无需删除软件包。只要确保GWT jar在构建路径中的appengine jar之前被引用。

1

对不起,关于最近的回复,但我只是自己有这个问题。

您有一个ClassPath冲突。

GWT和Appengine库都包含org.mortbay软件包。

我刚从Appengine库的副本中删除它们 - 以便它们仍可从GWT库中获得。现在一切似乎都没问题。

BestRegards

杰夫·布鲁克纳

+0

谢谢!容易明白。我会试试看。 – Tinoue 2011-02-15 15:29:16

+0

非凡!谢谢! – jldupont 2011-08-04 20:11:35

相关问题