title: JavaFX setCellValueFactory cannot retrieve property IllegalAcessException
body: <p>I've checked at least 20 other threads on the subject and tried to debug this the best I can, but I have no clue why it won't work. I want my "addButton" to add my data into my TableView from the TextBoxes when the button is pressed. </p>
  
  <p>My data class:</p>
  
  <pre><code>package org.application;
  
  import javafx.beans.property.SimpleStringProperty;
  
  public class Credits {
      private SimpleStringProperty title;
      private SimpleStringProperty occupation;
      private SimpleStringProperty person;
  
      public Credits (String title, String occupation, String person){
          this.title = new SimpleStringProperty(title);
          this.occupation = new SimpleStringProperty(occupation);
          this.person = new SimpleStringProperty(person);
      }
  
      public String getTitle() {
          return this.title.get();
      }
  
      public void setTitle(String title) {
          this.title.set(title);
      }
  
      public String getOccupation() {
          return this.occupation.get();
      }
  
      public void setOccupation(String occupation) {
          this.occupation.set(occupation);
      }
  
      public String getPerson() {
          return this.person.get();
      }
  
      public void setPerson(String name) {
          this.person.set(name);
      }
  
  }
  </code></pre>
  
  <p>Snippit of the important part of my Controller class</p>
  
  <pre><code>    public Button searchButton;
      public Button addButton;
      public Button deleteButton;
      public Button updateButton;
      public TextField searchBox;
      public TextField setTitleBox;
      public TextField setOccupationBox;
      public TextField setPersonBox;
      public TableView creditTable;
      public TableColumn title;
      public TableColumn occupation;
      public TableColumn person;
      public ListView test;
  
      final ObservableList&lt;Credits&gt; credits = FXCollections.observableArrayList();
  
      public void initialize() {
          title.setCellValueFactory(new PropertyValueFactory&lt;Credits, String&gt;("title"));
          occupation.setCellValueFactory(new PropertyValueFactory&lt;Credits, String&gt;("occupation"));
          person.setCellValueFactory(new PropertyValueFactory&lt;Credits, String&gt;("person"));
      }
  
      public void addButton(ActionEvent event) {
          String title = setTitleBox.getText();
          String occupation = setOccupationBox.getText();
          String person = setPersonBox.getText();
          credits.add(new Credits(title, occupation, person));
          creditTable.setItems(credits);
      }
  </code></pre>
  
  <p>fxml file:</p>
  
  <pre><code>&lt;AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="800.0" styleClass="rightSide" stylesheets="@../../ECMS.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.presentation.MainMenu"&gt;
     &lt;children&gt;
        &lt;Button fx:id="loginButton" layoutX="14.0" layoutY="14.0" mnemonicParsing="false" onAction="#switchToLoginScreen" styleClass="loginButton" text="Login" /&gt;
        &lt;TextField fx:id="searchBox" layoutX="14.0" layoutY="108.0" prefHeight="30.0" prefWidth="195.0" promptText="Name" /&gt;
        &lt;Button fx:id="searchButton" layoutX="214.0" layoutY="108.0" mnemonicParsing="false" prefHeight="30.0" prefWidth="100.0" styleClass="loginButton" text="Search" /&gt;
        &lt;Button fx:id="helpButton" layoutX="63.0" layoutY="14.0" mnemonicParsing="false" onAction="#switchToHelpPopup" styleClass="loginButton" text="Help" /&gt;
        &lt;Label layoutX="14.0" layoutY="86.0" prefHeight="17.0" prefWidth="162.0" text="Search for productions:"&gt;
  
           &lt;font&gt;
              &lt;Font name="Ebrima Bold" size="14.0" /&gt;
           &lt;/font&gt;&lt;/Label&gt;
        &lt;ListView fx:id="test" layoutX="14.0" layoutY="143.0" prefHeight="450.0" prefWidth="300.0" /&gt;
        &lt;Button fx:id="closeButton" layoutX="775.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#closeButtonAction" prefHeight="20.0" prefWidth="25.0" styleClass="closeButton" text="X"&gt;
           &lt;font&gt;
              &lt;Font name="Eras Bold ITC" size="12.0" /&gt;
           &lt;/font&gt;&lt;/Button&gt;
        &lt;Button fx:id="addButton" layoutX="363.0" layoutY="93.0" mnemonicParsing="false" onAction="#addButton" prefHeight="31.0" prefWidth="100.0" text="Add" /&gt;
        &lt;Button fx:id="deleteButton" layoutX="504.0" layoutY="93.0" mnemonicParsing="false" prefHeight="31.0" prefWidth="100.0" text="Delete" /&gt;
        &lt;Button fx:id="updateButton" layoutX="652.0" layoutY="93.0" mnemonicParsing="false" prefHeight="31.0" prefWidth="100.0" text="Update" /&gt;
        &lt;TableView fx:id="creditTable" editable="true" layoutX="332.0" layoutY="143.0" prefHeight="450.0" prefWidth="450.0"&gt;
          &lt;columns&gt;
            &lt;TableColumn fx:id="title" prefWidth="147.0" text="Title" /&gt;
            &lt;TableColumn fx:id="occupation" minWidth="0.0" prefWidth="132.0" text="Occupation" /&gt;
              &lt;TableColumn fx:id="person" minWidth="-1.0" prefWidth="170.0" text="Person" /&gt;
          &lt;/columns&gt;
        &lt;/TableView&gt;
        &lt;TextField fx:id="setPersonBox" layoutX="634.0" layoutY="54.0" prefHeight="30.0" prefWidth="136.0" promptText="Person" /&gt;
        &lt;Label layoutX="500.0" layoutY="30.0" prefHeight="18.0" prefWidth="114.0" text="Add production:"&gt;
           &lt;font&gt;
              &lt;Font name="Ebrima Bold" size="14.0" /&gt;
           &lt;/font&gt;
        &lt;/Label&gt;
        &lt;TextField fx:id="setOccupationBox" layoutX="489.0" layoutY="54.0" prefHeight="30.0" prefWidth="136.0" promptText="Occupation" /&gt;
        &lt;TextField fx:id="setTitleBox" layoutX="345.0" layoutY="54.0" prefHeight="30.0" prefWidth="136.0" promptText="Title" /&gt;
     &lt;/children&gt;
  &lt;/AnchorPane&gt;
  </code></pre>
  
  <p>The error: (It does this error for every one of the 3 CellProperty lines, this is just 1 but they are all pretty much identical).</p>
  
  <pre><code>Apr 19, 2020 7:20:12 PM javafx.scene.control.cell.PropertyValueFactory getCellDataReflectively
  WARNING: Can not retrieve property 'title' in PropertyValueFactory: javafx.scene.control.cell.PropertyValueFactory@210cabaf with provided class type: class org.application.Credits
  java.lang.RuntimeException: java.lang.IllegalAccessException: module javafx.base cannot access class org.application.Credits (in module org.example) because module org.example does not open org.application to javafx.base
      at javafx.base/com.sun.javafx.property.PropertyReference.get(PropertyReference.java:176)
      at javafx.controls/javafx.scene.control.cell.PropertyValueFactory.getCellDataReflectively(PropertyValueFactory.java:184)
      at javafx.controls/javafx.scene.control.cell.PropertyValueFactory.call(PropertyValueFactory.java:154)
      at javafx.controls/javafx.scene.control.cell.PropertyValueFactory.call(PropertyValueFactory.java:133)
      at javafx.controls/javafx.scene.control.TableColumn.getCellObservableValue(TableColumn.java:593)
      at javafx.controls/javafx.scene.control.TableColumn.getCellObservableValue(TableColumn.java:578)
      at javafx.controls/javafx.scene.control.TableCell.updateItem(TableCell.java:646)
      at javafx.controls/javafx.scene.control.TableCell.indexChanged(TableCell.java:469)
      at javafx.controls/javafx.scene.control.IndexedCell.updateIndex(IndexedCell.java:120)
      at javafx.controls/javafx.scene.control.skin.TableRowSkinBase.updateCells(TableRowSkinBase.java:539)
      at javafx.controls/javafx.scene.control.skin.TableRowSkinBase.&lt;init&gt;(TableRowSkinBase.java:159)
      at javafx.controls/javafx.scene.control.skin.TableRowSkin.&lt;init&gt;(TableRowSkin.java:89)
      at javafx.controls/javafx.scene.control.TableRow.createDefaultSkin(TableRow.java:213)
      at javafx.controls/javafx.scene.control.Control.doProcessCSS(Control.java:897)
      at javafx.controls/javafx.scene.control.Control$1.doProcessCSS(Control.java:89)
      at javafx.controls/com.sun.javafx.scene.control.ControlHelper.processCSSImpl(ControlHelper.java:67)
      at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
      at javafx.graphics/javafx.scene.Node.processCSS(Node.java:9540)
      at javafx.graphics/javafx.scene.Node.applyCss(Node.java:9627)
      at javafx.controls/javafx.scene.control.skin.VirtualFlow.setCellIndex(VirtualFlow.java:1749)
      at javafx.controls/javafx.scene.control.skin.VirtualFlow.getCell(VirtualFlow.java:1726)
      at javafx.controls/javafx.scene.control.skin.VirtualFlow.getCellLength(VirtualFlow.java:1852)
      at javafx.controls/javafx.scene.control.skin.VirtualFlow.computeViewportOffset(VirtualFlow.java:2755)
      at javafx.controls/javafx.scene.control.skin.VirtualFlow.layoutChildren(VirtualFlow.java:1245)
      at javafx.graphics/javafx.scene.Parent.layout(Parent.java:1206)
      at javafx.graphics/javafx.scene.Parent.layout(Parent.java:1213)
      at javafx.graphics/javafx.scene.Parent.layout(Parent.java:1213)
      at javafx.graphics/javafx.scene.Scene.doLayoutPass(Scene.java:576)
      at javafx.graphics/javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2482)
      at javafx.graphics/com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:412)
      at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
      at javafx.graphics/com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:411)
      at javafx.graphics/com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:438)
      at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:563)
      at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:543)
      at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:536)
      at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:342)
      at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
      at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
      at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
      at java.base/java.lang.Thread.run(Thread.java:832)
  Caused by: java.lang.IllegalAccessException: module javafx.base cannot access class org.application.Credits (in module org.example) because module org.example does not open org.application to javafx.base
      at javafx.base/com.sun.javafx.property.MethodHelper.invoke(MethodHelper.java:69)
      at javafx.base/com.sun.javafx.property.PropertyReference.get(PropertyReference.java:174)
      ... 40 more
  </code></pre>