Я использую GWT 2.6.0 в режиме Super Dev (с IntelliJ Idea 14 + Chrome 43.0.2357.130 (64-разрядная версия) для Linux).GWT 2.6.0 - Uncaught java.lang.ClassCastException
У меня есть исключение в консоли Chrome во время загрузки страницы
Uncaught java.lang.ClassCastException Impl.java:99
(anonymous function) @ Impl.java:99
gwtOnLoad @ oldstar-0.js:87303
(anonymous function) @ ClassLiteralHolder.java:23
Impl.java:99
является бросок е; в com.google.gwt.core.client.impl.Impl
public static native JavaScriptObject entry(JavaScriptObject jsFunction) /*-{
return function() {
try {
return @com.google.gwt.core.client.impl.Impl::entry0(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)(jsFunction, this, arguments);
} catch (e) {
// This catch block is here to ensure that the finally block in entry0
// will be executed correctly on IE6/7. We can't put a catch Throwable
// in entry0 because this would always cause the unhandled exception to
// be wrapped in a JavaScriptException type.
throw e;
}
};
}-*/;
oldstar-0.js:87303
является $ запись (init_2)(); в генерироваться oldstar-0.js
function gwtOnLoad(errFn, modName, modBase, softPermutationId){
$moduleName = modName;
$moduleBase = modBase;
if (errFn)
try {
$entry(init_2)();
}
catch (e) {
errFn(modName);
}
else {
$entry(init_2)();
}
}
package com.google.gwt.lang;
final class ClassLiteralHolder {
}
А также init_2(), которая является ссылкой на чтобы init() in EntryMethodHolder.java
package com.google.gwt.lang;
/**
* This class holds the boot strap entry method that the compiler generates.
*/
public class EntryMethodHolder {
public static final void init() {
// Filled in by the compiler to call entry methods.
}
}
Я бы добавил UncaughtExceptionHandler. Послушайте здесь, чтобы получить действительно хорошее сообщение о входе в GWT: http://www.summa-tech.com/blog/2012/06/11/7-tips-for-exception-handling-in-gwt –