title: Hibernate 5 Multitenancy and H2 : ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - Schema MYSCHEMA not found
body: <p>I am using Spring Framework test configuration (legacy app)</p>
  
  <p>Very strange behaviour of H2 database with Hibernate 5 multitenancy, </p>
  
  <p>I just added configuration to my tests, and the spring application context can't work : </p>
  
  <pre><code>@Bean
      public static DataSource dataSource() {
          DriverManagerDataSource dataSource = new DriverManagerDataSource();
          dataSource.setDriverClassName("org.h2.Driver");
          dataSource.setUrl("jdbc:h2:mem:db;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false");
          dataSource.setUsername("sa");
          dataSource.setPassword("");
          return dataSource;
      }
  
  =&gt; [main] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper Schema "MYSCHEMA" not found [90079-197]
  </code></pre>
  
  <p>So i went with the usual H2 add schema.</p>
  
  <pre><code>    @Bean
      public static DataSource dataSource() {
          DriverManagerDataSource dataSource = new DriverManagerDataSource();
          dataSource.setDriverClassName("org.h2.Driver");
          dataSource.setUrl("jdbc:h2:mem:db;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;INIT=CREATE SCHEMA MYSCHEMA");
          dataSource.setUsername("sa");
          dataSource.setPassword("");
          return dataSource;
      }
  
  Schema "MYSCHEMA" already exists; SQL statement:
  CREATE SCHEMA MYSCHEMA[90078-197]
  </code></pre>
  
  <p>And I'm now stuck... I already tried hbm2ddl to update, I'm actually very confused...</p>