title: Failed to create sessionFactory object.org.hibernate.exception.JDBCConnectionException: Error calling Driver#connect
body: <p>I try to connect to the database, which is on remote server. I use <code>jdk 1.7.0_60</code>, <code>Hibernate-release-4.3.5</code> final. 
  In project are included following jars:</p>
  
  <pre><code>antlr-2.7.7.jar;
  dom4j-1.6.1.jar,
  
  hibernate-commons-annotations-4.04.Final.jar,
  hibernate-core-4.3.5.Final.jar, hibernate-entitymanager-4.3.5.Final.jar, javassist-3.18.1-GA.jar, jboss-logging-3.1.3.GA.jar, jboss-logging-annotations-1.2.0.Beta1.jar,jboss-transaction-api_1.2_spec-1.0.0.Final.jar, mysql-connector-java-5.1.30-bin.jar.
  </code></pre>
  
  <p>the  exception is following:     </p>
  
  <pre><code>Jun 14, 2014 7:31:56 PM  org.hibernate.annotations.common.reflection.java.JavaReflectionManager &lt;clinit&gt;
  INFO: HCANN000001: Hibernate Commons Annotations {4.0.4.Final}
  Jun 14, 2014 7:31:56 PM org.hibernate.Version logVersion
  INFO: HHH000412: Hibernate Core {4.3.5.Final}
  Jun 14, 2014 7:31:56 PM org.hibernate.cfg.Environment &lt;clinit&gt;
  INFO: HHH000206: hibernate.properties not found
  Jun 14, 2014 7:31:56 PM org.hibernate.cfg.Environment buildBytecodeProvider
  INFO: HHH000021: Bytecode provider name : javassist
  Jun 14, 2014 7:31:56 PM org.hibernate.cfg.Configuration configure
  INFO: HHH000043: Configuring from resource: swmhibernate.cfg.xml
  Jun 14, 2014 7:31:56 PM org.hibernate.cfg.Configuration getConfigurationInputStream
  INFO: HHH000040: Configuration resource: swmhibernate.cfg.xml
  Jun 14, 2014 7:31:56 PM org.hibernate.cfg.Configuration doConfigure
  INFO: HHH000041: Configured SessionFactory: null
  Jun 14, 2014 7:31:57 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
  WARN: HHH000402: Using Hibernate built-in connection pool (not for production use!)
  Jun 14, 2014 7:31:57 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
  INFO: HHH000401: using driver [com.mysql.jdbc.Driver] at URL   [jdbc:mysql://sopro.informatik.uni-augsburg.de:3306/team02]
  Jun 14, 2014 7:31:57 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
  INFO: HHH000046: Connection properties: {user=team02, password=****, autocommit=false}
  Jun 14, 2014 7:31:57 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
  INFO: HHH000006: Autocommit mode: false
  Jun 14, 2014 7:31:57 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
  INFO: HHH000115: Hibernate connection pool size: 1 (min=1)
  Failed to create sessionFactory object.org.hibernate.exception.JDBCConnectionException:   Error calling Driver#connect
  Exception in thread "main" java.lang.ExceptionInInitializerError
  at de.swm.hibernate.Funktionen.main(Funktionen.java:25)
  Caused by: org.hibernate.exception.JDBCConnectionException: Error calling Driver#connect
  at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:132)
  at org.hibernate.engine.jdbc.connections.internal.BasicConnectionCreator$1$1.convert(BasicConnectionCreator.java:118)
  at org.hibernate.engine.jdbc.connections.internal.BasicConnectionCreator.convertSqlException(BasicConnectionCreator.java:140)
  at org.hibernate.engine.jdbc.connections.internal.DriverConnectionCreator.makeConnection(DriverConnectionCreator.java:58)
  at org.hibernate.engine.jdbc.connections.internal.BasicConnectionCreator.createConnection(BasicConnectionCreator.java:75)
  at org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl.configure(DriverManagerConnectionProviderImpl.java:106)
  at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111)
  at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234)
  at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)
  at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.buildJdbcConnectionAccess(JdbcServicesImpl.java:260)
  at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:94)
  at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111)
  at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234)
  at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)
  at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1885)
  at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1843)
  at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1928)
  at de.swm.hibernate.Funktionen.main(Funktionen.java:22)
  Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
  
  The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
  at java.lang.reflect.Constructor.newInstance(Unknown Source)
  at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
  at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1127)
  at com.mysql.jdbc.MysqlIO.&lt;init&gt;(MysqlIO.java:356)
  at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2502)
  at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2539)
  at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2321)
  at com.mysql.jdbc.ConnectionImpl.&lt;init&gt;(ConnectionImpl.java:832)
  at com.mysql.jdbc.JDBC4Connection.&lt;init&gt;(JDBC4Connection.java:46)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
  at java.lang.reflect.Constructor.newInstance(Unknown Source)
  at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
  at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:417)
  at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:344)
  at org.hibernate.engine.jdbc.connections.internal.DriverConnectionCreator.makeConnection(DriverConnectionCreator.java:55)
  ... 14 more
  Caused by: java.net.ConnectException: Connection timed out: connect
  at java.net.DualStackPlainSocketImpl.connect0(Native Method)
  at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
  at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
  at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
  at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
  at java.net.PlainSocketImpl.connect(Unknown Source)
  at java.net.SocksSocketImpl.connect(Unknown Source)
  at java.net.Socket.connect(Unknown Source)
  at java.net.Socket.connect(Unknown Source)
  at java.net.Socket.&lt;init&gt;(Unknown Source)
  at java.net.Socket.&lt;init&gt;(Unknown Source)
  at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:258)
  at com.mysql.jdbc.MysqlIO.&lt;init&gt;(MysqlIO.java:306)
  ... 27 more
  </code></pre>
  
  <p>The configuration-file is: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE hibernate-configuration SYSTEM "http://www.hibernate.org/dtd/hibernate-  configuration-3.0.dtd"&gt;
  &lt;hibernate-configuration&gt;
  &lt;session-factory&gt;
  &lt;!-- connecting to the database --&gt; 
  &lt;property 
  
  name="hibernate.connection.driver_class"&gt;com.mysql.jdbc.Driver&lt;/property&gt;
  &lt;property 
  
  name="hibernate.connection.url"&gt;jdbc:mysql://host:3306/team02&lt;/property&gt; 
  &lt;property name="connection.username"&gt;name&lt;/property&gt;
  &lt;property name="connection.password"&gt;****** &lt;/property&gt;  
  
  
  &lt;property name="connection.pool_size"&gt;1&lt;/property&gt;
  
  &lt;property name="dialect"&gt;org.hibernate.dialect.MySQLDialect&lt;/property&gt;
  
   &lt;property name="hibernate.connection.autocommit"&gt;false&lt;/property&gt;
   &lt;property name="show_sql"&gt;true&lt;/property&gt;
   &lt;property name="format_sql"&gt;true&lt;/property&gt;
   &lt;property name="use_sql_comments"&gt;true&lt;/property&gt;
   &lt;property name="hbm2ddl.auto"&gt;update&lt;/property&gt;
   &lt;!-- for jdbc transaction --&gt;
   &lt;property name="hibernate.transaction.factory_class"&gt;org.hibernate.transaction.JDBCTransactionFactory&lt;/property&gt;
  
   &lt;!-- mapping file --&gt;
   &lt;mapping class="de.swm.hibernate.Address"/&gt;
   &lt;mapping class="de.swm.hibernate.Plant"/&gt;
   &lt;mapping class="de.swm.hibernate.Plantprocessinfo"/&gt;
   &lt;mapping class="de.swm.hibernate.User"/&gt;
   &lt;mapping class="de.swm.hibernate.Directmarketing"/&gt;
   &lt;mapping class="de.swm.hibernate.Account"/&gt;
   &lt;mapping class="de.swm.hibernate.Customer"/&gt;
   &lt;mapping class="de.swm.hibernate.Report"/&gt;
   &lt;mapping class="de.swm.hibernate.Mrl"/&gt;
   &lt;mapping class="de.swm.hibernate.Srl"/&gt;
   &lt;mapping class="de.swm.hibernate.MrlmarketingInfo"/&gt;
   &lt;mapping class="de.swm.hibernate.Srl_outputpreis"/&gt;
    &lt;mapping class="de.swm.hibernate.Srl_workprice"/&gt;
   &lt;mapping class="de.swm.hibernate.InvoiceMailingaddress"/&gt;
  
  &lt;/session-factory&gt;
  </code></pre>
  
  <p></p>
  
  <p>How can I solve this problem?</p>