title: Max User Connection issue with Hibernate and Java
body: <p>I am using following code for database connection with Hibernate and Java specified in my applicationcontext file,</p>
  <pre><code>&lt;bean id=&quot;DataSource&quot; class=&quot;com.mchange.v2.c3p0.ComboPooledDataSource&quot; destroy-method=&quot;close&quot;&gt;
      &lt;property name=&quot;driverClass&quot; value=&quot;com.mysql.jdbc.Driver&quot; /&gt;   
      &lt;property name=&quot;jdbcUrl&quot; value=&quot;jdbc:mysql://localhost:3306/database?useUnicode=true&amp;amp;characterEncoding=UTF-8&quot; /&gt;    
      &lt;property name=&quot;user&quot; value=&quot;admin&quot; /&gt;  
      &lt;property name=&quot;password&quot; value=&quot;pass&quot; /&gt;   
      &lt;property name=&quot;maxPoolSize&quot; value=&quot;10&quot; /&gt;
      &lt;property name=&quot;maxStatements&quot; value=&quot;10&quot; /&gt;
      &lt;property name=&quot;minPoolSize&quot; value=&quot;5&quot; /&gt;        
      &lt;property name=&quot;initialPoolSize&quot; value=&quot;10&quot; /&gt;
      &lt;property name=&quot;maxIdleTime&quot; value=&quot;120&quot; /&gt;
      &lt;property name=&quot;numHelperThreads&quot; value=&quot;1&quot; /&gt;
      &lt;property name=&quot;preferredTestQuery&quot; value=&quot;SELECT 1&quot; /&gt;
    &lt;/bean&gt;
  </code></pre>
  <p>on the server after sometime it gives following error</p>
  <blockquote>
  <p>com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask run
  WARNING:
  com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@198c333 --</p>
  <p>Acquisition Attempt Failed!!! Clearing pending acquires. While trying
  to acquire a needed new resource, we failed to succeed more than the
  maximum number of allowed acquisition attempts (30).
  Last acquisition attempt exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: User admin already has more than 'max_user_connections' active connections</p>
  </blockquote>
  <p>can anyone let me know where I m going wrong</p>