You should try this:
C:\test>java -cp c:\test\postgresql-8.1-404.jdbc3.jar;c:\test JDBCExample
NOT
C:\test>java -cp c:\test\postgresql-8.1-404.jdbc3.jar;c:\test\JDBCExample.java
AND NOT
C:\test>java -cp c:\test\postgresql-8.1-404.jdbc3.jar;c:\test\JDBCExample
OK, we are sure that your DB is accessible from the code.
You gave us the exception:
org.springframework.transaction.CannotCreateTransactionException : Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
null
Please paste the full stack trace despite the fact that it can be very long.