title: Spring Hibernate Application takes a lot of time to start on Tomcat
body: <p>I am writing a simple <em>Spring / Hibernate</em> application which has to query a remote <em>Oracle 12</em> database and return a row of data.</p>
  
  <p>The issue is that the <em>Tomcat</em> server is taking a lot of time to startup and never does when launched through <em>Eclipse</em>.</p>
  
  <p>It gets stuck in the logs given below:</p>
  
  <pre><code>INFO: HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect
  Sep 22, 2017 6:57:55 PM         org.hibernate.engine.jdbc.env.internal.LobCreatorBuilderImpl    makeLobCreatorBuilder
  INFO: HHH000422: Disabling contextual LOB creation as connection was null
  Sep 22, 2017 6:57:56 PM com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource 
  INFO: Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -&gt; 3, acquireRetryAttempts -&gt; 30, acquireRetryDelay -&gt; 1000, autoCommitOnClose -&gt; false, automaticTestTable -&gt; null, breakAfterAcquireFailure -&gt; false, checkoutTimeout -&gt; 0, connectionCustomizerClassName -&gt; null, connectionTesterClassName -&gt; com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -&gt; caller, dataSourceName -&gt; 2vkgsu9q1b3tesb1o3y14g|38bd327a, debugUnreturnedConnectionStackTraces -&gt; false, description -&gt; null, driverClass -&gt; oracle.jdbc.driver.OracleDriver, extensions -&gt; {}, factoryClassLocation -&gt; null, forceIgnoreUnresolvedTransactions -&gt; false, forceSynchronousCheckins -&gt; false, forceUseNamedDriverClass -&gt; false, identityToken -&gt; 2vkgsu9q1b3tesb1o3y14g|38bd327a, idleConnectionTestPeriod -&gt; 0, initialPoolSize -&gt; 3, jdbcUrl -&gt; jdbc:oracle:thin:@remus.corp.apple.com:1529:gsxt, maxAdministrativeTaskTime -&gt; 0, maxConnectionAge -&gt; 0, maxIdleTime -&gt; 30000, maxIdleTimeExcessConnections -&gt; 0, maxPoolSize -&gt; 20, maxStatements -&gt; 0, maxStatementsPerConnection -&gt; 0, minPoolSize -&gt; 5, numHelperThreads -&gt; 3, preferredTestQuery -&gt; null, privilegeSpawnedThreads -&gt; false, properties -&gt; {user=******, password=******}, propertyCycle -&gt; 0, statementCacheNumDeferredCloseThreads -&gt; 0, testConnectionOnCheckin -&gt; false, testConnectionOnCheckout -&gt; false, unreturnedConnectionTimeout -&gt; 0, userOverrides -&gt; {}, usesTraditionalReflectiveProxies -&gt; false ]
  Sep 22, 2017 6:57:56 PM com.mchange.v2.resourcepool.BasicResourcePool 
  WARNING: Bad pool size config, start 3 &lt; min 5. Using 5 as start.
  </code></pre>
  
  <p>Note that I have already set below property in <em>Hibernate</em> config xml :</p>
  
  
  
  <pre><code>&lt;prop key="hibernate.temp.use_jdbc_metadata_defaults"&gt;false&lt;/prop&gt;
  </code></pre>
  
  <p>The source code is available in a <a href="https://github.com/vishwabhat19/LongStartupApp.git" rel="nofollow noreferrer">Git repository</a>.</p>