It's seem the problem coming from GWT complier can't get or loss main
class (Testgwt ) to bind with generated uibinder code
(Testgwt_BinderImpl.java).

But when I move the uibinder (Testgwt.ui.xml) to another class
(HelloWorld.java + HelloWorld.ui.xml) and then call it in main class,
GWT complier can build it sucessfully.

===========================NEW
Testgwt.java==================================
package testgwt.client;


import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootLayoutPanel;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class Testgwt implements EntryPoint {
        /**
         * This is the entry point method.
         */
        public void onModuleLoad() {
                HelloWorld hello = new HelloWorld();
                RootLayoutPanel root = RootLayoutPanel.get();
                root.add(hello);
        }
}
============================================================================================

This is GWT's bug or I missed some configurations???

Thanks in advanced.

Hung


On Oct 11, 9:33 am, heros <[email protected]> wrote:
> I have tried complied a simple example, but unsuccessful.
> Below is the enviroment & the source files:
> =======================================================================
> GWT 2.0.4
> App Engine 1.3.7
> ===============Testgwt.java=================================
> package testgwt.client;
>
> import com.google.gwt.core.client.EntryPoint;
> import com.google.gwt.core.client.GWT;
> import com.google.gwt.uibinder.client.UiBinder;
> import com.google.gwt.user.client.ui.HTMLPanel;
> import com.google.gwt.user.client.ui.RootLayoutPanel;
>
> /**
>  * Entry point classes define <code>onModuleLoad()</code>.
>  */
> public class Testgwt implements EntryPoint {
>         interface Binder extends UiBinder<HTMLPanel, Testgwt> { }
>
>         private static final Binder binder = GWT.create(Binder.class);
>
>         /**
>          * This is the entry point method.
>          */
>         public void onModuleLoad() {
>                 // Create the UI defined in Testgwt.ui.xml.
>                 HTMLPanel outer = binder.createAndBindUi(this);
>
>             // Add the outer panel to the RootLayoutPanel, so that it will be
>             // displayed.
>             RootLayoutPanel root = RootLayoutPanel.get();
>             root.add(outer);
>         }}
>
> ======================Testgwt.ui.xml====================================
> <ui:UiBinder
>   xmlns:ui='urn:ui:com.google.gwt.uibinder'
>   xmlns:g='urn:import:com.google.gwt.user.client.ui'>
>
>                 <g:HTMLPanel>
>                         <div>Hello</div>
>                 </g:HTMLPanel>
>
> </ui:UiBinder>
> ===================Testgwt.gwt.xml======================================
> <?xml version="1.0" encoding="UTF-8"?>
> <module rename-to='testgwt'>
>   <!-- Inherit the core Web Toolkit stuff.                        -->
>   <inherits name='com.google.gwt.user.User'/>
>
>   <!-- Other module inherits                                      -->
>
>   <!-- Specify the app entry point class.                         -->
>   <entry-point class='testgwt.client.Testgwt'/>
>
>   <!-- Specify the paths for translatable code                    -->
>   <source path='client'/>
>
> </module>
> ======================ERROR==========================================
> Compiling module testgwt.Testgwt
>    Scanning for additional dependencies: file:/C:/Working/GoogleApps/
> test/testgwt/src/testgwt/client/Testgwt.java
>       Adding '2' new generated units
>          Validating newly compiled units
>             [ERROR] Errors in 'generated://
> 3A2648B040DA67E0B1A95A005D54476A/testgwt/client/
> Testgwt_BinderImpl.java'
>                [ERROR] Line 8: No source code is available for type
> testgwt.client.Testgwt; did you forget to inherit a required module?
>                See snapshot: C:\DOCUME~1\HUNGLE~1\LOCALS~1\Temp
> \Testgwt_BinderImpl1062054062811714171.java
>       [ERROR] Unable to find recently-generated type
> 'testgwt.client.Testgwt_BinderImpl
>    [ERROR] Errors in 'file:/C:/Working/GoogleApps/test/testgwt/src/
> testgwt/client/Testgwt.java'
>       [ERROR]  Internal compiler error
> java.lang.RuntimeException: Unable to commit generated files
>         at
> com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds(WebModeCompilerFrontEnd.java:
> 131)
>         at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox
> $CompilerImpl.process(AbstractCompiler.java:200)
>         at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:
> 444)
>         at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox
> $CompilerImpl.compile(AbstractCompiler.java:123)
>         at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox
> $CompilerImpl.compile(AbstractCompiler.java:234)
>         at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.access
> $200(AbstractCompiler.java:109)
>         at
> com.google.gwt.dev.jdt.AbstractCompiler.compile(AbstractCompiler.java:
> 522)
>         at
> com.google.gwt.dev.jdt.BasicWebModeCompiler.getCompilationUnitDeclarations(BasicWebModeCompiler.java:
> 112)
>         at
> com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations(WebModeCompilerFrontEnd.java:
> 47)
>         at
> com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:
> 430)
>         at
> com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:
> 32)
>         at com.google.gwt.dev.Precompile.precompile(Precompile.java:522)
>         at com.google.gwt.dev.Precompile.precompile(Precompile.java:414)
>         at com.google.gwt.dev.Compiler.run(Compiler.java:201)
>         at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)
>         at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:
> 87)
>         at
> com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:
> 81)
>         at com.google.gwt.dev.Compiler.main(Compiler.java:159)
> Caused by: com.google.gwt.core.ext.UnableToCompleteException: (see
> previous log entries)
>         at
> com.google.gwt.dev.javac.StandardGeneratorContext.finish(StandardGeneratorContext.java:
> 358)
>         at
> com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds(WebModeCompilerFrontEnd.java:
> 129)
>         ... 17 more

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to