Computing all possible rebind results for
'program.client.ajax.MyService'
Rebinding program.client.ajax.MyService
Invoking <generate-with
class='com.google.gwt.user.rebind.rpc.ServiceInterfaceProxyGenerator'/>
Validating service interface 'program.client.ajax.MyService'
Service interface: program.client.ajax.MyService
Service method: public abstract
program.client.Trees.Proto[] getProto()
[ERROR] Return type program.client.Trees.Proto[] is
not serializable and/or has no serializable subtypes
[WARN] Deferred binding result type
'program.client.ajax.MyService' is not instantiable; expect subsequent
failure
[ERROR] Errors in 'C:\Documents and
Settings\user\Desktop\gwt\Program\src\program\client\Async.java'
[ERROR] Line 1: Unable to resolve required rebind dependencies
Output will be written into C:\Documents and
Settings\user\Desktop\gwt\Program\build\www\program.Main
Analyzing permutation #1
[ERROR] Unexpected internal compiler error
java.lang.RuntimeException: Failed to get JNode
at com.google.gwt.dev.jjs.impl.TypeMap.get(TypeMap.java:28)
at
com.google.gwt.dev.jjs.impl.BuildTypeMap$BuildDeclMapVisitor.createParameter(BuildTypeMap.java:494)
at
com.google.gwt.dev.jjs.impl.BuildTypeMap$BuildDeclMapVisitor.mapParameters(BuildTypeMap.java:208)
at
com.google.gwt.dev.jjs.impl.BuildTypeMap$BuildDeclMapVisitor.visit(BuildTypeMap.java:301)
at
org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.traverse(MethodDeclaration.java:178)
at
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1170)
at
org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:339)
at
com.google.gwt.dev.jjs.impl.BuildTypeMap.createPeersForNonTypeDecls(BuildTypeMap.java:82)
at
com.google.gwt.dev.jjs.impl.BuildTypeMap.exec(BuildTypeMap.java:64)
at
com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.compile(JavaToJavaScriptCompiler.java:251)
at
com.google.gwt.dev.GWTCompiler.realizePermutation(GWTCompiler.java:598)
at
com.google.gwt.dev.GWTCompiler.compilePermutations(GWTCompiler.java:346)
at com.google.gwt.dev.GWTCompiler.distill(GWTCompiler.java:295)
at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:629)
at com.google.gwt.dev.GWTCompiler.main(GWTCompiler.java:192)
Below is snippet of the code.
public class Trees extends Composite implements TreeListener{
//some codes of Trees class goes here
//inner class
public static class Proto {
private Proto[] children;
private TreeItem item;
private String text;
public Proto(){
}
public Proto(String text) {
this.text = text;
}
public Proto(String text, Proto[] children) {
this(text);
this.children = children;
}
public Proto[] getChildren() {
return children;
}
public void setChildren(Proto[] children) {
this.children = children;
}
public TreeItem getItem() {
return item;
}
public void setItem(TreeItem item) {
this.item = item;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
}
}
I suspect is because of the "Proto[] children" inside the class Proto.
Do you guys have any idea to help me to solve this problem?
Thanks.
Rgds,
Tom
Computing all possible rebind results for
'program.client.ajax.MyService'
Rebinding program.client.ajax.MyService
Invoking <generate-with
class='com.google.gwt.user.rebind.rpc.ServiceInterfaceProxyGenerator'/>
Analyzing serializability for 304 types
The following types were determined to be unserializable:
program.client.Trees.Proto
Field 'private com.google.gwt.user.client.ui.TreeItem
item' is not of a serializable type nor does that type have
serializable subtypes
program.client.Trees.Proto[]
component type 'program.client.Trees.Proto' is not of
a serializable type nor does it have any serializable subtypes
Validating service interface 'program.client.ajax.MyService'
Service interface: program.client.ajax.MyService
Service method: public abstract
program.client.Trees.Proto[] getProto()
[ERROR] Return type program.client.Trees.Proto[] is
not serializable and/or has no serializable subtypes
[WARN] Deferred binding result type
'program.client.ajax.MyService' is not instantiable; expect subsequent
failure
[ERROR] Errors in 'C:\Documents and
Settings\user\Desktop\gwt\Program\src\program\console\client\Async.java'
[ERROR] Build failed
The snippet of the code:
public class Trees extends Composite implements TreeListener{
//some codes of Trees class goes here
//inner class
public static class Proto implements IsSerializable{
public static class Proto {
Btw, thanks.
Have any idea how to solve?
Tom
you can copy the application ,then modify and test it .
i think you may find the problem.
"Tom 写道:
In my experience, serialization sometimes chokes on inner classes.
Does it fix the problem to move Proto to a top-level class?
> public static class Proto {
> private Proto[] children;
> private TreeItem item;
Is TreeItem IsSerializable? If not, then neither is Proto. Maybe
make the item field transient, like this:
private transient TreeItem item;
I assume TreeItem is a GWT-supplied piece of a tree widget. If so, I
can't see any reason to send one to the server, never mind that the
class probably isn't defined there.
Just my two cents.
Ian
--
Tired of pop-ups, security holes, and spyware?
Try Firefox: http://www.getfirefox.com