title: Error detecting database type: Cannot create PoolableConnectionFactory (FATAL: no pg_hba.conf
body: <p>I am using pgAdmin3 and used the pkg to install postgreSQL and pg.
  I am trying to connect to postgreSQL through tomcat. When I do ./startup.sh from my tomcat /bin directory the log file shows this error: </p>
  
  <blockquote>
    <p>Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'metaModelDAO' defined in class path resource [applicationContext-coreDataServices.xml]: Invocation of init method failed; nested exception is org.apache.cayenne.CayenneRuntimeException: [v.3.0.1.LB Nov 16 2011 05:24:11] Error detecting database type: Cannot create PoolableConnectionFactory (FATAL: no pg_hba.conf entry for host "10.0.0.197", user "abc_writer", database "abc", SSL off)</p>
  </blockquote>
  
  <p>Here is what I have in my context.xml: </p>
  
  <pre><code>  &lt;Context&gt;
      &lt;Resource username="abc_writer" password="levelsbeyond"  
                url="jdbc:postgresql://localhost:5432/abc"
               type="javax.sql.DataSource" name="jdbc/abc-workflow" 
               maxWait="10000" maxIdle="20" maxActive="50"
               driverClassName="org.postgresql.Driver" auth="Container" /&gt; 
   &lt;/Context&gt;
  </code></pre>
  
  <p>And here is what my pg_hba.config looks like:</p>
  
  <pre><code># TYPE  DATABASE        USER            ADDRESS                 METHOD
  # "local" is for Unix domain socket connections only
  local   all             all                                     md5
  # IPv4 local connections:
  host    all             all             127.0.0.1/32            md5
  # IPv6 local connections:
  host    all             all             ::1/128                 md5
  # Allow replication connections from localhost, by a user with the
  # replication privilege.
  #local   replication     postgres                                md5
  #host    replication     postgres        127.0.0.1/32            md5
  #host    replication     postgres        ::1/128                 md5
  host     abc     abc_writer        10.0.0.197      md5
  </code></pre>
  
  <p>When I open up postmaster from postgresql/bin it reads this: </p>
  
  <pre><code> localhost:~ bryanraymond$ /Library/PostgreSQL/9.3/bin/postgres ; exit;
   postgres cannot access the server configuration file    
   "/Library/PostgreSQL/9.3/data/postgresql.conf": Permission denied
   logout
  </code></pre>
  
  <p>Would the reason that it says I have no entry in pg_hba.conf be because i dont have permission if so how do I get permission? If that is not the problem do I have something setup wrong?</p>
  
  <p>--- Thanks, Bryan</p>