'TestContainers-OracleContainer, init sql file that calls another sql file with @filename.sql by using sqlplus in the container

When i'm using

private final static OracleContainer oracleContainer = new OracleContainer("gvenzl/oracle-xe:18.4.0-slim");

oracleContainer.withInitScript("init.sql");

with init.sql

ALTER SESSION SET CONTAINER=XEPDB1;
alter session set NLS_DATE_FORMAT = "DD-MON-YYYY";
@scripts/init_ddl.sql ;

I get this error

Caused by: java.sql.SQLSyntaxErrorException: ORA-00900: instruction SQL non valide

in the line of @scripts/init_ddl.sql ;

How can i run my init sql with sqlplus to call another sql file with @ in java code ?

Thank you



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source