title: Getting SQLServerException makeFromDriverError message 'could not prepare statement' and 'The connection is closed'
body: <p>Recently as my production app has been increasing in users, I have started to receive the following errors (thousands):</p>
  
  <blockquote>
    <p>org.hibernate.exception.GenericJDBCException: could not prepare
    statement
        Problem Id:com.microsoft.sqlserver.jdbc.SQLServerException at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError</p>
    
    <p>The connection is closed.
        Problem Id:com.microsoft.sqlserver.jdbc.SQLServerException at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError</p>
  </blockquote>
  
  <p>Here are the full errors:</p>
  
  <pre><code> javax.persistence.PersistenceException:    at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert
   (AbstractEntityManagerImpl.java1763)    at
   org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert
   (AbstractEntityManagerImpl.java1694)    at
   org.hibernate.jpa.spi.AbstractEntityManagerImpl.find
   (AbstractEntityManagerImpl.java1141)    at
   org.hibernate.jpa.spi.AbstractEntityManagerImpl.find
   (AbstractEntityManagerImpl.java1068)    at
   sun.reflect.GeneratedMethodAccessor65.invoke    at
   sun.reflect.DelegatingMethodAccessorImpl.invoke
   (DelegatingMethodAccessorImpl.java43)    at
   java.lang.reflect.Method.invoke (Method.java498)    at
   org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke
   (SharedEntityManagerCreator.java241)    at com.sun.proxy.$Proxy51.find
   at com.adaptive.xxxxxxx.data.JPAPersistenceAdapter.find
   (JPAPersistenceAdapter.java27)    at
   com.adaptive.xxxxxxxxx.data.ChangeSetApplier2.applyChange
   (ChangeSetApplier2.java257)    at
   com.adaptive.xxxxxxxx.data.ChangeSetApplier2.applyChanges
   (ChangeSetApplier2.java59)    at
   com.adaptive.xxxxxxxx.services.EntityServiceImpl.applyChangeSet
   (EntityServiceImpl.java64)    at
   sun.reflect.GeneratedMethodAccessor98.invoke    at
   sun.reflect.DelegatingMethodAccessorImpl.invoke
   (DelegatingMethodAccessorImpl.java43)    at
   java.lang.reflect.Method.invoke (Method.java498)    at
   org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection
   (AopUtils.java317)    at
   org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint
   (ReflectiveMethodInvocation.java183)    at
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
   (ReflectiveMethodInvocation.java150)    at
   org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke
   (MethodSecurityInterceptor.java64)    at
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
   (ReflectiveMethodInvocation.java172)    at
   org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation
   (TransactionInterceptor.java96)    at
   org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction
   (TransactionAspectSupport.java260)    at
   org.springframework.transaction.interceptor.TransactionInterceptor.invoke
   (TransactionInterceptor.java94)    at
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
   (ReflectiveMethodInvocation.java172)    at
   org.granite.tide.spring.TideDataPublishingInterceptor$1.call
   (TideDataPublishingInterceptor.java78)    at
   org.granite.tide.spring.TideDataPublishingWrapper.execute
   (TideDataPublishingWrapper.java127)    at
   org.granite.tide.spring.TideDataPublishingInterceptor.invoke
   (TideDataPublishingInterceptor.java75)    at
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
   (ReflectiveMethodInvocation.java172)    at
   org.springframework.aop.framework.JdkDynamicAopProxy.invoke
   (JdkDynamicAopProxy.java204)    at
   com.sun.proxy.$Proxy61.applyChangeSet    at
   sun.reflect.GeneratedMethodAccessor736.invoke    at
   sun.reflect.DelegatingMethodAccessorImpl.invoke
   (DelegatingMethodAccessorImpl.java43)    at
   java.lang.reflect.Method.invoke (Method.java498)    at
   org.granite.messaging.service.ServiceInvocationContext.invoke
   (ServiceInvocationContext.java72)    at
   org.granite.messaging.service.security.AbstractSecurityService.endAuthorization
   (AbstractSecurityService.java108)    at
   org.granite.spring.security.SpringSecurity3Service.authorize
   (SpringSecurity3Service.java294)    at
   org.granite.messaging.service.ServiceInvoker.invoke
   (ServiceInvoker.java220)    at
   org.granite.messaging.amf.process.AMF3MessageProcessor.processRemotingMessage
   (AMF3MessageProcessor.java141)    at
   org.granite.messaging.amf.process.AMF3MessageProcessor.process
   (AMF3MessageProcessor.java60)    at
   org.granite.messaging.amf.process.AMF0MessageProcessor.process
   (AMF0MessageProcessor.java79)    at
   org.granite.messaging.webapp.AMFEndpoint.serviceAMF
   (AMFEndpoint.java91)    at
   org.granite.messaging.webapp.AMFEndpoint.service (AMFEndpoint.java66) 
   at org.granite.spring.ServerFilter.handle (ServerFilter.java331)    at
   org.springframework.web.servlet.DispatcherServlet.doDispatch
   (DispatcherServlet.java925)    at
   org.springframework.web.servlet.DispatcherServlet.doService
   (DispatcherServlet.java856)    at
   org.springframework.web.servlet.FrameworkServlet.processRequest
   (FrameworkServlet.java936)    at
   org.springframework.web.servlet.FrameworkServlet.doPost
   (FrameworkServlet.java838)    at
   javax.servlet.http.HttpServlet.service (HttpServlet.java648)    at
   org.springframework.web.servlet.FrameworkServlet.service
   (FrameworkServlet.java812)    at
   javax.servlet.http.HttpServlet.service (HttpServlet.java729)    at
   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
   (ApplicationFilterChain.java292)    at
   org.apache.catalina.core.ApplicationFilterChain.doFilter
   (ApplicationFilterChain.java207)    at
   org.apache.tomcat.websocket.server.WsFilter.doFilter (WsFilter.java52)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
   (ApplicationFilterChain.java240)    at
   org.apache.catalina.core.ApplicationFilterChain.doFilter
   (ApplicationFilterChain.java207)    at
   com.adaptive.xxxxxxxxx.servlet.CacheControlFilter.doFilter
   (CacheControlFilter.java13)    at
   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
   (ApplicationFilterChain.java240)    at
   org.apache.catalina.core.ApplicationFilterChain.doFilter
   (ApplicationFilterChain.java207)    at
   org.apache.catalina.core.StandardWrapperValve.invoke
   (StandardWrapperValve.java212)    at
   org.apache.catalina.core.StandardContextValve.invoke
   (StandardContextValve.java106)    at
   org.apache.catalina.authenticator.AuthenticatorBase.invoke
   (AuthenticatorBase.java502)    at
   org.apache.catalina.core.StandardHostValve.invoke
   (StandardHostValve.java141)    at
   org.apache.catalina.valves.ErrorReportValve.invoke
   (ErrorReportValve.java79)    at
   org.apache.catalina.valves.AbstractAccessLogValve.invoke
   (AbstractAccessLogValve.java616)    at
   org.apache.catalina.valves.rewrite.RewriteValve.invoke
   (RewriteValve.java480)    at
   org.apache.catalina.core.StandardEngineValve.invoke
   (StandardEngineValve.java88)    at
   org.apache.catalina.connector.CoyoteAdapter.service
   (CoyoteAdapter.java522)    at
   org.apache.coyote.http11.AbstractHttp11Processor.process
   (AbstractHttp11Processor.java1095)    at
   org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process
   (AbstractProtocol.java672)    at
   org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun
   (NioEndpoint.java1502)    at
   org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run
   (NioEndpoint.java1458)    at
   java.util.concurrent.ThreadPoolExecutor.runWorker
   (ThreadPoolExecutor.java1149)    at
   java.util.concurrent.ThreadPoolExecutor$Worker.run
   (ThreadPoolExecutor.java624)    at
   org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run
   (TaskThread.java61)    at java.lang.Thread.run (Thread.java748) Inner
   exception org.hibernate.exception.GenericJDBCException handled at
   org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert:    at
   org.hibernate.exception.internal.StandardSQLExceptionConverter.convert
   (StandardSQLExceptionConverter.java54)    at
   org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert
   (SqlExceptionHelper.java126)    at
   org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement
   (StatementPreparerImpl.java196)    at
   org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareQueryStatement
   (StatementPreparerImpl.java160)    at
   org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.prepareQueryStatement
   (AbstractLoadPlanBasedLoader.java257)    at
   org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeQueryStatement
   (AbstractLoadPlanBasedLoader.java201)    at
   org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad
   (AbstractLoadPlanBasedLoader.java137)    at
   org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad
   (AbstractLoadPlanBasedLoader.java102)    at
   org.hibernate.loader.entity.plan.AbstractLoadPlanBasedEntityLoader.load
   (AbstractLoadPlanBasedEntityLoader.java186)    at
   org.hibernate.persister.entity.AbstractEntityPersister.load
   (AbstractEntityPersister.java4126)    at
   org.hibernate.event.internal.DefaultLoadEventListener.loadFromDatasource
   (DefaultLoadEventListener.java503)    at
   org.hibernate.event.internal.DefaultLoadEventListener.doLoad
   (DefaultLoadEventListener.java468)    at
   org.hibernate.event.internal.DefaultLoadEventListener.load
   (DefaultLoadEventListener.java213)    at
   org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad
   (DefaultLoadEventListener.java275)    at
   org.hibernate.event.internal.DefaultLoadEventListener.onLoad
   (DefaultLoadEventListener.java151)    at
   org.hibernate.internal.SessionImpl.fireLoad (SessionImpl.java1106)   
   at org.hibernate.internal.SessionImpl.access$2000
   (SessionImpl.java176)    at
   org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.load
   (SessionImpl.java2587)    at org.hibernate.internal.SessionImpl.get
   (SessionImpl.java991)    at
   org.hibernate.jpa.spi.AbstractEntityManagerImpl.find
   (AbstractEntityManagerImpl.java1110)    at
   org.hibernate.jpa.spi.AbstractEntityManagerImpl.find
   (AbstractEntityManagerImpl.java1068)    at
   sun.reflect.GeneratedMethodAccessor65.invoke    at
   sun.reflect.DelegatingMethodAccessorImpl.invoke
   (DelegatingMethodAccessorImpl.java43)    at
   java.lang.reflect.Method.invoke (Method.java498)    at
   org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke
   (SharedEntityManagerCreator.java241)    at com.sun.proxy.$Proxy51.find
   at com.adaptive.xxxxxxx.data.JPAPersistenceAdapter.find
   (JPAPersistenceAdapter.java27)    at
   com.adaptive.xxxxxxxxx.data.ChangeSetApplier2.applyChange
   (ChangeSetApplier2.java257)    at
   com.adaptive.xxxxxxxxx.data.ChangeSetApplier2.applyChanges
   (ChangeSetApplier2.java59)    at
   com.adaptive.xxxxxxx.services.EntityServiceImpl.applyChangeSet
   (EntityServiceImpl.java64)    at
   sun.reflect.GeneratedMethodAccessor98.invoke    at
   sun.reflect.DelegatingMethodAccessorImpl.invoke
   (DelegatingMethodAccessorImpl.java43)    at
   java.lang.reflect.Method.invoke (Method.java498)    at
   org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection
   (AopUtils.java317)    at
   org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint
   (ReflectiveMethodInvocation.java183)    at
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
   (ReflectiveMethodInvocation.java150)    at
   org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke
   (MethodSecurityInterceptor.java64)    at
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
   (ReflectiveMethodInvocation.java172)    at
   org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation
   (TransactionInterceptor.java96)    at
   org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction
   (TransactionAspectSupport.java260)    at
   org.springframework.transaction.interceptor.TransactionInterceptor.invoke
   (TransactionInterceptor.java94)    at
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
   (ReflectiveMethodInvocation.java172)    at
   org.granite.tide.spring.TideDataPublishingInterceptor$1.call
   (TideDataPublishingInterceptor.java78)    at
   org.granite.tide.spring.TideDataPublishingWrapper.execute
   (TideDataPublishingWrapper.java127)    at
   org.granite.tide.spring.TideDataPublishingInterceptor.invoke
   (TideDataPublishingInterceptor.java75)    at
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
   (ReflectiveMethodInvocation.java172)    at
   org.springframework.aop.framework.JdkDynamicAopProxy.invoke
   (JdkDynamicAopProxy.java204)    at
   com.sun.proxy.$Proxy61.applyChangeSet    at
   sun.reflect.GeneratedMethodAccessor736.invoke    at
   sun.reflect.DelegatingMethodAccessorImpl.invoke
   (DelegatingMethodAccessorImpl.java43)    at
   java.lang.reflect.Method.invoke (Method.java498)    at
   org.granite.messaging.service.ServiceInvocationContext.invoke
   (ServiceInvocationContext.java72)    at
   org.granite.messaging.service.security.AbstractSecurityService.endAuthorization
   (AbstractSecurityService.java108)    at
   org.granite.spring.security.SpringSecurity3Service.authorize
   (SpringSecurity3Service.java294)    at
   org.granite.messaging.service.ServiceInvoker.invoke
   (ServiceInvoker.java220)    at
   org.granite.messaging.amf.process.AMF3MessageProcessor.processRemotingMessage
   (AMF3MessageProcessor.java141)    at
   org.granite.messaging.amf.process.AMF3MessageProcessor.process
   (AMF3MessageProcessor.java60)    at
   org.granite.messaging.amf.process.AMF0MessageProcessor.process
   (AMF0MessageProcessor.java79)    at
   org.granite.messaging.webapp.AMFEndpoint.serviceAMF
   (AMFEndpoint.java91)    at
   org.granite.messaging.webapp.AMFEndpoint.service (AMFEndpoint.java66) 
   at org.granite.spring.ServerFilter.handle (ServerFilter.java331)    at
   org.springframework.web.servlet.DispatcherServlet.doDispatch
   (DispatcherServlet.java925)    at
   org.springframework.web.servlet.DispatcherServlet.doService
   (DispatcherServlet.java856)    at
   org.springframework.web.servlet.FrameworkServlet.processRequest
   (FrameworkServlet.java936)    at
   org.springframework.web.servlet.FrameworkServlet.doPost
   (FrameworkServlet.java838)    at
   javax.servlet.http.HttpServlet.service (HttpServlet.java648)    at
   org.springframework.web.servlet.FrameworkServlet.service
   (FrameworkServlet.java812)    at
   javax.servlet.http.HttpServlet.service (HttpServlet.java729)    at
   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
   (ApplicationFilterChain.java292)    at
   org.apache.catalina.core.ApplicationFilterChain.doFilter
   (ApplicationFilterChain.java207)    at
   org.apache.tomcat.websocket.server.WsFilter.doFilter (WsFilter.java52)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
   (ApplicationFilterChain.java240)    at
   org.apache.catalina.core.ApplicationFilterChain.doFilter
   (ApplicationFilterChain.java207)    at
   com.adaptive.xxxxxx.servlet.CacheControlFilter.doFilter
   (CacheControlFilter.java13)    at
   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
   (ApplicationFilterChain.java240)    at
   org.apache.catalina.core.ApplicationFilterChain.doFilter
   (ApplicationFilterChain.java207)    at
   org.apache.catalina.core.StandardWrapperValve.invoke
   (StandardWrapperValve.java212)    at
   org.apache.catalina.core.StandardContextValve.invoke
   (StandardContextValve.java106)    at
   org.apache.catalina.authenticator.AuthenticatorBase.invoke
   (AuthenticatorBase.java502)    at
   org.apache.catalina.core.StandardHostValve.invoke
   (StandardHostValve.java141)    at
   org.apache.catalina.valves.ErrorReportValve.invoke
   (ErrorReportValve.java79)    at
   org.apache.catalina.valves.AbstractAccessLogValve.invoke
   (AbstractAccessLogValve.java616)    at
   org.apache.catalina.valves.rewrite.RewriteValve.invoke
   (RewriteValve.java480)    at
   org.apache.catalina.core.StandardEngineValve.invoke
   (StandardEngineValve.java88)    at
   org.apache.catalina.connector.CoyoteAdapter.service
   (CoyoteAdapter.java522)    at
   org.apache.coyote.http11.AbstractHttp11Processor.process
   (AbstractHttp11Processor.java1095)    at
   org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process
   (AbstractProtocol.java672)    at
   org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun
   (NioEndpoint.java1502)    at
   org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run
   (NioEndpoint.java1458)    at
   java.util.concurrent.ThreadPoolExecutor.runWorker
   (ThreadPoolExecutor.java1149)    at
   java.util.concurrent.ThreadPoolExecutor$Worker.run
   (ThreadPoolExecutor.java624)    at
   org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run
   (TaskThread.java61)    at java.lang.Thread.run (Thread.java748) Inner
   exception com.microsoft.sqlserver.jdbc.SQLServerException handled at
   org.hibernate.exception.internal.StandardSQLExceptionConverter.convert:
   at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError
   (SQLServerException.java191)    at
   com.microsoft.sqlserver.jdbc.SQLServerConnection.checkClosed
   (SQLServerConnection.java395)    at
   com.microsoft.sqlserver.jdbc.SQLServerConnection.prepareStatement
   (SQLServerConnection.java2292)    at
   com.microsoft.sqlserver.jdbc.SQLServerConnection.prepareStatement
   (SQLServerConnection.java1931)    at
   sun.reflect.GeneratedMethodAccessor731.invoke    at
   sun.reflect.DelegatingMethodAccessorImpl.invoke
   (DelegatingMethodAccessorImpl.java43)    at
   java.lang.reflect.Method.invoke (Method.java498)    at
   com.mchange.v2.c3p0.stmt.GooGooStatementCache$1StmtAcquireTask.run
   (GooGooStatementCache.java546)    at
   com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run
   (ThreadPoolAsynchronousRunner.java648)
   com.microsoft.sqlserver.jdbc.SQLServerException:    at
   com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError
   (SQLServerException.java191)    at
   com.microsoft.sqlserver.jdbc.SQLServerConnection.checkClosed
   (SQLServerConnection.java395)    at
   com.microsoft.sqlserver.jdbc.SQLServerConnection.prepareStatement
   (SQLServerConnection.java2292)    at
   com.microsoft.sqlserver.jdbc.SQLServerConnection.prepareStatement
   (SQLServerConnection.java1931)    at
   sun.reflect.GeneratedMethodAccessor731.invoke    at
   sun.reflect.DelegatingMethodAccessorImpl.invoke
   (DelegatingMethodAccessorImpl.java43)    at
   java.lang.reflect.Method.invoke (Method.java498)    at
   com.mchange.v2.c3p0.stmt.GooGooStatementCache$1StmtAcquireTask.run
   (GooGooStatementCache.java546)    at
   com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run
   (ThreadPoolAsynchronousRunner.java648)
  </code></pre>
  
  <p>I am wondering if it has to do with c3p0 connection pooling.</p>
  
  <p>I am not 100% if the information is being taken from the app-config file, vs the hibernate.properties file.</p>
  
  <p>I have attached both files, as well, you can see the relevant information included inline below:</p>
  
  <p>app-config.xml:</p>
  
  <pre><code>&lt;!-- Data source --
      &lt;bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"
  
          &lt;property name="driverClass" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" /
  
          &lt;property name="jdbcUrl" value="jdbc:sqlserver://xxxxxxxx.database.windows.net:1433;database=XXXXX;user=XXXXXXXX;password=XXXXXXXXX;encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30;" /
  
          &lt;!-- Pool properties --
          &lt;property name="minPoolSize" value="3" /
          &lt;property name="maxPoolSize" value="120" /
          &lt;property name="maxStatements" value="120" /
          &lt;property name="preferredTestQuery" value="SELECT 1" /
          &lt;property name="maxIdleTime" value="300" /
          &lt;property name="testConnectionOnCheckin" value="true" /
          &lt;property name="idleConnectionTestPeriod" value="30" /
      &lt;/bean&gt;
  </code></pre>
  
  <p>hibernate.properties:</p>
  
  <pre><code># JDBC Connection information
  jdbc.driverClassName=com.mysql.jdbc.Driver
  jdbc.url=jdbc:mysql://localhost/mkbkwebgds
  jdbc.username=xxxxxxxx
  jdbc.password=xxxxxxxxxxx
  # Hibernate 3 configuration
  hibernate.show_sql=true
  hibernate.format_sql=true
  hibernate.jdbc.batch_size=20
          hibernate.connection.provider_class=org.hibernate.connection.C3P0ConnectionProvider
  hibernate.transaction.factory_class=org.hibernate.transaction.JDBCTransactionFactory
  hibernate.dialect=org.hibernate.dialect.MySQLDialect
  hibernate.hbm2ddl.auto=update
  hibernate.c3p0.acquire_increment=3
  hibernate.c3p0.idle_test_period=1000
  hibernate.c3p0.timeout=2520
  hibernate.c3p0.min_size=3
  hibernate.c3p0.max_size=20
  hibernate.c3p0.max_statements=0
  hibernate.c3p0.preferredTestQuery=select 1;
  </code></pre>
  
  <p>I had not changed anything in the app or on the server since starting to find these errors.</p>
  
  <p>Any help to solve this would be greatly appreciated.</p>