jamesfredley commented on issue #14341:
URL: https://github.com/apache/grails-core/issues/14341#issuecomment-5947883077

   This is a dependency and configuration mismatch, not a missing class in 
Grails.
   
   The stack trace is `ClassNotFoundException: 
jakarta.persistence.EntityManager` while Spring inspects 
`org.grails.orm.hibernate.HibernateDatastore`. The title spells that name 
`jakarta/persistance/EntityManger`. `8.0.x` has no `jakarta.persistance` 
reference. The class that failed to load is the real Jakarta type.
   
   The application is Grails 6.2.0 on Spring Boot 2.7.18, which uses 
`javax.persistence`. The build forces Hibernate 6 (`hibernate-core:6.4.18`) and 
`grails-datastore-gorm-hibernate5:8.1.0`. Hibernate 6 requires 
`jakarta.persistence.EntityManager`, and Spring Boot 2.7 does not put that API 
on the classpath. Grails 6 cannot use Hibernate 6. Grails 7 is the release that 
moves from `javax` to `jakarta`: 
https://docs.grails.org/latest/guide/upgrading.html#_12_2_javax_jakarta
   
   The later `Unsupported connection setting "MVCC"` error is separate. The 
Hibernate block sets `driverClassName: org.h2.Driver` while the SQL Server URL 
is declared the Spring Boot way, so Hibernate opens H2. H2 2 rejects `MVCC`. 
Configure the datasource with the Grails `dataSource` block, including the 
pooled-data-source example: 
https://docs.grails.org/latest/guide/conf.html#dataSource
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to