PDA

View Full Version : internal compiler exception from CheckChangedListener



dnedde
1 Aug 2008, 6:42 AM
I'm getting a compiler internal exception from GWT when compiling using GXT.

GXT version 1.0.1
GWT version 1.5.0
Compiling using Eclipse 3.4.0 using Cypal studio
Windows XP

My usage of CheckChangedListener.


private void getOrganizationsCallback( ArrayList<Organization> organizations )
{
CheckBox allCheckbox = new CheckBox();
allCheckbox.addListener( Events.CheckChange, new CheckChangedListener() {
public void checkChanged(CheckChangedEvent event) {
MessageBox.prompt("testing...", "Got check event");
}
} );
}
The compiler error message:

Compiling permutations
Analyzing permutation #1
[ERROR] An internal compiler exception occurred
com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during visit.
at com.google.gwt.dev.jjs.ast.JVisitor.translateException(JVisitor.java:538)
at com.google.gwt.dev.jjs.ast.JVisitor.doTraverse(JVisitor.java:529)
at com.google.gwt.dev.jjs.ast.JModVisitor$NodeContext.traverse(JModVisitor.java:154)
at com.google.gwt.dev.jjs.ast.JModVisitor.doAccept(JModVisitor.java:192)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:65)
at com.google.gwt.dev.jjs.ast.JIfStatement.traverse(JIfStatement.java:51)
at com.google.gwt.dev.jjs.ast.JVisitor.doTraverse(JVisitor.java:527)
at com.google.gwt.dev.jjs.ast.JModVisitor$ListContext.traverse(JModVisitor.java:100)
at com.google.gwt.dev.jjs.ast.JModVisitor.doAcceptWithInsertRemove(JModVisitor.java:212)
at com.google.gwt.dev.jjs.ast.JVisitor.acceptWithInsertRemove(JVisitor.java:81)
at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:36)
at com.google.gwt.dev.jjs.ast.JVisitor.doTraverse(JVisitor.java:527)
at com.google.gwt.dev.jjs.ast.JModVisitor$NodeContext.traverse(JModVisitor.java:154)
at com.google.gwt.dev.jjs.ast.JModVisitor.doAccept(JModVisitor.java:192)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:73)
at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:52)
at com.google.gwt.dev.jjs.ast.JVisitor.doTraverse(JVisitor.java:527)
at com.google.gwt.dev.jjs.ast.JModVisitor$NodeContext.traverse(JModVisitor.java:154)
at com.google.gwt.dev.jjs.ast.JModVisitor.doAccept(JModVisitor.java:192)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:69)
at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:189)
at com.google.gwt.dev.jjs.ast.JVisitor.doTraverse(JVisitor.java:527)
at com.google.gwt.dev.jjs.ast.JModVisitor$ListContext.traverse(JModVisitor.java:100)
at com.google.gwt.dev.jjs.ast.JModVisitor.doAcceptWithInsertRemove(JModVisitor.java:212)
at com.google.gwt.dev.jjs.ast.JVisitor.acceptWithInsertRemove(JVisitor.java:81)
at com.google.gwt.dev.jjs.ast.JClassType.traverse(JClassType.java:62)
at com.google.gwt.dev.jjs.ast.JVisitor.doTraverse(JVisitor.java:527)
at com.google.gwt.dev.jjs.ast.JModVisitor$NodeContext.traverse(JModVisitor.java:154)
at com.google.gwt.dev.jjs.ast.JModVisitor.doAccept(JModVisitor.java:202)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:77)
at com.google.gwt.dev.jjs.ast.JProgram.traverse(JProgram.java:799)
at com.google.gwt.dev.jjs.ast.JVisitor.doTraverse(JVisitor.java:527)
at com.google.gwt.dev.jjs.ast.JModVisitor$NodeContext.traverse(JModVisitor.java:154)
at com.google.gwt.dev.jjs.ast.JModVisitor.doAccept(JModVisitor.java:192)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:69)
at com.google.gwt.dev.jjs.impl.EqualityNormalizer.execImpl(EqualityNormalizer.java:198)
at com.google.gwt.dev.jjs.impl.EqualityNormalizer.exec(EqualityNormalizer.java:187)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.compile(JavaToJavaScriptCompiler.java:424)
at com.google.gwt.dev.GWTCompiler.realizePermutation(GWTCompiler.java:511)
at com.google.gwt.dev.GWTCompiler.compilePermutations(GWTCompiler.java:442)
at com.google.gwt.dev.GWTCompiler.distill(GWTCompiler.java:358)
at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:564)
at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:554)
at com.google.gwt.dev.GWTCompiler.main(GWTCompiler.java:214)
Caused by: java.lang.ClassCastException: com.google.gwt.dev.jjs.ast.JPrimitiveType cannot be cast to com.google.gwt.dev.jjs.ast.JReferenceType
at com.google.gwt.dev.jjs.impl.EqualityNormalizer$BreakupAssignOpsVisitor.endVisit(EqualityNormalizer.java:86)
at com.google.gwt.dev.jjs.ast.JBinaryOperation.traverse(JBinaryOperation.java:79)
at com.google.gwt.dev.jjs.ast.JVisitor.doTraverse(JVisitor.java:527)
... 42 more
[ERROR] at CheckChangedListener.java(18): null.nullField == 180
com.google.gwt.dev.jjs.ast.JBinaryOperation
[ERROR] at CheckChangedListener.java(18): if (null.nullField == 180) {
this.checkChanged(ce);
}
com.google.gwt.dev.jjs.ast.JIfStatement
[ERROR] at CheckChangedListener.java(17): {
if (null.nullField == 180) {
this.checkChanged(ce);
}
}
com.google.gwt.dev.jjs.ast.JBlock
[ERROR] at CheckChangedListener.java(17): {
if (null.nullField == 180) {
this.checkChanged(ce);
}
}
com.google.gwt.dev.jjs.ast.JMethodBody
[ERROR] at CheckChangedListener.java(17): public void handleEvent(<null> ce);

com.google.gwt.dev.jjs.ast.JMethod
[ERROR] at CheckChangedListener.java(15): class CheckChangedListener extends Object implements Listener
com.google.gwt.dev.jjs.ast.JClassType
[ERROR] <no source info>: <JProgram>
com.google.gwt.dev.jjs.ast.JProgram
[ERROR] Build failed

darrellmeyer
5 Aug 2008, 8:12 PM
CheckBox does not fire the CheckChange event, rather, the Check event with a Listener, not a CheckChangeListener. Try:


check.addListener(Events.Change, new Listener<FieldEvent>() {

public void handleEvent(FieldEvent be) {
// TODO Auto-generated method stub

}

});