亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Spring Hibernate-無法獲得當前線程的事務同步會話

Spring Hibernate-無法獲得當前線程的事務同步會話

翻翻過去那場雪 2019-10-17 15:30:36
我使用spring + hibernate創建了一個應用程序,但始終會收到此錯誤。這是我第一個使用hibernate的應用程序,我閱讀了一些指南,但無法解決此問題。我在哪里做錯了?這是我的應用程序的代碼ott 05, 2014 4:03:06 PM org.springframework.context.support.ClassPathXmlApplicationContext prepareRefreshInformazioni: Refreshing   org.springframework.context.support.ClassPathXmlApplicationContext@1eab16b: startup date  [Sun Oct 05 16:03:06 CEST 2014]; root of context hierarchyott 05, 2014 4:03:06 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitionsInformazioni: Loading XML bean definitions from class path resource [springConfig.xml]ott 05, 2014 4:03:08 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>INFO: HCANN000001: Hibernate Commons Annotations {4.0.5.Final}ott 05, 2014 4:03:08 PM org.hibernate.Version logVersionINFO: HHH000412: Hibernate Core {4.3.6.Final}ott 05, 2014 4:03:08 PM org.hibernate.cfg.Environment <clinit>INFO: HHH000206: hibernate.properties not foundott 05, 2014 4:03:08 PM org.hibernate.cfg.Environment buildBytecodeProviderINFO: HHH000021: Bytecode provider name : javassistott 05, 2014 4:03:09 PM org.hibernate.dialect.Dialect <init>INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialectott 05, 2014 4:03:09 PM org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateServiceINFO: HHH000399: Using default transaction strategy (direct JDBC transactions)ott 05, 2014 4:03:09 PM org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>INFO: HHH000397: Using ASTQueryTranslatorFactoryException in thread "main" org.hibernate.HibernateException: Could not obtain transaction-synchronized Session for current threadat org.springframework.orm.hibernate4.SpringSessionContext.currentSession(SpringSessionContext.java:134)at org.hibernate.internal.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:1014)at coreservlets.StudentDAOImpl.create(StudentDAOImpl.java:19)at coreservlets.MainApp.main(MainApp.java:14)
查看完整描述

3 回答

  • 3 回答
  • 0 關注
  • 1069 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號