我使用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)
添加回答
举报
0/150
提交
取消