ppkarwasz commented on pull request #16:
URL: 
https://github.com/apache/tomcat-jakartaee-migration/pull/16#issuecomment-806715595


   > > ```
   > > 3\. The classloader fails to load the `jakarta.persistence.*` classes.
   > > ```
   > 
   > Fails how ? What is the exception ?
   
   One of the standard `ClassNotFoundException` and `NoClassDefFoundError`. The 
reason is simple: the class that would be transformed into 
`jakarta.persistence.*` is still located in the `persistence-api.jar` as 
`javax/persistence/*.class`.
   
   This of course doesn't happen for the 5 spec jars distributed with Tomcat: 
when the classloader loads a servlet that implements `javax.servlet.Servlet`, 
the transformer changes is to `jakarta.servlet.Servlet` and the interface is 
loaded correctly from `CATALINA_HOME/lib/servlet-api.jar` (unless of course 
somebody bundled a second version with the application, but this is his 
problem).
   
   That's why I advocate to remove all APIs not bundled with Tomcat from the 
`TOMCAT` profile.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to