The "from" is as important as the "to". And the "in Eclipse" doesn't count.
If you have a POM that builds a WAR for jetty or
Tomcat, those two webapp servers do not implement the full
JEE stack.
Among other things that means that jetty and Tomcat don't implement JavaServer Faces, JPA, and the other extended JEE features. Basically they only do
servlets and JSPs and if you want JPA and/or
JSF, you have to explicitly include implementation JARs for those functions in the WAR you build.
Wildfly, on the other hand,
is a full-stack server, so you have to
remove those implementation JARs from the WAR you build or you will encounter class conflicts as it fights between the WAR-included code and the server-included code.