testcontainers / testcontainers/testcontainers-java

[OracleContainer] Unable to execute statements which need system privileges

Open
#4,615 17 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

modules/jdbc resolution/acknowledged type/enhancement
Dominant language
Java
Stars
8.7k
Forks
1.9k
Avg merge
2d 17h
Merged PRs (30d)
9

Description

I just updated to testcontainers 1.16.2 with new OracleContainer setup.
Before I could use a initScript to create tablespaces, but now I'm not able to use system user anymore.

The system user has been disabled, but I need to create tablespaces, for which the test user doesn't have privileges.

I've tried to copy the initScript to the container with .withCopyFileToContainer(MountableFile.forClasspathResource("init.sql"), "container-entrypoint-startdb.d/"); but the script wasn't picked up when the container was started.

How should I proceed?

Thank you!

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 by reviewing the OracleContainer setup and the initScript handling described in the issue, then reproduce the behavior with testcontainers 1.16.2 and init.sql. Determine how a system-privileged tablespace setup is expected to run after the system user is disabled; done means documenting or restoring a supported initialization path and verifying it in a container test.

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
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.