testcontainers / testcontainers/testcontainers-java

[Bug]: Oracle XE is not compatible substitute for Oracle Free

Open
#11,372 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type/bug
Dominant language
Java
Stars
8.7k
Forks
1.9k
Avg merge
2d 17h
Merged PRs (30d)
9

Description

Module

Oracle Free

Testcontainers version

2.0.3

Using the latest Testcontainers version?

Yes

Host OS

Linux Mint 22.2

Host Arch

x86

Docker version
Client: Docker Engine - Community
 Version:           29.1.3
 API version:       1.52
 Go version:        go1.25.5
 Git commit:        f52814d
 Built:             Fri Dec 12 14:49:32 2025
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          29.1.3
  API version:      1.52 (minimum version 1.44)
  Go version:       go1.25.5
  Git commit:       fbf3ed2
  Built:            Fri Dec 12 14:49:32 2025
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v2.2.1
  GitCommit:        dea7da592f5d1d2b7755e3a161be07f43fad8f75
 runc:
  Version:          1.3.4
  GitCommit:        v1.3.4-0-gd6d73eb8
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
What happened?

Containers under package org.testcontainers.containers are deprecated and should be migrated to org.testcontainers.<vendor> in Testcontainers 2.

For Oracle Module at org.testcontainers.oracle.OracleContainer the migration is not possible for gvenzl/oracle-xe image and org.testcontainers.containers.OracleContainer has to be used.

Either org.testcontainers.oracle.OracleContainer should support both xe and free or they should have their own vendor package.

Relevant log output
java.lang.IllegalStateException: 
Failed to verify that image 'gvenzl/oracle-xe' is a compatible substitute for 'gvenzl/oracle-free'. This generally means that you are trying to use an image that Testcontainers has not been designed to use. If this is deliberate, and if you are confident that the image is compatible, you should declare compatibility in code using the `asCompatibleSubstituteFor` method. For example:
   DockerImageName myImage = DockerImageName.parse("gvenzl/oracle-xe").asCompatibleSubstituteFor("gvenzl/oracle-free");
and then use `myImage` instead.
Additional Information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with org.testcontainers.oracle.OracleContainer and the deprecated org.testcontainers.containers.OracleContainer, then inspect how the gvenzl/oracle-free and gvenzl/oracle-xe image names are validated. Determine whether both images should be supported by the Oracle module or split into vendor packages, and verify that migration from the deprecated package works for each image.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
databases, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.