The error you're encountering, "Constructor public org.apache.spark.ml.feature.Bucketizer(java.lang.String) is not whitelisted", typically arises when using a shared mode cluster. This is because Spark ML is not supported in shared clusters due to security reasons. Some Spark ML calls are restricted and whitelisting all classes is not feasible for security reasons.
The solution is to use a Single User cluster, but as of now the Serverless cluster is designed in Shared Access mode and cannot be modified