Ok I read it a found the problem but dont understand the problem,
really.

In My OnModuleLoad

I call

NewRecordData.SetDefaults();

>From with in the class set out below.

If I move the setting for the variables to the
        public DogData() {

        }

and Comment out the SetToDefaults it works fine.

If you could explain this that would be fantastic.

Many Thanks Stephan


package com.australianchihuahuas.client;

import java.io.Serializable;
import java.util.Date;
import com.google.gwt.i18n.client.*;

public class DogData implements Serializable{

        private String DogName;
        private int RegNo;
        private Date DOB;
        private String BreederName;
        private String Breed;
        private Date RegDate;
        private String Tattoo;
        private String MicroChip;
        private String Color;
        private int Status;
        private String Misc1;
        private String Misc2;
        private String Misc3;
        private String Pic1;

        public DogData() {

        }

        public DogData(String DogName, int RegNo, Date DOB,
                        String BreederName, String Breed, Date RegDate, String 
Tattoo,
                        String MicroChip, String Color, int Status,
                        String Misc1, String Misc2, String Misc3, String Pic1) {

                this.DogName = DogName;
                this.RegNo= RegNo;
                this.DOB = DOB;
                this.BreederName = BreederName;
                this.Breed = Breed;
                this.RegDate = RegDate;
                this.Tattoo = Tattoo;
                this.MicroChip = MicroChip;
                this.Color = Color;
                this.Status = Status;
                this.Misc1 = Misc1;
                this.Misc2 = Misc2;
                this.Misc3 = Misc3;
                this.Pic1 = Pic1;
        }

        public void SetDefaults() {

            DateTimeFormat formater;
            formater = DateTimeFormat.getFormat("dd/MM/yyyy");

                this.DogName = "My Name";
                this.RegNo= 12345;
                this.DOB = 
DateTimeFormat.getShortDateFormat().parse("21/07/1976");
                this.BreederName = "Bob The Builder";
                this.Breed = "Chihuahua Smooth";
                this.RegDate = DateTimeFormat.getShortDateFormat().parse
("30/07/1976");
                this.Tattoo = ".";
                this.MicroChip = ".";
                this.Color = "Black & Tan";
                this.Status = 0;
                this.Misc1 = ".";
                this.Misc2 = ".";
                this.Misc3 = ".";
                this.Pic1 = ".";
        }

        public String getDogName() {
                return this.DogName;
        }

        public int getRegNo() {
                return this.RegNo;
        }

...... Blah Blah etc

On Sep 19, 11:24 am, GumbyGWTBeginner <[email protected]>
wrote:
> Thanks Ill have a read and see what I can come up with.
>
> I just wanna say, this group of guys / gals provide so much help.
> Many thanks people.
>
> Stephan
>
> On Sep 19, 9:37 am, Isaac Truett <[email protected]> wrote:
>
>
>
> > Stephan,
>
> > You, my dear fellow, have a NullPointerException.
>
> >http://publicint.blogspot.com/2009/04/nullpointerexception.html
>
> > - Isaac
>
> > On Fri, Sep 18, 2009 at 9:05 PM, GumbyGWTBeginner
>
> > <[email protected]> wrote:
>
> > > I was wondering if anyone could shed some light on this error message.
>
> > > The only thing I have changed is to add in a new service which uses a
> > > Data Class for passing data between (what I understand) the Client
> > > side to Server Side.
>
> > > @RemoteServiceRelativePath("greet")
> > > public interface GreetingService extends RemoteService {
> > >        String greetServer(String name);
> > >        String GetRowCounter(String name);
> > >        String[] GetTableData(String tableName);
> > >        String AddNewRecord(String tableName, DogData NewDataRecord);
> > > }
>
> > > [ERROR] Unable to load module entry point class
> > > com.australianchihuahuas.client.AustralianChihuahuas (see associated
> > > exception for details)
> > > java.lang.NullPointerException: null
> > >        at 
> > > com.australianchihuahuas.client.AustralianChihuahuas.onModuleLoad
> > > (AustralianChihuahuas.java:49)
> > >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > >        at sun.reflect.NativeMethodAccessorImpl.invoke
> > > (NativeMethodAccessorImpl.java:39)
> > >        at sun.reflect.DelegatingMethodAccessorImpl.invoke
> > > (DelegatingMethodAccessorImpl.java:25)
> > >        at java.lang.reflect.Method.invoke(Method.java:597)
> > >        at 
> > > com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:326)
> > >        at com.google.gwt.dev.shell.BrowserWidget.attachModuleSpace
> > > (BrowserWidget.java:343)
> > >        at com.google.gwt.dev.shell.ie.BrowserWidgetIE6.access$300
> > > (BrowserWidgetIE6.java:37)
> > >        at com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.gwtOnLoad
> > > (BrowserWidgetIE6.java:77)
> > >        at com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.invoke
> > > (BrowserWidgetIE6.java:161)
> > >        at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke
> > > (IDispatchImpl.java:294)
> > >        at com.google.gwt.dev.shell.ie.IDispatchImpl.method6
> > > (IDispatchImpl.java:194)
> > >        at org.eclipse.swt.internal.ole.win32.COMObject.callback6
> > > (COMObject.java:117)
> > >        at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native 
> > > Method)
> > >        at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925)
> > >        at 
> > > org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966)
> > >        at com.google.gwt.dev.SwtHostedModeBase.processEvents
> > > (SwtHostedModeBase.java:235)
> > >        at com.google.gwt.dev.HostedModeBase.pumpEventLoop
> > > (HostedModeBase.java:558)
> > >        at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:405)
> > >        at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)
>
> > > Stephan
--~--~---------~--~----~------------~-------~--~----~
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