title: iReports won't read my JavaBeans datasource, but it does load the class file
body: <p>I've been losing my mind over this for the past week. I've tried tons of tutorials and forums, but nothing works.</p>
  
  <p>Here's the overview: I want to display JavaBean objects in a simple table. I've created the JavaBean object, I've set the classpath, but iReport just won't work with it no matter what I try. Here's the entire Java code:</p>
  
  <pre><code>package mypack;
  public class Person
  {
  
      private String name;
  
      private static Person[] data = {new Person("John"), new Person("Mark")};
  
  
      public Person() {}
  
      public Person(String newName) { name = newName; }
  
  
      public String getName() { return name; }
  
      public void setName(String newName) { name = newName; }
  
  
      public static Person[] getPersons() { return data; }
  }
  </code></pre>
  
  <p>In iReport, I've created a new "JavaBeans set datasource" connection. Here's how it's filled:</p>
  
  <p><img src="https://i.stack.imgur.com/3z0Re.png" alt="iReport"></p>
  
  <p>However, when I click on "Test", nothing at all happens. No error but no data either. If Ichange the name of the factory class, then I will get the "class not found" exception, so iReport obviously did load my class, but it's still not working.</p>
  
  <p>I really have no idea what I'm doing wrong in the Java file, because iReport seems to load it fine, but can't "talk" with it.</p>
  
  <p>I've created the Java class with Eclipse Juno and I'm using iReport 4.6.0. Any help woud be really appreciated.</p>