oci-oracle-xe
oci-oracle-xe copied to clipboard
Setting 21c XE to be compatible with 19c XE
Hi Gerald,
Thanks for creating the Docker image for Oracle XE at https://hub.docker.com/r/gvenzl/oracle-xe.
I found the article below that shows us how to set Oracle 21c XE to be compatible with 19c XE:
https://connor-mcdonald.com/2021/10/11/19c-express-edition-joelkallmanday/
- How can I do this in my Docker environment?
- Where can I find the Database Configuration Assistant (DBCA) and launch its GUI as shown in the instruction?
- Or is there a different way of setting the 19c XE compatibility without using this DBCA tool?
I'm currently using image gvenzl/oracle-xe:21.3.0.
Thank you.
chris
Hi @sixth-instinct,
You can't with these images. These images contain an already existing database with compatibility set to 21c.
If you really want to have an image with compatibility set to 19c, you would have to use or extend the gvenzl/oracle-xe:21.3.0-full
image, which does have DBCA present, and create your custom database as part of it.
Hi @gvenzl,
Thanks for your explanation. I appreciate it.
I've created and ran a Docker container using the 21.3.0-full image as you had suggested,
I guess my next, dumb question is this: How do I "launch" the DBCA to see its GUI like shown in the instruction?
In addition, the instruction seems to require I save a template in this location in the Docker container:
/opt/oracle/homes/OraDBHome21cXE/assistants/dbca/templates
To make it persistent in Docker, do I need to make this folder into a Docker volume? Any other folders that need to be made into a volume?
Thank you very much.
chris
Hi @gvenzl,
I've found this youtube video showing how to launch on Windows an application with a GUI off a Docker container:
https://www.youtube.com/watch?v=BDilFZ9C9mw
So I've installed and run XServer on my Windows host machine and added the following environment variable to my Oracle XE docker-compose.yml:
- DISPLAY=host.docker.internal:0.0
I then tried to launch DBCA from my Windows host using this command:
docker exec -it orax19c dbca
But got this error:
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit
at com.jgoodies.looks.LookUtils.isLowResolution(LookUtils.java:484)
at com.jgoodies.looks.LookUtils.<clinit>(LookUtils.java:249)
at com.jgoodies.looks.plastic.PlasticLookAndFeel.<clinit>(PlasticLookAndFeel.java:136)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1879)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:582)
at oracle.install.commons.util.Application.startup(Application.java:976)
at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:181)
at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:198)
at oracle.assistants.common.base.driver.AssistantApplication.startup(AssistantApplication.java:340)
at oracle.assistants.dbca.driver.DBConfigurator.startup(DBConfigurator.java:421)
at oracle.assistants.dbca.driver.DBConfigurator.main(DBConfigurator.java:556)
According to this page, the "Could not initialize class java.awt.Toolkit" error was caused by a missing libxtst6 32-bit and I would need to install it:
https://stackoverflow.com/questions/18099614/java-lang-noclassdeffounderror-could-not-initialize-class-java-awt-toolkit
But what is the command to install a package into this Docker container? I've tried all these but kept getting the "command not found" error:
sh-4.4$ run apt-get install libxtst6:i386
sh: run: command not found
sh-4.4$ apt-get install libxtst6:i386
sh: apt-get: command not found
sh-4.4$ yum install libxtst6:i386
sh: yum: command not found
sh-4.4$ dnf install libxtst6:i386
sh: dnf: command not found
sh-4.4$ yum -y install libxtst6:i386
sh: yum: command not found
sh-4.4$ sudo yum -y install libxtst6:i386
sh: sudo: command not found
Any ideas?
Thank you very much.
chris
Hi @sixth-instinct,
You need to use microdnf
, it's a slim version of dnf
and available inside the image.