How can I solve the PSQLException when starting the app server after changing my DB server IP address?

You might need to replace the old IP address with the new IP address in the <connection-url> block of the file sourceforge-postgres-ds.xml, located in /usr/local/sourceforge/jboss/jboss-3.2.6/server/default/deploy.

This issue may occur after changing the IP address of the database server and making the corresponding IP changes in pg_hba.conf, /etc/hosts and postgresql.conf files. The following error may appear when starting the application server though you are able to login to the DB server from the app server.
[JBossManagedConnectionPool] Throwable while attempting to get a new connection: null 
org.jboss.resource.JBossResourceException: Could not create connection; - nested
throwable: (org.postgresql.util.PSQLException: Connection refused. 
Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.