在運行我的主程式時,我收到了上述錯誤。我不確定這可能是什么原因。
在網上的一個頁面上我發現類檔案是由不同版本的編譯器生成的,當前的JDK不同
我洗掉了.m2 檔案夾和目標檔案夾中的所有內容,但仍然顯示相同的錯誤。不確定也許我也應該洗掉.idea檔案夾并檢查。
應該有某種方法可以在不更改為 Java 11 的情況下解決它。
這是確切的錯誤-
java: cannot access org.hibernate.Session
bad class file: /C:/Users/name/.m2/repository/org/hibernate/orm/hibernate-core/6.0.0.CR1/hibernate-core-6.0.0.CR1.jar!/org/hibernate/Session.class
class file has wrong version 55.0, should be 52.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
uj5u.com熱心網友回復:
Hibernate 6.0 和更高版本至少需要 Java 11 ( https://docs.jboss.org/hibernate/orm/6.0/userguide/html_single/Hibernate_User_Guide.html#_system_requirements )。
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/431665.html
下一篇:Quarkus Kogito構建錯誤:java.lang.IllegalStateException:在java.time.LocalDateTime的jandex索引中找不到類資訊
