Sure I can! The problem was not in the connection itself, but how I was connecting. Before, I was trying to get the connection in the static initialization block, and then trying to perform a query on the DB. But this wasn't working, and when I try the query I got nullpointer exception, bc the connection was null.Now I just created an method to connect, and I call it before perform the query, checking previously that the connection is not null. Actually I don't really know why this happened, bc using the former way in my localhost (but connecting to remote DB) it worked...