[color=blue]org.springframework.transaction.TransactionSystemException:[/color] [color=red]Could not commit Hibernate transaction;[/color] nested exception is org.hibernate.TransactionException: Transaction not successfully started
[color=blue]把
Session session = getHibernateTemplate().getSessionFactory().getCurrentSession();
改为
Session session = getHibernateTemplate().getSessionFactory().openSession();[/color]
[color=red][size=medium]完整代码如下:[/size][/color]
[img]http://dl2.iteye.com/upload/attachment/0100/2972/c847a98c-e0da-399d-9500-89d984e3059d.gif[/img]
[color=blue]把
Session session = getHibernateTemplate().getSessionFactory().getCurrentSession();
改为
Session session = getHibernateTemplate().getSessionFactory().openSession();[/color]
[color=red][size=medium]完整代码如下:[/size][/color]
[img]http://dl2.iteye.com/upload/attachment/0100/2972/c847a98c-e0da-399d-9500-89d984e3059d.gif[/img]