I'm working on a project that makes use of Hibernate
.
When I try to do mvn clean install
from command line (Terminal), the build passes (once the SOCKS proxy is disabled).
When I try to run a mvn clean install
from within Eclipse
(Run As > Run Configuration), I get a Caused by: java.net.ConnectException: Connection refused (Connection refused)
for pretty much every test (involving Hibernate) we have. (Top of stack: org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection
; Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Network error IOException: Connection refused (Connection refused))
)
I have tried to force the bash environment variables into Eclipse using the suggestion from here: https://stackoverflow.com/a/28424943/2018047
So, in theory - I thought - both, maven from Terminal, and maven from Eclipse should run with the exact same settings. But apparently they don't (as only the Eclipse one fails). Any suggestions where to start to figure out what's wrong? (My bet is on the proxy settings, but I don't even know how to figure out what the test is trying to connect to at runtime, and if the host name is correct or if a proxy does get picked up...)