Why am I getting the Error "No source is available"?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phpuser123
    New Member
    • Dec 2009
    • 108

    #1

    Why am I getting the Error "No source is available"?

    Hi, I've been struggling to run a GWT for a while and it doesn't work...

    My source code ::

    <CODE>
    package org.yournameher e.client;
    import com.google.gwt. ajaxloader.clie nt.JsDate;
    import com.google.gwt. core.client.Ent ryPoint;
    import com.google.gwt. user.client.ui. Button;
    import com.google.gwt. user.client.ui. Label;
    import com.google.gwt. user.client.ui. RootPanel;
    import com.google.gwt. event.dom.clien t.ClickEvent;
    import com.google.gwt. event.dom.clien t.ClickHandler;
    import com.google.gwt. maps.client.Map Widget;
    import com.google.gwt. maps.client.con trol.Control;
    import com.google.gwt. maps.client.con trol.SmallMapCo ntrol;
    import com.google.gwt. user.client.Win dow;
    import com.google.gwt. user.datepicker .client.DateBox ;
    public class MainEntryPoint implements EntryPoint {
    public void onModuleLoad() {
    final Label label = new Label("Hello, GWT!!!");
    //final Button button = new Button("Click me!");
    final DateBox db=new DateBox();
    Button b = new Button("Jump!") ;
    MapWidget mw=new MapWidget();
    mw.setSize("500 px", "500px");
    mw.addControl(n ew SmallMapControl () );
    // public void onClick(ClickEv ent event) {
    // Window.alert("H ow high?");
    b.addClickHandl er(new ClickHandler(){
    public void onClick(ClickEv ent event) {
    label.setVisibl e(true);
    label.setText(d b.getTextBox(). getText());
    }
    });
    RootPanel.get() .add(label);
    RootPanel.get() .add(b);
    RootPanel.get() .add(db);
    }
    }


    </CODE>
    Errors::

    GWT Compiling client-side code.
    Compiling module org.yournameher e.Main
    Validating newly compiled units
    [ERROR] Errors in 'file:/D:/Program%20Files/NetBeans%206.8/hello1GWT/src/java/org/yournamehere/client/MainEntryPoint. java'
    [ERROR] Line 40: No source code is available for type com.google.gwt. maps.client.Map Widget; did you forget to inherit a required module?
    [ERROR] Line 42: No source code is available for type com.google.gwt. maps.client.con trol.SmallMapCo ntrol; did you forget to inherit a required module?
    Finding entry point classes
    [ERROR] Unable to find type 'org.yournamehe re.MainEntryPoi nt'
    [ERROR] Hint: Check that the type name 'org.yournamehe re.MainEntryPoi nt' is really what you meant
    [ERROR] Hint: Check that your classpath includes all required source roots
    D:\Program Files\NetBeans 6.8\hello1GWT\n bproject\build-gwt.xml:140: The following error occurred while executing this line:
    D:\Program Files\NetBeans 6.8\hello1GWT\n bproject\build-gwt.xml:289: Java returned: 1
    BUILD FAILED (total time: 5 seconds)

    ------------------------------------------
    In the Main.gwt.xml, the error codes are from the line

    line 140:: <antcall target="do-gwt-compile-20" />

    line 289 ::


    <target name="do-gwt-compile-20" if="gwt.version .20"
    unless="gwt.com pile.unneeded" depends="-init-gwt-dir">
    <!-- You can override this property in the 'gwt.properties ' file -->
    <property name="gwt.compi ler.output.styl e" value="OBFUSCAT ED"/>
    <property name="gwt.compi ler.logLevel" value="WARN"/>
    <echo>GWT Compiling client-side code.</echo>
    <java failonerror="tr ue"
    classname="com. google.gwt.dev. Compiler" fork="true"
    jvmargs="${gwt. compiler.jvmarg s}">




    If you could get this sorted out for me ...
Working...