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>
相關文章
- hibernate錯誤No CurrentSessionContext configured! Junit測試報錯SessionContext
- 【SQLServer】Server ‘SERVERNAME’ is not configured for RPCSQLServerRPC
- hadoop原始碼解讀——ConfiguredHadoop原始碼
- Poster stopped: message is larger than configured max size
- Elasticsearch NoNodeAvailableException None of the configured nodes are availableElasticsearchAIExceptionNone
- Error: The cluster is not configured or is not running on node NODE_NAMEError
- Checking monitor:must be configured to display at least 256 colorsAST
- Spring Boot Configuration Annotation Processor not configuredSpring Boot
- already configured and will be running under init(1M)
- 安裝11grac資料庫:Scan Listener is not configured資料庫
- 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
- MySQL 5.6.19主從server-id不生效,The server is not configured as slaveMySqlServer
- pip is configured with locations that require TLS/SSL, however the ssl module in Python is not availableUITLSPythonAI
- ADI-1 CREATE DOCUMENT報錯BNE_UIX_PHYSICAL_DIRECTORY is not configuredUI
- The Tomcat connector configured to listen on port 80 failed to start. The port may already be inTomcatAI
- RAC一個節點錯誤CRS-4047: No Oracle Clusterware components configuredOracle
- Redis "MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk"問題Redis
- ORA-00845 When Starting Up An 11g Instance With AMM Configured
- Android Studio Git No tracked branch configured for branch branch_name or the branch doesn't existAndroidGit
- RAC解決單節點報 CRS-4047: No Oracle Clusterware components configured.Oracle
- WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.UITLSPythonAI
- “Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured 這個錯誤解決方案SwiftUI
- django模板報錯:Requested setting TEMPLATE_DEBUG, but settings are not configured. You must either defineDjango
- (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