No CurrentSessionContext configured
配置檔案hibernate.cfg.xml
在整合Hibernate的環境下(例如Jboss),在hibernate.cfg.xml中session-factory段加入:
<property name="current_session_context_class">jta</property>
在不整合Hibernate的環境下(例如使用JDBC的獨立應用程式),在hibernate.cfg.xml中session-factory段加入:
<property name="current_session_context_class">thread</property>
在整合Hibernate的環境下(例如Jboss),在hibernate.cfg.xml中session-factory段加入:
<property name="current_session_context_class">jta</property>
在不整合Hibernate的環境下(例如使用JDBC的獨立應用程式),在hibernate.cfg.xml中session-factory段加入:
<property name="current_session_context_class">thread</property>
相關文章
- Spring Boot Configuration Annotation Processor not configuredSpring Boot
- Poster stopped: message is larger than configured max size
- template might not exist or might not be accessible by any of the configured Template Resolvers
- 【Bug解決】Spring Boot Configuration Annotation Processor not configuredSpring Boot
- pip is configured with locations that require TLS/SSL, however the ssl module in Python is not availableUITLSPythonAI
- The Tomcat connector configured to listen on port 80 failed to start. The port may already be inTomcatAI
- WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.UITLSPythonAI
- Android Studio Git No tracked branch configured for branch branch_name or the branch doesn't existAndroidGit
- (xml中sql語句為紅)解決No data sources are configured to run this SQL and provide advanced的問題XMLSQLIDE
- vscode remote-x11 ssh 連線時Another All configured authentication methods failed like #10 報錯修復VSCodeREMAI