The problem is, that the driver is an extension that doesn’t come with Lucee per se, thus, for doing it programatically, I think you will need to download it via cfhttp, store it to the lucee servers extension directory and restart Tomcat. Another approach would be to use Lucee Environment Variables or System Properties. But as far I can remember, you’d need to redeploy the complete Lucee server context (you may need to wipe out the server context first), but I’m not really sure.
Now you have the file, now you have to figure out after you get the file how to add it someplace you need it, and then add the file to lucee. You could fire off cfexcute that runs a bash or powershell script that restarts lucee and places the file where you need it, you could just place the driver in your needed application path and just directly reference the jar file from coldfusion.
this typically would go in the web-inf/lib directory.
Then code wise you can invoke your custom loaded jar
@Roberto_Marzialetti Because you are using CommandBox, you could also use CommandBox env variables, and set LUCEE_EXTENSIONS=671B01B8-B3B3-42B9-AC055A356BED5281 ;version=42.2.20
Then stop the server, forget the server and restart. However, that could take some time, depending to the size of your app and your setup.