title: GWT 2.6.0 - Uncaught java.lang.ClassCastException
body: <p>I am using GWT 2.6.0 in Super Dev Mode (with IntelliJ Idea 14 + Chrome 43.0.2357.130 (64-bit) for Linux).</p>
  
  <p>I have an exception in Chrome console during page loading</p>
  
  <pre><code>Uncaught java.lang.ClassCastException Impl.java:99
  (anonymous function) @ Impl.java:99
  gwtOnLoad @ oldstar-0.js:87303
  (anonymous function) @ ClassLiteralHolder.java:23
  </code></pre>
  
  <p><code>Impl.java:99</code> is <strong>throw e;</strong> in <code>com.google.gwt.core.client.impl.Impl</code></p>
  
  <pre class="lang-java prettyprint-override"><code> 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;
        }
      };
    }-*/;
  </code></pre>
  
  <p><code>oldstar-0.js:87303</code> is <strong>$entry(init_2)();</strong> in generated oldstar-0.js</p>
  
  <pre class="lang-js prettyprint-override"><code>function gwtOnLoad(errFn, modName, modBase, softPermutationId){
    $moduleName = modName;
    $moduleBase = modBase;
    if (errFn)
      try {
        $entry(init_2)();
      }
       catch (e) {
        errFn(modName);
      }
     else {
      $entry(init_2)();
    }
  }
  </code></pre>
  
  <pre class="lang-java prettyprint-override"><code>package com.google.gwt.lang;
  
  final class ClassLiteralHolder {
  }
  </code></pre>
  
  <p>And also <strong>init_2()</strong> which is the reference to to <code>init() in EntryMethodHolder.java</code></p>
  
  <pre class="lang-java prettyprint-override"><code>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.
    }
  }
  </code></pre>