That is expected due to the transition from Java EE to Jakarta EE.
Tomcat 10 uses the new Jakarta EE packages and Lucee still uses the javax.* packages.
Your can read more about it at https://blogs.oracle.com/javamagazine/transition-from-java-ee-to-jakarta-ee or just search online for more articles.
The Apache Tomcat team publishes a tool that translates the packages automatically, watch might do the trick here, but I haven’t had the chance to try it myself.