title: WEKA: java.lang.IllegalArgumentException: Unknown data type: int4
body: <p>I'm trying to connect my <code>postgresql</code> database with <code>WEKA</code> in <code>Eclipse</code>. </p>
  
  <p>When i run the main I get this <code>exception</code>:</p>
  
  <pre><code>Exception in thread "main" java.lang.IllegalArgumentException: Unknown data type: int4. Add entry in weka/experiment/DatabaseUtils.props.
  If the type contains blanks, either escape them with a backslash or use underscores instead of blanks.
  </code></pre>
  
  <ul>
  <li>I downloaded WEKA 3-6-14</li>
  <li>I unzipped the weka.jar</li>
  <li>I changed the lines of the jdbc url and the jdbc driver in the file weka/experiment/DatabaseUtils.props.postgresql</li>
  <li>I added the data types that I use in my database</li>
  <li>I renamed the DatabaseUtils.props.postgresql file to DatabaseUtils.props</li>
  </ul>
  
  <p>This is a segment of my DatabaseUtils.props.postgresql file:</p>
  
  <pre><code># Database settings for PostgreSQL 7.4
  #
  # General information on database access can be found here:
  # http://weka.wikispaces.com/Databases
  #
  # url:     http://www.postgresql.org/
  # jdbc:    http://jdbc.postgresql.org/
  # author:  Fracpete (fracpete at waikato dot ac dot nz)
  # version: $Revision: 11887 $
  
  # JDBC driver (comma-separated list)
  jdbcDriver=org.postgresql.Driver
  
  # database URL
  jdbcURL=jdbc:postgresql://localhost:5432/datamining
  
  # specific data types
  string, getString() = 0;    --&gt; nominal
  boolean, getBoolean() = 1;  --&gt; nominal
  double, getDouble() = 2;    --&gt; numeric
  # byte, getByte() = 3;        --&gt; numeric
  # short, getByte()= 4;        --&gt; numeric
  int, getInteger() = 5;      --&gt; numeric
  # long, getLong() = 6;        --&gt; numeric
  # float, getFloat() = 7;      --&gt; numeric
  # date, getDate() = 8;        --&gt; date
  # text, getString() = 9;      --&gt; string
  # time, getTime() = 10;       --&gt; date
  # timestamp, getTime() = 11;  --&gt; date
  
  # PostgreSQL data types to Java classes information can be found at:
  # http://www.postgresql.org/message-id/AANLkTinsk4rwT7v-751bwQkgTN1rkA=8uE-jk69nape-@mail.gmail.com
  text=0
  boolean=1
  double=2
  int4=5
  </code></pre>
  
  <p>This is the code in my main method:</p>
  
  <pre><code>InstanceQuery query = new InstanceQuery();
      query.setUsername("username");
      query.setPassword("password");
      query.setQuery("SELECT * FROM database ORDER BY \"id\"");
      Instances data = query.retrieveInstances();
  </code></pre>
  
  <p>Can someone please tell me why I'm still getting the exception? </p>