somewhere in your classpath you have a javax.transaction.xa package defined in a jar most likely in a geronimo-jta jar or a javaEE transaction-api jar
you need to be using the jakarta transaction api jar instead.
the jakarta transaction jar DOES not have the javax.transaction.xa package. And the javax.transaction package needs to be updated to jakarta.transaction in your code
note: the javax.transaction.xa package is now part of the JDK/JRE whereas javax.transaction is not