I've been working with my Oracle 23c Free Docker, APEX & ORDS all-in-one container for some time. However, I've been encountering an MBean Warning in the ORDS log.
It looks like this.
2023-12-18T14:22:26.603Z WARNING Error while registering Oracle JDBC AC statistics MBean. java.lang.NullPointerException at java.base/java.util.Objects.requireNonNull(Objects.java:209) at java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:263) at java.base/java.nio.file.Path.of(Path.java:147)
Everything was working fine, it wasn't bothering me... then it started to bother me... and therefore, with a bit of Googling, I fixed it.
According to this post, we can just disable the warning.
The steps I took were:
Log in to UNIX
docker exec -it 23cfree /bin/bash
Drop into super user (because we are going to stop/start ords as su)
su
Stop ORDS (I'm using the script built from the first hyperlink)
sh /home/oracle/scripts/stop_ords.sh
Find the logging.properties file
find / -name "logging.properties" 2>/dev/null
This returned me to 3 folders
bash-4.4$ find / -name "logging.properties" 2>/dev/null /etc/java/java-17-openjdk/java-17-openjdk-17.0.7.0.7-3.0.1.el8.x86_64/conf/logging.properties /opt/oracle/product/23c/dbhomeFree/javavm/lib/logging.properties /opt/oracle/product/23c/dbhomeFree/jdk/jre/lib/logging.properties
I took the first one, the java-17-openjdk one. I ignored the 23c ones
Then I edited this file (your version may be different)
nano /etc/java/java-17-openjdk/java-17-openjdk-17.0.7.0.7-3.0.1.el8.x86_64/conf/logging.properties
Add this line to the very end of the file
oracle.jdbc.level=OFF
Save it with ctrl+x
Start ORDS
sh /home/oracle/scripts/start_ords.sh
exit Superuser
exit
Bingo! no more MBean nonsense.
Enjoy
What's the picture? It's Crimple Valley Viaduct, mid-afternoon, mid-December 2023. Visit Yorkshire!