title: Testcontainers oracle DB
body: <p>I'm trying to setup a integration test Using Testcontainers and Oracle-xe database.
  I'm getting the error below:</p>
  <p>application.properties entry:spring.datasource.driver-class-name=org.testcontainers.jdbc.ContainerDatabaseDriver</p>
  <pre><code>Driver org.testcontainers.jdbc.ContainerDatabaseDriver claims to not accept jdbcUrl, jdbc:oracle:thin:@localhost:55802/xepdb1
  </code></pre>
  <p>My Test extension:</p>
  <pre><code>public class OracleDBContainerExtension implements AfterAllCallback, BeforeAllCallback {
        private OracleContainer container;
  
        @Override
        public void beforeAll(ExtensionContext context) {
          // gvenzl/oracle-xe:18.4.0-slim
          container = new OracleContainer();
          container.start();
          container.waitingFor(
              Wait.forListeningPort().withStartupTimeout(Duration.ofSeconds(180L)));
          System.setProperty(&quot;spring.datasource.url&quot;, container.getJdbcUrl());
          System.setProperty(&quot;spring.datasource.password&quot;, container.getPassword());
          System.setProperty(&quot;spring.datasource.username&quot;, container.getUsername());
        }
  
        @Override
        public void afterAll(ExtensionContext context) {
          container.stop();
        }
      }
  </code></pre>
  <p>test:</p>
  <pre><code>    @Testcontainers
      @SpringBootTest
      @ExtendWith(OracleDBContainerExtension.class)
      public class HeroRepositoryTest {
        @Autowired
        private HeroRepository repositoryUnderTest;
  
        @Test
        public void shouldReturnHeroesSuccessfully() {
          System.out.println(&quot;junit version: &quot; + Version.id());
          List&lt;Hero&gt; heroes = repositoryUnderTest.allHeros();
          assertThat(heroes).hasSize(1);
          repositoryUnderTest.addHero(new Hero(&quot;bb&quot;, &quot;bb&quot;));
          Collection&lt;Hero&gt; heroesAfter = repositoryUnderTest.allHeros();
          assertThat(heroesAfter).hasSize(2);
        }
      }
  </code></pre>