• Having some trouble connection to a Postgres database in Ubuntu 16.04
  • I am getting this error
    Code:
    exception: java.sql.SQLException: Unable to find a suitable driver for jdbc:postgresql://localhost:5432/cmpd
  • Here is what I have tried.


1. Set set my JDBC driver in CLASSPATH
Code:
> echo $CLASSPATH
> /home/rasedgwick/Programs/jars/postgresql-42.1.4.jar
2. I have moved the DatabaseUtils.props.postgresql file into Wekas home directory and remaned it DatabaseUtils.props
  • I have updated this file as such

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: 11885 $


# JDBC driver (comma-separated list)
jdbcDriver=org.postgresql.Driver


# database URL
jdbcURL=jdbc:postgresql://localhost:5432/cmpd
3. My connection URL in WEKA
Code:
jdbc:postgresql://localhost:5432/cmpd