Getting this error "at java.lang.reflect.Method.invoke(Method.java:497)" while running javafx program
<p>I am new in javafx. I am building a basic program in javafx.
But getting error "at java.lang.reflect.Method.invoke(Method.java:497)" while running the program ...........
program is: </p>

<pre><code>package myjfxapp;

import com.sun.javaws.Main;
import java.io.IOException;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.fxml.FXMLLoader;
import javafx.scene.control.Button;
import javafx.scene.layout.Pane;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;


public class NewFXMain extends Application {

    @Override
    public void start(Stage primaryStage) throws IOException {

FXMLLoader loader = new FXMLLoader(Main.class.getResource("main.fxml"));
        Pane root = loader.load();
        Scene scene = new Scene(root);
        primaryStage.setTitle("Hello World!");
        primaryStage.setScene(scene);
        primaryStage.show();
    }
    public static void main(String[] args) {
        launch(args);
    }

}
</code></pre>

<p>Fxml code: </p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;

&lt;?import javafx.scene.control.Button?&gt;
&lt;?import javafx.scene.control.CheckBox?&gt;
&lt;?import javafx.scene.layout.AnchorPane?&gt;


&lt;AnchorPane id="AnchorPane" prefHeight="400.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8.0.60"&gt;
   &lt;children&gt;
      &lt;Button layoutX="221.0" layoutY="58.0" mnemonicParsing="false" text="Button" /&gt;
      &lt;CheckBox layoutX="211.0" layoutY="152.0" mnemonicParsing="false" text="CheckBox" /&gt;
   &lt;/children&gt;
&lt;/AnchorPane&gt;
</code></pre>

<p>Stack trace:</p>

<pre><code>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:497)
    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)
</code></pre>

<p>Your help will be obliged....</p>