Skip to main content

Command Palette

Search for a command to run...

Disable MBean Warnings in Oracle ORDS

Published
2 min read
Disable MBean Warnings in Oracle ORDS
M

With around 20 years on the job, Matt is one of the most experienced software developers at Pretius. He likes meeting new people, traveling to conferences, and working on different projects.

He’s also a big sports fan (regularly watches Leeds United, Formula 1, and boxing), and not just as a spectator – he often starts his days on a mountain bike, to tune his mind.

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:

  1. Log in to UNIX

      docker exec -it 23cfree /bin/bash
    
  2. Drop into super user (because we are going to stop/start ords as su)

     su
    
  3. Stop ORDS (I'm using the script built from the first hyperlink)

     sh /home/oracle/scripts/stop_ords.sh
    
  4. 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

  5. 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
    
  6. Add this line to the very end of the file

     oracle.jdbc.level=OFF
    
  7. Save it with ctrl+x

  8. Start ORDS

     sh /home/oracle/scripts/start_ords.sh
    
  9. exit Superuser

     exit
    
  10. Bingo! no more MBean nonsense.

Enjoy

What's the picture? It's Crimple Valley Viaduct, mid-afternoon, mid-December 2023. Visit Yorkshire!