Unsupported Operation Exception Java.Sql.Date : <p>hello i need to display a date column in a tableview; in the database I declare the field <code>fecha_nacimiento</code> as <code>date</code> , i used a <code>datepicker</code> to insert that data into the database, so far its Ok with that operation so the next step was formatting the tableview cell to display the date data correctly, with the help of this site i did that, but when i need to retrieve the date data from the database i am getting an error, something like this:</p>

<pre><code>Caused by: java.lang.UnsupportedOperationException
    at java.sql.Date.toInstant(Unknown Source)
</code></pre>

<p>this is some of my <code>controller</code> code</p>

<pre><code>public void initialize(URL arg0, ResourceBundle arg1) {
        clienteid.setCellValueFactory(new PropertyValueFactory &lt;Persona, Integer&gt;("id_cliente"));
        nombrescol.setCellValueFactory(new PropertyValueFactory &lt;Persona, String&gt;("nombres"));
         apellidoscol.setCellValueFactory(new PropertyValueFactory &lt;Persona, String&gt;("apellidos"));
        //fechacli.setCellValueFactory(new PropertyValueFactory &lt;Persona, LocalDate&gt;("fechacliente"));//

         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd/MM/yyyy");

         fechacli.setCellFactory(column -&gt; {
             return new TableCell&lt;Persona, LocalDate&gt;() {
                 @Override
                 protected void updateItem(LocalDate item, boolean empty) {
                     super.updateItem(item, empty);

                     if (item == null || empty) {
                         setText(null);
                     } else {
                         setText(formatter.format(item));

                     }
                 }
             };
         });

         seleccionaregistros();
         seleccionanombre();
         seleccionapellido(); 
    }



public void seleccionaregistros() {
        ObservableList &lt;Persona&gt; data =FXCollections.observableArrayList();
          Connection conn=null;{
              try {

                 conn = DriverManager.getConnection("jdbc:sqlserver://localhost:1433;databaseName=prueba", "sa", "milkas87");
                  Statement mostrar=conn.createStatement();
                  ResultSet rs;
                  rs= mostrar.executeQuery("select * from cliente");


                  while ( rs.next() ) 
                  {
                     data.add(new Persona(

                             rs.getString("nombre"),
                             rs.getString("apellido"),
                             rs.getInt("id"),
                             rs.getDate(4).toInstant().atZone(ZoneId.systemDefault()).toLocalDate())
                             );
                     tablacliente.setItems(data);
                  }

              } catch (SQLException e) {
                  e.printStackTrace();
              }

         }

    }
</code></pre>

<p>this is my <code>persona class</code> code</p>

<pre><code>package application;


import java.time.LocalDate;

import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

public class Persona {



    private StringProperty nombres;
    private StringProperty apellidos;
    private IntegerProperty id_cliente;
    private ObjectProperty &lt;LocalDate&gt;fechacliente;

    public Persona (String nombres, String apellidos, Integer id_cliente, LocalDate fechacliente) {
        this.nombres=  new SimpleStringProperty (nombres);
        this.apellidos= new SimpleStringProperty ( apellidos);
        this.id_cliente=new SimpleIntegerProperty (id_cliente);
        this.fechacliente= new SimpleObjectProperty&lt;&gt;(fechacliente);
    }


public LocalDate getFechaCliente() {
        return fechacliente.get();
}
public void setFechaCliente(LocalDate fechacliente) {
        this.fechacliente = new SimpleObjectProperty&lt;&gt;(fechacliente);
}
public ObjectProperty&lt;LocalDate&gt; fechaClienteProperty() {
        return fechacliente;
}

public String getNombres() {
    return nombres.get();
}

public  void  setNombres(String nombres) {
    this.nombres=new SimpleStringProperty (nombres);
}


public String getApellidos() {
    return apellidos.get();
}

public  void  setApellidos(String apellidos) {
    this.apellidos=new SimpleStringProperty ( apellidos);
}


public Integer getId_cliente() {
    return id_cliente.get();
}

public  void  setid_cliente(Integer id_cliente) {
    this.id_cliente=new SimpleIntegerProperty (id_cliente);
}

}
</code></pre>

<p>id have been reading, and i found that  can't truncate or pass the data beetween Localdate and Date, so any help could be truly helpful. regards.</p>

<p>all the errors here:</p>

<pre><code>javafx.fxml.LoadException: 
/C:/Users/ROA%20PC/eclipse-workspace/Conexion/bin/application/Vista.fxml

    at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2601)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2579)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3214)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3175)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3148)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3124)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3104)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:3097)
    at application.Main.start(Main.java:23)
    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)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.UnsupportedOperationException
    at java.sql.Date.toInstant(Unknown Source)
    at application.ConexionController.seleccionaregistros(ConexionController.java:190)
    at application.ConexionController.initialize(ConexionController.java:92)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2548)
    ... 17 more
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.NullPointerException: Root cannot be null
    at javafx.scene.Scene.&lt;init&gt;(Scene.java:336)
    at javafx.scene.Scene.&lt;init&gt;(Scene.java:235)
    at application.Main.start(Main.java:27)
    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
Exception running application application.Main
</code></pre>
