title: 'The user must supply a JDBC connection' on weblogic restart
body: <p>I am using Weblogic 11.
  After initial deployment of all JMS configurations, JDBC configuration (from XADS-jdbc.xml) and ears everything works properly.</p>
  <p>But after weblogic restart application fails to initialize with error</p>
  <pre><code>Caused By: java.lang.UnsupportedOperationException: The user must supply a JDBC connection
   at org.hibernate.connection.UserSuppliedConnectionProvider.getConnection(UserSuppliedConnectionProvider.java:54)
   at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:51)
   at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:130)
   at org.hibernate.impl.SessionFactoryImpl.&lt;init&gt;(SessionFactoryImpl.java:349)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327)
   at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
   at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
   at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132)...
  </code></pre>
  <p>According to log JDBC and EAR start their initialization simultaniously. So when EAR tries to validate DB scheme JDBC configuration initialization is not completed yet.</p>
  <p>What could fix such situation?
  Are there any weblogic configurations using which deployment items initialization could be ordered?</p>
  <p>Thanks in Advance.</p>
  <h3>persistence.xml:</h3>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;persistence version=&quot;1.0&quot;
      xmlns=&quot;http://java.sun.com/xml/ns/persistence&quot;
      xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
      xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd&quot;&gt;
  &lt;persistence-unit name=&quot;TestDSPU&quot; transaction-type=&quot;JTA&quot;&gt;
      &lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;/provider&gt;
      &lt;jta-data-source&gt;jdbc/testN/test/TestXADS&lt;/jta-data-source&gt;
      &lt;mapping-file&gt;META-INF/orm.xml&lt;/mapping-file&gt;
      &lt;properties&gt;
          &lt;!-- &lt;property name=&quot;hibernate.dialect&quot; value=&quot;org.hibernate.dialect.Oracle9iDialect&quot;/&gt;  --&gt;
          &lt;property name=&quot;hibernate.dialect&quot; value=&quot;org.hibernate.dialect.Oracle10gDialect&quot;/&gt; 
          &lt;property name=&quot;hibernate.max_fetch_depth&quot; value=&quot;3&quot;/&gt;
          &lt;!-- &lt;property name=&quot;hibernate.cache.use_query_cache&quot; value=&quot;true&quot;/&gt; --&gt;
          &lt;property name=&quot;hibernate.cache.region_prefix&quot; value=&quot;hibernate.test&quot;/&gt;
          &lt;property name=&quot;hibernate.jdbc.use_streams_for_binary&quot; value=&quot;true&quot;/&gt;
          &lt;property name=&quot;hibernate.transaction.manager_lookup_class&quot; value=&quot;org.hibernate.transaction.WeblogicTransactionManagerLookup&quot;/&gt;
          &lt;property name=&quot;show_sql&quot; value=&quot;true&quot;/&gt;
          &lt;property name=&quot;hibernate.query.factory_class&quot; value=&quot;org.hibernate.hql.classic.ClassicQueryTranslatorFactory&quot;/&gt;
          &lt;property name=&quot;hibernate.hbm2ddl.auto&quot; value=&quot;validate&quot; /&gt; 
      &lt;/properties&gt;
  &lt;/persistence-unit&gt;
  </code></pre>