title: GWT/JAVA Uncaught exception escaped
body: <p>I have got a problem with my code and i cant seem to fix it. I want to add some customer data to a array list in java/GWT when submitting a button.</p>
  
  <p>the form from which i add the data.</p>
  
  <pre><code>ok.addClickHandler(new ClickHandler() {
          public void onClick(ClickEvent event) {
              if (!voornaamTB.getText().equalsIgnoreCase("") &amp;&amp; !achternaamTB.getText().equalsIgnoreCase("") &amp;&amp; !emailTB.getText().equalsIgnoreCase("") &amp;&amp; !geboortedatumTB.getText().equalsIgnoreCase("")) {
                  boolean addVG;
                  System.out.println(voornaamTB.getText());
                  System.out.println(tussenvoegselTB.getText());
                  System.out.println(achternaamTB.getText());
                  System.out.println(emailTB.getText());
                  System.out.println(geboortedatumTB.getText());
  --&gt; the error is generated here addVG = VGC.addVakantieganger(voornaamTB.getText(), tussenvoegselTB.getText(), achternaamTB.getText(), emailTB.getText(), geboortedatumTB.getText());
                  if (addVG) {
                      Window.alert("Vakantieganger toegevoegd.");
                  } else {
                      Window.alert("Vakantieganger niet toegevoegd.");
                  }
              } else {
                  voornaamTB.addStyleName("invalide-TextBox");
                  tussenvoegselTB.addStyleName("invalide-TextBox");
                  achternaamTB.addStyleName("invalide-TextBox");
                  emailTB.addStyleName("invalide-TextBox");
                  geboortedatumTB.addStyleName("invalide-TextBox");
              }
          }
      });
  </code></pre>
  
  <p>the controller class.</p>
  
  <pre><code>import java.util.ArrayList;
  
  import com.vakantievibes.client.domein.Vakantieganger;
  
  public class VakantiegangerController {
      private String msg;
      private ArrayList&lt;Vakantieganger&gt; vakantiegangers = new ArrayList&lt;Vakantieganger&gt;();
  
      public VakantiegangerController(){
  
      }
  
  @SuppressWarnings("static-access")
  public boolean heeftVakantieganger(String email) {
      boolean result = false;
      for (Vakantieganger v : vakantiegangers) {
          if (v.getEmail().equalsIgnoreCase(email)){
              result = true;
          }
      }
      return result;
  }
  
  public boolean addVakantieganger(String voornaam, String tussenvoegsel, String achternaam, String email, String geboortedatum) {
      //boolean result = false;
  
      //if (!heeftVakantieganger(email)) {
          Vakantieganger v = new Vakantieganger(voornaam, tussenvoegsel, achternaam, email, geboortedatum);
          vakantiegangers.add(v);
          boolean result = true;
          System.out.println("klant toegevoegd");
      //}
          return result;
      }
  
  }
  </code></pre>
  
  <p>with the methode addVakantieganger it should add the data to the arraylist. but it doesn't seem to do that it should then report true back to the form. the !heeftVakantieganger(email) should check if the person is already in the array list but is disabled now for testing purpose's</p>
  
  <p>the errors i recieve in eclipse.</p>
  
  <pre><code>14:17:03.207 [ERROR] [vakantie_vibes] Uncaught exception escaped
  
  com.google.gwt.event.shared.UmbrellaException: One or more exceptions caught, see full set in UmbrellaException#getCauses
      at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129)
      at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:124)
      at com.google.gwt.event.dom.client.DomEvent.fireNativeEvent(DomEvent.java:116)
      at com.google.gwt.user.client.ui.Widget.onBrowserEvent(Widget.java:172)
      at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1321)
      at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1277)
      at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
      at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
      at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:167)
      at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:326)
      at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:207)
      at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:132)
      at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
      at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
      at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
      at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
      at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214)
      at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
      at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
      at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:167)
      at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281)
      at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531)
      at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
      at java.lang.Thread.run(Thread.java:679)
  Caused by: java.lang.NullPointerException: null
      at com.vakantievibes.client.GUI.FormToevoegenVakantieganger$8.onClick(FormToevoegenVakantieganger.java:153)
      at com.google.gwt.event.dom.client.ClickEvent.dispatch(ClickEvent.java:54)
      at com.google.gwt.event.dom.client.ClickEvent.dispatch(ClickEvent.java:1)
      at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
      at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
      at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
      at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
      at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:124)
      at com.google.gwt.event.dom.client.DomEvent.fireNativeEvent(DomEvent.java:116)
      at com.google.gwt.user.client.ui.Widget.onBrowserEvent(Widget.java:172)
      at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1321)
      at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1277)
      at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
      at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
      at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:167)
      at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:326)
      at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:207)
      at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:132)
      at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
      at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
      at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
      at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
      at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214)
      at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
      at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
      at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:167)
      at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281)
      at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531)
      at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
      at java.lang.Thread.run(Thread.java:679)
  </code></pre>