I can see from that log fragment that the JDBC driver is being loaded and registered (line 6 says so). So I would concentrate on this log entry:
SEVERE: Exception performing authentication
and look for configuration errors which might lead to that. By the way there wasn't any more log after what you posted, was there? I would sort of have expected another, lower-level, stack trace with lower-level detail.
I have relooked at the element in the servlet.xml, and changed the name of the roleNameCol column to role from type (changed on database too). is servlet.xml the only place where the JDBC Realm needs to be declared? Note the security Form works fine in my IDE environment so I don't image the HTML to be the problem.
Is there any other place to look for issues? for example, I still have the following element in my servlet.xml
That would seem to indicate that the userid and password you're using are not valid for the particular way that you're logging in (which should be via the loopback device on 127.0.0.1). You might want to have the PostgreSQL security config file checked. Also, if I'm not mistaken, the PostgreSQL server needs to be restarted when that file (pg_hba, I believe) is changed or the new credentials/access won't be usable.
1) I am in a shared hosting setup and do not have access to the pg_hba, after some discussion with my provider we found that ident authentication was set for the connection which was changed to explicitly use password authentication, not sure if this was the problem but I was able to access the database without the my password before this change.
2) Most likely the problem was with the driver. While I had a postgresql driver in the WEB_INF/lib for my app, I needed to add a driver to the tomcat/lib folder as well. I had a confounding problems with JDBCRealm and my app database working/not working.
Not sure exactly what it was in the end, a lot of mucking around on server.xml, web.xml as the and so forth so I learnt a lot in the process. Having resolved this issue, now working on my SSL.
I can't say anything definitive, but you should not be placing database driver jars in your webapp (WEB-INF/lib). That would cause classpath problems assuming that you're using a server-managed database connection pool - which you should be.
When I said "brute force", I meant having the usual class.forName lookup. You're using a Connection pool, all right, and I can't see anything obviously wrong. You say that you are throwing a JDBCException when you do the getConnection?