title: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
body: <p>I started to develop an application in GWT. First I tried a simple login. When user hits the login button, an async call checks on server if the username and password are in the database.
  When I run this on server side only (in a simple main() method) it works fine. But when I try it in my browser with GWT (which actually call the same method at last) it throws the following exception (in short):</p>
  
  <p><code>javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.DatabaseException
  Internal Exception: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
  Error Code: 17002</code></p>
  
  <p>I noticed that <code>EntityManagerFactory emf = Persistence.createEntityManagerFactory(...)</code> is ok, exception is thrown on <code>EntityManager em = emf.createEntityManager();</code></p>
  
  <p>Any help would be appreciated.</p>