"[ERROR] Unable to load module entry point class..."

253 views
Skip to first unread message

zoom

unread,
Dec 18, 2007, 10:40:46 AM12/18/07
to Google Web Toolkit
Hello all.

I'm attempting to make a simple program and I keep getting this
error.


[ERROR] Unable to load module entry point class
com.weather.client.Weather (see associated exception for details)
java.lang.NullPointerException: null
at com.weather.client.Weather.onModuleLoad(Weather.java:64)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:342)
at
com.google.gwt.dev.shell.BrowserWidget.attachModuleSpace(BrowserWidget.java:
326)
at com.google.gwt.dev.shell.ie.BrowserWidgetIE6.access
$200(BrowserWidgetIE6.java:36)
at
com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.gwtOnLoad(BrowserWidgetIE6.java:
70)
at
com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.invoke(BrowserWidgetIE6.java:
125)
at
com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:
293)
at
com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:
196)
at
org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:
117)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925)



package com.weather.client;

import com.google.gwt.core.client.EntryPoint;

import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;

import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.RadioButton;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Panel;

import com.google.gwt.user.client.Window;


/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class Weather implements EntryPoint {

/**
* This is the entry point method.
*/
public void onModuleLoad() {

HorizontalPanel inputPanel = new HorizontalPanel();

Label lbl = new Label("5-digit zipcode: "); inputPanel.add(lbl);

TextBox txBox = new TextBox(); txBox.setVisibleLength(20);

inputPanel.add(txBox);

Panel radioPanel = new VerticalPanel();

RadioButton ucRadio = new RadioButton("units", "Celsius");
RadioButton ufRadio = new RadioButton("units", "Fahrenheit");

ucRadio.setChecked(true);

radioPanel.add(ucRadio); radioPanel.add(ufRadio);
inputPanel.add(radioPanel);

Button btn = new Button("Submit");

inputPanel.add(btn);

RootPanel.get("input-container").add(inputPanel);

HTML weatherHtml = new HTML();

RootPanel.get("output-container").add(weatherHtml);

}
}

zoom

unread,
Dec 18, 2007, 10:50:51 AM12/18/07
to Google Web Toolkit
Sorry, I forgot to create HTML <div> elements with id's "input-
container" and "output-container".
Reply all
Reply to author
Forward
0 new messages