I have a record in database which being get must be in the tree table view. Here is the filling method:
private void updateGoods(){
goodsPane.setCenter(goodTreeTableView);
List<Good> goodAndFoldersList;
try {
goodAndFoldersList = goodsService.getGoods();//database query
}catch (SQLException e){
goodAndFoldersList = new ArrayList<>();
log.log(Level.ERROR, e.getMessage());
}
List<Good> goods = new ArrayList<Good>();//list for roots
List<Good> roots = new ArrayList<Good>();//list for goods themselves
for (Good good : goodAndFoldersList) {
if (good.isIs_folder()) {
roots.add(good);
} else {
goods.add(good);
}
}
TreeItem<Good> rootItem = new TreeItem<>();//the main root
for (Good root : roots) {
Long folderId = root.getId();
TreeItem<Good> rootTreeItem = new TreeItem<>(root);
for (Good good : goods) {//looking for goods for each folder
if (good.getFolderId() == folderId) {
TreeItem<Good> goodTreeItem = new TreeItem<>(good);
rootTreeItem.getChildren().add(goodTreeItem);
}
}
rootItem.getChildren().add(rootTreeItem);//adding every folder to the main root
}
goodTreeTableView = new TreeTableView<>(rootItem);
}
after this method user doesn't see anything in the treeTableView. Maybe there nessessary to define cell content, but this code being put before goodTreeTableView = new TreeTableView<>(rootItem); drops NullPointerException:
goodName.setCellValueFactory((TreeTableColumn.CellDataFeatures<Good, String> param) ->
new ReadOnlyStringWrapper(param.getValue().getValue().getName()));
folderId.setCellValueFactory((TreeTableColumn.CellDataFeatures<Good, Number> param) ->
new ReadOnlyLongWrapper(param.getValue().getValue().getFolderId()));
is_folder.setCellValueFactory((TreeTableColumn.CellDataFeatures<Good, Boolean> param) ->
new ReadOnlyBooleanWrapper(param.getValue().getValue().isIs_folder()));
I guess this is the reason of my problem but why this drops NPE I can't figure out.
UPD: if I add setting cell value factory I get the following stacktrace:
javafx.fxml.LoadException:
/D:/javaEdi/linkserver/ediagent/target/classes/com/ediagent/edi/gui/Main.fxml
at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2595)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2565)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2435)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2403)
at com.ediagent.edi.gui.Main.initRootLayout(Main.java:44)
at com.ediagent.edi.gui.Main.start(Main.java:27)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$153(LauncherImpl.java:821)
at com.sun.javafx.application.LauncherImpl$$Lambda$51/1546859350.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$166(PlatformImpl.java:323)
at com.sun.javafx.application.PlatformImpl$$Lambda$44/1712669532.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$null$164(PlatformImpl.java:292)
at com.sun.javafx.application.PlatformImpl$$Lambda$47/157858792.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$165(PlatformImpl.java:291)
at com.sun.javafx.application.PlatformImpl$$Lambda$46/1225373914.run(Unknown Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$141(WinApplication.java:102)
at com.sun.glass.ui.win.WinApplication$$Lambda$37/152005629.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2560)
... 18 more
Caused by: java.lang.NullPointerException
at com.ediagent.edi.gui.MainController.updateGoods(MainController.java:309)
at com.ediagent.edi.gui.MainController.initialize(MainController.java:328)
... 28 more
**UPD:**rootItem:
You are adding the data to an GUI element on FXML, by re-initializing it. Avoid re-initialization of FXML elements.
You can change the signature of updateGoods() to :
public TreeItem<Good> updateGoods() {
...
}
and use it in the MainController to set items
goodTreeTableView.setRoot(updateGoods());
Preferably, you can also return only data(List) from updateGoods() instead of returning a TreeItem. Create it in the Controller and set it as the root of goodTreeTableView.
Related
I'm writing a simple application with java and trying to play sounds but I can't get it to work when I create the Media object it throws
java.lang.reflect.InvocationTargetException , the file name is correct , and i tried the full file path name and i get the same error
my code is :
`
public class Try extends Application {
#Override
public void start(Stage primaryStage) throws Exception {
Pane pane = new Pane () ;
Button b = new Button("click here ") ;
Media m = new Media ("music.mp3");
MediaPlayer md = new MediaPlayer(m) ;
b.setOnAction(e -> {
md.play();
System.out.println("clicked");
});
pane.getChildren().add(b) ;
Scene s = new Scene(pane , 300 ,300 ) ;
primaryStage.setScene(s);
primaryStage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
i tried .wav files and get same error .
the full error :
`
Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$159(LauncherImpl.java:182)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: uri.getScheme() == null! uri == 'music.mp3'
at com.sun.media.jfxmedia.locator.Locator.<init>(Locator.java:218)
at javafx.scene.media.Media.<init>(Media.java:393)
at ttry.Try.start(Try.java:17)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$166(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$179(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$177(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$178(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$152(WinApplication.java:177)
... 1 more
Exception running application ttry.Try
`
I want to dynamically load JAR Files using a ClassLoader from a ByteArray. It works fine with every executable JAR Files I've tried it with so far, except a Program using WebLaF. I always get the following set of Errors:
javax.xml.parsers.FactoryConfigurationError: Provider for class javax.xml.parsers.DocumentBuilderFactory cannot be created
at javax.xml.parsers.FactoryFinder.findServiceProvider(Unknown Source)
at javax.xml.parsers.FactoryFinder.find(Unknown Source)
at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
at com.thoughtworks.xstream.io.xml.DomDriver.<init>(DomDriver.java:64)
at com.thoughtworks.xstream.io.xml.DomDriver.<init>(DomDriver.java:56)
at com.thoughtworks.xstream.io.xml.DomDriver.<init>(DomDriver.java:48)
at com.alee.utils.XmlUtils.initializeXStream(XmlUtils.java:90)
at com.alee.utils.XmlUtils.getXStream(XmlUtils.java:77)
at com.alee.utils.XmlUtils.processAnnotations(XmlUtils.java:141)
at com.alee.laf.WebLookAndFeel$2.propertyChange(WebLookAndFeel.java:855)
at java.beans.PropertyChangeSupport.fire(Unknown Source)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(Unknown Source)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at javax.swing.UIManager.setLookAndFeel(Unknown Source)
at com.alee.laf.WebLookAndFeel.install(WebLookAndFeel.java:932)
at com.alee.laf.WebLookAndFeel.install(WebLookAndFeel.java:918)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at xx.ByteCodeClassLoader.main(ByteCodeClassLoader.java:178)
Caused by: java.lang.RuntimeException: Provider for class javax.xml.parsers.DocumentBuilderFactory cannot be created
... 24 more
Caused by: java.util.ServiceConfigurationError: javax.xml.parsers.DocumentBuilderFactory: Error locating configuration files
at java.util.ServiceLoader.fail(Unknown Source)
at java.util.ServiceLoader.access$100(Unknown Source)
at java.util.ServiceLoader$LazyIterator.hasNextService(Unknown Source)
at java.util.ServiceLoader$LazyIterator.hasNext(Unknown Source)
at java.util.ServiceLoader$1.hasNext(Unknown Source)
at javax.xml.parsers.FactoryFinder$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 24 more
Caused by: java.io.IOException: Cannot fetch URL out of res
at xx.ByteCodeClassLoader.findResources(ByteCodeClassLoader.java:72)
at java.lang.ClassLoader.getResources(Unknown Source)
... 29 more
java.lang.NullPointerException
at com.alee.utils.XmlUtils.processAnnotations(XmlUtils.java:141)
at com.alee.laf.WebLookAndFeel$2.propertyChange(WebLookAndFeel.java:855)
at java.beans.PropertyChangeSupport.fire(Unknown Source)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(Unknown Source)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at javax.swing.UIManager.setLookAndFeel(Unknown Source)
at com.alee.laf.WebLookAndFeel.install(WebLookAndFeel.java:932)
at com.alee.laf.WebLookAndFeel.install(WebLookAndFeel.java:918)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at xx.ByteCodeClassLoader.main(ByteCodeClassLoader.java:178)
After this, the JAR runs successfully until it has to load the GUI. Then it crashes with another error:
javax.xml.parsers.FactoryConfigurationError: Provider for class javax.xml.parsers.DocumentBuilderFactory cannot be created
My Code is the following:
public class ByteCodeClassLoader extends ClassLoader {
final Map<String, byte[]> classes;
final Map<String, byte[]> res;
-snip-
#Override
protected Class<?> findClass(String name) throws ClassNotFoundException {
byte[] code = classes.get(name);
if (code != null){
return defineClass(name, code, 0, code.length);
}
return super.findClass(name);
}
#Override
public URL getResource(String name) {
URL ur = ByteCodeClassLoader.class.getResource(name);
if (ur != null) {
return ur;
}
try {
return new URL(null, "bytes:///" + name, new BytesHandler());
} catch (MalformedURLException e) {
throw new RuntimeException(e);
}
}
#Override
public InputStream getResourceAsStream(String name) {
return new ByteArrayInputStream(res.get(name));
}
#Override
protected Enumeration<URL> findResources(String name) throws IOException {
throw new IOException("Cannot fetch URL out of res");
}
-snip-
If you know a solution to this issue, it would help me greatly. Even just a lead in the right direction would be awesome. I hope I supplied all the important information.
I'm getting a big trace when trying to run this code which display an image, however I'm not sure why the code isn't running. Any ideas?
public class SplashScreen extends Application {
public static void main(String[] args) {
Application.launch(args);
}
#Override
public void start(Stage stage) throws Exception {
//Parent rootNode = null;
Group root = new Group();
Scene scene = new Scene(root, 500, 500);
GridPane gridpane = new GridPane();
gridpane.setPadding(new Insets(5));
gridpane.setHgap(10);
gridpane.setVgap(10);
ImageView algLogo = new ImageView();
Image logo = new Image("D:/Users/Tozu/workspace/ACA 5 OOJP/AlgonquinCollegeLogo.jpg");
algLogo.setImage(logo);
final HBox pictureRegion = new HBox();
pictureRegion.getChildren().add(algLogo);
gridpane.add(pictureRegion, 1, 1);
root.getChildren().add(gridpane);
stage.setTitle("ACA 5");
stage.setScene(scene);
stage.show();
}
I've also tried a little test class that confirms whether I have the path for the JPG correct and it seems to work fine, so I don't think the problem lies with the JPG path.
For clarification the JPG is located in the class folder, not in the src folder
Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: Invalid URL: unknown protocol: d
at javafx.scene.image.Image.validateUrl(Image.java:1121)
at javafx.scene.image.Image.<init>(Image.java:620)
at splashPkg.SplashScreen.start(SplashScreen.java:39)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
... 1 more
Caused by: java.net.MalformedURLException: unknown protocol: d
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at javafx.scene.image.Image.validateUrl(Image.java:1115)
... 11 more
Exception running application splashPkg.SplashScreen
You have to set the URL file protocol
Image logo = new Image("file:D:/Users/Tozu/workspace/ACA 5 OOJP/AlgonquinCollegeLogo.jpg");
^ here
From the documentation of Image https://docs.oracle.com/javafx/2/api/javafx/scene/image/Image.html
// load an image and resize it only in one dimension, to the height of 100 and
// the original width, without preserving original aspect ratio
// The image is located in the current working directory
Image image4 = new Image("file:flower.png", 0, 100, false, false);
A better way to do the same thing is to use a File object (As suggested by James_D)
File f = new File("D:/Users/Tozu/workspace/ACA 5 OOJP/AlgonquinCollegeLogo.jpg");
Image logo = new Image(f.toURI().toString());
i have problems with gwt using openlayers and openstreetmaps to get a simple
example projekt to work.
When i run the projekt it always throws an exception:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:406)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:5 26)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Unknown Source) Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) #org.gwtopenmaps.openlayers.client.layer.OSMImpl::Osmarender(Ljava/lang/String;)([string: 'Osmarender']): $wnd.OpenLayers.Layer.OSM.Osmarender is not a constructor
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:24 9)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at org.gwtopenmaps.openlayers.client.layer.OSMImpl.Osmarender(OSMImpl.java)
at org.gwtopenmaps.openlayers.client.layer.OSM.Osmarender(OSM.java:38)
at de.iisys.sara2.sara2lightWebclient.client.View.initMap(View.java:33)
at de.iisys.sara2.sara2lightWebclient.client.View.onModuleLoad(View.java:26) ... 9 more
My Example Code:
public class View implements EntryPoint {
public View() {
}
public void onModuleLoad() {
initMap();
}
private void initMap() {
MapOptions defaultMapOptions = new MapOptions();
MapWidget mapWidget = new MapWidget("684px", "330px", defaultMapOptions);
OSM osm_1 = OSM.Osmarender("Osmarender");
OSM osm_2 = OSM.Mapnik("Mapnik");
OSM osm_3 = OSM.CycleMap("CycleMap");
OSM osm_4 = OSM.Maplint("Maplint");
osm_1.setIsBaseLayer(true);
osm_2.setIsBaseLayer(true);
osm_3.setIsBaseLayer(true);
osm_4.setIsBaseLayer(true);
Map map = mapWidget.getMap();
map.addLayer(osm_1);
map.addLayer(osm_2);
map.addLayer(osm_3);
map.addLayer(osm_4);
map.addControl(new LayerSwitcher());
map.addControl(new MousePosition());
LonLat lonLat = new LonLat(6.95, 50.94);
lonLat.transform("EPSG:4326", "EPSG:900913");
map.setCenter(lonLat, 12);
RootPanel.get().add(mapWidget);
}
Does anybody know how to solve this problem?
After some research I can tell you that osmarender as well as maplint are not supported anymore: http://wiki.openstreetmap.org/wiki/Tiles#home
If you delete those to layers from your function (osm_1 and osm_4) everything works perfectly.
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.
the form from which i add the data.
ok.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
if (!voornaamTB.getText().equalsIgnoreCase("") && !achternaamTB.getText().equalsIgnoreCase("") && !emailTB.getText().equalsIgnoreCase("") && !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());
--> 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");
}
}
});
the controller class.
import java.util.ArrayList;
import com.vakantievibes.client.domein.Vakantieganger;
public class VakantiegangerController {
private String msg;
private ArrayList<Vakantieganger> vakantiegangers = new ArrayList<Vakantieganger>();
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;
}
}
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
the errors i recieve in eclipse.
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)
You get a NullPointerException. This happens because you are using a reference which is null. In your case this is one of the fields in the line that you marked.
Use a debugger, put a breakpoint on that line, and inspect which field in null.
Since you use all the variables, only VGC can be null at this time.
But I suspect this is a class name. My first guess is that the type VGC is part of the server API and not of the client API or something along these lines.