慕斯卡1381253
2017-03-11 16:22
org.hibernate.SessionException: Session is closed!
at org.hibernate.internal.AbstractSessionImpl.errorIfClosed(AbstractSessionImpl.java:129)
at org.hibernate.internal.SessionImpl.getPersistenceContext(SessionImpl.java:1937)
at org.hibernate.internal.AbstractQueryImpl.isReadOnly(AbstractQueryImpl.java:214)
at org.hibernate.internal.AbstractQueryImpl.getQueryParameters(AbstractQueryImpl.java:933)
at org.hibernate.internal.QueryImpl.list(QueryImpl.java:101)
at service.impl.UsersDAOImpl.usersLogin(UsersDAOImpl.java:27)
at action.UsersAction.login(UsersAction.java:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:871)
at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1294)
at ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:68)
at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethodWithDebugInfo(XWorkMethodAccessor.java:117)
at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethod(XWorkMethodAccessor.java:108)
at ognl.OgnlRuntime.callMethod(OgnlRuntime.java:1370)
at service.impl.UsersDAOImpl.usersLogin(UsersDAOImpl.java:27)
at action.UsersAction.login(UsersAction.java:27)
这里,检查一下你的代码是不是关闭了session
就是session关闭了呗
使用Struts2+Hibernate开发学生信息管理功能
80701 学习 · 754 问题
相似问题
回答 3
回答 1
回答 2
回答 1
回答 2