It seems that the JAR that was on workspace17/.metadata/.plugins/org.eclipse.wst.server.core/tmp3/wtpwebapps/bcorg-jpa/WEB-INF/lib/myfaces-api-3.0.2.jar was the culprit. I got suspicious about the JAR being mentioned twice.
So, after manually deleting the file, the web app now starts normally! Excellent suggestion Jonathan, it provided the hint I was looking for. I still don’t know why that JAR was there (I didn’t put it in there), but maybe it’s from some earlier builds, who knows. Anyway, PROBLEM SOLVED!! Thanks for your help > On 25 Jul 2023, at 11:39 am, Milan Durovic <milan...@gmail.com> wrote: > > Ok, I added that option and got a lot more output (as expected), so the lines > where jakarta.faces.context.ExternalContext is mentioned are: > > [0.408s][info][class,load] jakarta.faces.context.ExternalContext source: > file:/Users/milan/workspace17/apache-tomee-webprofile-9.1.0/lib/myfaces-api-3.0.2.jar > > [1.669s][info][class,load] jakarta.faces.context.ExternalContext source: > __JVM_DefineClass__ > > [4.038s][info][class,load] jakarta.faces.context.ExternalContext source: > file:/Users/milan/workspace17/.metadata/.plugins/org.eclipse.wst.server.core/tmp3/wtpwebapps/bcorg-jpa/WEB-INF/lib/myfaces-api-3.0.2.jar > > java.lang.LinkageError: loader constraint violation for class > org.apache.tomee.myfaces.TomEEWebConfigProvider: when selecting overriding > method 'java.util.List > org.apache.tomee.myfaces.TomEEWebConfigProvider.getFacesServletMappings(jakarta.faces.context.ExternalContext)' > the class loader org.apache.tomee.catalina.TomEEWebappClassLoader @2e5b7fba > of the selected method's type > org.apache.tomee.myfaces.TomEEWebConfigProvider, and the class loader > java.net.URLClassLoader @7106e68e for its super type > org.apache.myfaces.spi.impl.DefaultWebConfigProvider have different Class > objects for the type jakarta.faces.context.ExternalContext used in the > signature (org.apache.tomee.myfaces.TomEEWebConfigProvider is in unnamed > module of loader org.apache.tomee.catalina.TomEEWebappClassLoader @2e5b7fba, > parent loader java.net.URLClassLoader @7106e68e; > org.apache.myfaces.spi.impl.DefaultWebConfigProvider is in unnamed module of > loader java.net.URLClassLoader @7106e68e, parent loader 'app') > > >> On 25 Jul 2023, at 11:21 am, Jonathan S. Fisher <exabr...@gmail.com> wrote: >> >> can you start your vm with -verbose:class and see if you can figure out >> which jar it's loaded the class from? >> >