我最近将我的GWT从2.1升级 - > 2.6.0然而,当运行方法
时,这会破坏测试用例handlerManager.addHandler(MouseOverEvent.getType(), handler);
我收到以下错误:
java.lang.NoClassDefFoundError: com/google/gwt/core/shared/GWTBridge
at com.google.gwt.event.dom.client.PrivateMap.<init>(PrivateMap.java:65)
at com.google.gwt.event.dom.client.DomEvent.init(DomEvent.java:136)
at com.google.gwt.event.dom.client.DomEvent$Type.<init>(DomEvent.java:68)
at com.google.gwt.event.dom.client.MouseOverEvent.<clinit>(MouseOverEvent.java:30)
Caused by: java.lang.ClassNotFoundException: com.google.gwt.core.shared.GWTBridge
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.msLoader.loadClass(ClassLoader.java:248)
... 32 moreisc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.Clas
当我把gwt-dev.jar放在依赖项.pom中时,错误就消失了然后我得到一个编译器警告 - 但是这可以被忽略吗?
答案 0 :(得分:0)
将此依赖项添加到您的pom:
<dependency>
<groupId>com.google.web.bindery</groupId>
<artifactId>requestfactory-server</artifactId>
<version>2.6.1</version>
</dependency>
这应该可以解决您的问题