You should try updating your certificates with this command:
update-ca-certificates
If this alone does not help, try updating your java truststore with this command (you have to know which cert to add - you can download it from the browser):
keytool -import -alias oracleDriversCert -keystore $JAVA_HOME/lib/security/cacerts -file oracleDriversCert.cer
Check if $JAVA_HOME/lib/security/cacerts exists first.
In my case, this is under /usr/lib/jvm/java-1.17.0-openjdk-amd64/lib/security/cacerts - a link pointing to /etc/ssl/certs/java/cacerts.
However - I'm not sure which cert is the problem - in my case, DBeaver downloaded the drivers from maven repositories.
If nothing works, you should download the drivers manually. Vendor site:
https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html
Then, click "Download configuration" and select "Local folder" where your downloaded drivers are stored.

