Be sure you are using Spark 3.4.0 or higher since Spark Connect is supported starting from this version.