- 浏览: 73388 次
- 性别:
- 来自: 临沂
文章分类
最新评论
-
yuanke:
呵呵,早就解决了!
JDIC做了一个IE浏览器 -
lzj0470:
兄弟,解决了吗?我这几天,也是遇到这样的问题。指定JRE,不能 ...
JDIC做了一个IE浏览器 -
yefansiping:
这个问题在3.0里面解决了,可是我的这块还是出现这样的问题了, ...
from提交的数据到后台是乱码 -
treblesoftware:
STRUTS2还是很好用,很简单的,把它有些鸡胁功能去掉之后, ...
学struts2有感 -
ranLoD:
恰巧我最痛恨的就是struts自带标签怎么办了,<s:f ...
学struts2有感
我把 lazy 设 为 false 不行,
在web.xml中加入
<filter>
<filter-name>hibernateFilter</filter-name>
<filter-class>org.springframework.orm.hibernate.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>hibernateFilter</filter-name>
<url-pattern>*.html</url-pattern>
</filter-mapping>
查了半天,还是不嫩解决,真郁闷啊
[demo] DEBUG [http-8083-3] BaseAction.getLookupMapName(226) | BaseAction: getLookupMapName( keyName = searchUserSysmodule )
[demo] DEBUG [http-8083-3] BaseAction.getLookupMapName(238) | BaseAction: keyName not found in resource bundle with locale zh_CN
[demo] DEBUG [http-8083-3] BaseAction.getLookupMapName(249) | keyName 'searchUserSysmodule' not found in resource bundle with locale zh_CN
[demo] DEBUG [http-8083-3] SysmoduleAction.searchUserSysmodule(280) | Entering 'searchUserPleat' method
[demo] DEBUG [http-8083-1] UserMessageAction.search(24) | Entering 'UserMessageAction' method
Hibernate: select sysuser0_.id as id0_, sysuser0_.name as name0_, sysuser0_.password as password0_, sysuser0_.truename as truename0_, sysuser0_.type as type0_, sysuser0_.status as status0_, sysuser0_.department as department0_, sysuser0_.revisable as revisable0_ from sysuser sysuser0_ where sysuser0_.id=?
Hibernate: select plate0_.id as id, plate0_.parentid as parentid, plate0_.name as name, plate0_.status as status, plate0_.serialnumber as serialnu5_, plate0_.level as level, plate0_.content as content, plate0_.target as target, plate0_.url as url, plate0_.ifinter as ifinter, plate0_.filename as filename, plate0_.mansort as mansort, plate0_.havefile as havefile, plate0_.revisable as revisable, plate0_.showtype as showtype, plate0_.ifindex as ifindex from plate plate0_ where (parentid=? )And(status=? ) order by plate0_.serialnumber desc
[demo] ERROR [http-8083-1] PersistentCollection.initialize(198) | Failed to lazily initialize a collection
net.sf.hibernate.HibernateException: collection was evicted
at net.sf.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:3293)
at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:195)
at net.sf.hibernate.collection.PersistentCollection.write(PersistentCollection.java:84)
at net.sf.hibernate.collection.Bag.retainAll(Bag.java:340)
at cn.com.xunuo.webapp.action.UserMessageAction.search(UserMessageAction.java:41)
at cn.com.xunuo.webapp.action.UserMessageAction.unspecified(UserMessageAction.java:65)
at cn.com.xunuo.webapp.action.BaseAction.execute(BaseAction.java:129)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:75)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:171)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at cn.com.xunuo.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:113)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
[demo] ERROR [http-8083-1] ActionExceptionHandler.logException(75) | net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection
at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:201)
at net.sf.hibernate.collection.PersistentCollection.write(PersistentCollection.java:84)
at net.sf.hibernate.collection.Bag.retainAll(Bag.java:340)
at cn.com.xunuo.webapp.action.UserMessageAction.search(UserMessageAction.java:41)
at cn.com.xunuo.webapp.action.UserMessageAction.unspecified(UserMessageAction.java:65)
at cn.com.xunuo.webapp.action.BaseAction.execute(BaseAction.java:129)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:75)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:171)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at cn.com.xunuo.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:113)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: net.sf.hibernate.HibernateException: collection was evicted
at net.sf.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:3293)
at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:195)
... 37 more
[demo] ERROR [http-8083-1] ActionExceptionHandler.logException(75) | net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection
at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:201)
at net.sf.hibernate.collection.PersistentCollection.write(PersistentCollection.java:84)
at net.sf.hibernate.collection.Bag.retainAll(Bag.java:340)
at cn.com.xunuo.webapp.action.UserMessageAction.search(UserMessageAction.java:41)
at cn.com.xunuo.webapp.action.UserMessageAction.unspecified(UserMessageAction.java:65)
at cn.com.xunuo.webapp.action.BaseAction.execute(BaseAction.java:129)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:75)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:171)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at cn.com.xunuo.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:113)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: net.sf.hibernate.HibernateException: collection was evicted
at net.sf.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:3293)
at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:195)
... 37 more
在web.xml中加入
<filter>
<filter-name>hibernateFilter</filter-name>
<filter-class>org.springframework.orm.hibernate.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>hibernateFilter</filter-name>
<url-pattern>*.html</url-pattern>
</filter-mapping>
查了半天,还是不嫩解决,真郁闷啊
[demo] DEBUG [http-8083-3] BaseAction.getLookupMapName(226) | BaseAction: getLookupMapName( keyName = searchUserSysmodule )
[demo] DEBUG [http-8083-3] BaseAction.getLookupMapName(238) | BaseAction: keyName not found in resource bundle with locale zh_CN
[demo] DEBUG [http-8083-3] BaseAction.getLookupMapName(249) | keyName 'searchUserSysmodule' not found in resource bundle with locale zh_CN
[demo] DEBUG [http-8083-3] SysmoduleAction.searchUserSysmodule(280) | Entering 'searchUserPleat' method
[demo] DEBUG [http-8083-1] UserMessageAction.search(24) | Entering 'UserMessageAction' method
Hibernate: select sysuser0_.id as id0_, sysuser0_.name as name0_, sysuser0_.password as password0_, sysuser0_.truename as truename0_, sysuser0_.type as type0_, sysuser0_.status as status0_, sysuser0_.department as department0_, sysuser0_.revisable as revisable0_ from sysuser sysuser0_ where sysuser0_.id=?
Hibernate: select plate0_.id as id, plate0_.parentid as parentid, plate0_.name as name, plate0_.status as status, plate0_.serialnumber as serialnu5_, plate0_.level as level, plate0_.content as content, plate0_.target as target, plate0_.url as url, plate0_.ifinter as ifinter, plate0_.filename as filename, plate0_.mansort as mansort, plate0_.havefile as havefile, plate0_.revisable as revisable, plate0_.showtype as showtype, plate0_.ifindex as ifindex from plate plate0_ where (parentid=? )And(status=? ) order by plate0_.serialnumber desc
[demo] ERROR [http-8083-1] PersistentCollection.initialize(198) | Failed to lazily initialize a collection
net.sf.hibernate.HibernateException: collection was evicted
at net.sf.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:3293)
at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:195)
at net.sf.hibernate.collection.PersistentCollection.write(PersistentCollection.java:84)
at net.sf.hibernate.collection.Bag.retainAll(Bag.java:340)
at cn.com.xunuo.webapp.action.UserMessageAction.search(UserMessageAction.java:41)
at cn.com.xunuo.webapp.action.UserMessageAction.unspecified(UserMessageAction.java:65)
at cn.com.xunuo.webapp.action.BaseAction.execute(BaseAction.java:129)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:75)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:171)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at cn.com.xunuo.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:113)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
[demo] ERROR [http-8083-1] ActionExceptionHandler.logException(75) | net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection
at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:201)
at net.sf.hibernate.collection.PersistentCollection.write(PersistentCollection.java:84)
at net.sf.hibernate.collection.Bag.retainAll(Bag.java:340)
at cn.com.xunuo.webapp.action.UserMessageAction.search(UserMessageAction.java:41)
at cn.com.xunuo.webapp.action.UserMessageAction.unspecified(UserMessageAction.java:65)
at cn.com.xunuo.webapp.action.BaseAction.execute(BaseAction.java:129)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:75)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:171)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at cn.com.xunuo.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:113)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: net.sf.hibernate.HibernateException: collection was evicted
at net.sf.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:3293)
at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:195)
... 37 more
[demo] ERROR [http-8083-1] ActionExceptionHandler.logException(75) | net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection
at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:201)
at net.sf.hibernate.collection.PersistentCollection.write(PersistentCollection.java:84)
at net.sf.hibernate.collection.Bag.retainAll(Bag.java:340)
at cn.com.xunuo.webapp.action.UserMessageAction.search(UserMessageAction.java:41)
at cn.com.xunuo.webapp.action.UserMessageAction.unspecified(UserMessageAction.java:65)
at cn.com.xunuo.webapp.action.BaseAction.execute(BaseAction.java:129)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:75)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:171)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at cn.com.xunuo.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:113)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: net.sf.hibernate.HibernateException: collection was evicted
at net.sf.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:3293)
at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:195)
... 37 more
发表评论
-
30分钟学会如何使用Shiro
2017-07-21 17:37 456本篇内容大多总结自张开涛的《跟我学Shiro》原文地址:ht ... -
Spring+Quartz实现定时从FTP服务器读取文件并存入Oracel数据库
2017-07-17 17:32 679... -
java收集邮箱
2013-10-24 12:51 652java收集群邮箱,首先登陆自己的QQ 然后直接访问:8403 ... -
谁能帮我看一下仿这个网站多少钱
2013-10-23 12:14 596最近挺无聊的,想弄个网站,谁能帮我看一下仿这个网站多少钱? w ... -
MyEclipse9.0正式版的破解和激活方法(注册机)
2013-06-13 12:46 10MyEclipse 9.0的到期了很头 ... -
网址导航代码
2013-02-24 21:04 913本代码是本人精心为网友准备的,热门网址导航站网罗精彩实用网址, ... -
html删除a标签并且替换网址
2013-01-09 17:06 1122做网站开发的时候,复制样式会产生网址,加入说我们想批量替换,下 ... -
filter过滤器的使用
2011-12-13 15:19 1118在jsp开发中,我们经常使用过滤器(filter)来过滤权 ... -
sa_framework,s2-tiger,s2-extension2.4 日文的api
2011-12-09 10:40 1118Seasar框架中常用的sa_framework,s2-t ... -
学struts2有感
2009-07-26 19:25 4233看到struts2.x,原以为是struts ... -
ejb中spring代理struts,action请求找不到,can not instance for path
2009-07-13 11:45 1565我在tomcat上struts集成spring没有问题, 但在 ... -
XLoadTree 基于AJAX + XML动态加载的JS树组件的文档
2009-04-08 10:39 2214最近 刚开始 树节点的加载,看了 一篇 文章不错,转转过来共享 ... -
strut2配置spring 用c3p0.ComboPooledDataSource 出现连接错误
2009-04-06 09:09 2067昨天 还可以了,今天 就不能连接了,报一下异常: HTTP S ... -
基于javaWEB学生管理系统需求分析
2009-03-11 19:53 1356这是我 做毕业设计的文档,包含 需求分析,结构设计,模块设计, ... -
JDIC做了一个IE浏览器
2008-09-19 17:04 3412有谁用过JDIC的,我们现在用JDIC做了一个IE浏览器,在E ... -
getHibernateTemplate.get()返回null
2008-08-25 14:15 3998[color=blue]Exception: HTTP St ... -
struts2 配置 exception求救
2008-08-16 10:38 2773我按要求配置,出现exception,没有找出来是什么原因,有 ... -
from提交的数据到后台是乱码
2008-08-13 16:55 3176请高手帮忙,在火狐浏览器插入中文没有问题,在遨游或IE就出现乱 ... -
ext 树状结构组成json格式
2008-08-05 09:41 3360public JSONArray loadOasys() { ... -
Ask help for lombox coonect to oracle10i
2008-04-27 07:23 1407当我配置好了后,还是报以下exception java.sq ...
相关推荐
当我们在查询一个实体对象时,如果它与另一个或多个实体有关联,但这些关联对象并未在当前查询中被明确要求,那么MyBatis会等到我们首次访问这些关联对象时才执行对应的SQL查询,这就是延迟加载的核心思想。...
为了解决这个问题,开发人员引入了“图片延迟加载”技术,jQuery作为一款广泛使用的JavaScript库,提供了实现这一功能的强大工具。本文将深入探讨jQuery图片延迟加载的概念、优势以及实现方法。 **一、什么是图片...
延迟加载是一种资源管理策略,它的核心思想是在用户实际需要某个资源的时候才去加载这个资源,而不是一开始就加载所有资源。这种方式可以显著减少初始加载时间,提高用户体验。 ##### 3.2 优势 1. **减少初始加载...
这样可以避免一次性加载所有图片导致的页面加载时间过长的问题,尤其是对于含有大量图片的页面,效果尤为显著。 **二、使用步骤** 1. **引入依赖**:首先,在HTML文件中引入jQuery库和jQuery.lazyload插件。例如: ...
延迟加载则避免了这个问题,它将非首屏内容的加载推迟到用户滚动到相应位置时才进行。这样,用户在页面顶部就能看到完整的内容,无需等待整个页面完全加载完毕。 在HTML优化中,我们可以利用JavaScript库来实现延迟...
为了解决这个问题,Mybatis 提供了延迟加载功能,使得关联对象在调用相关方法时才加载,提高程序性能。 实现延迟加载,首先需要在映射文件中开启该功能,并正确配置关联关系。例如: ```xml ``` 这里 `orders...
尽管延迟加载有诸多优点,但也会带来一些问题,比如“懒加载异常”(LazyInitializationException)。当会话关闭后,尝试访问懒加载的关联对象时,会出现此异常,因为此时已经没有有效的Session来执行数据库查询。 ...
为了解决这个问题,"图片延迟加载"(Lazy Load)技术应运而生。jQuery作为广泛使用的JavaScript库,提供了实现图片延迟加载的便利方法。 ### 一、什么是图片延迟加载? 图片延迟加载,也称为懒加载,是一种优化...
在这个延迟加载的场景中,面向对象编程可能涉及以下关键概念: 1. **构造函数**:用于初始化新创建的对象。在延迟加载的例子中,我们可以定义一个构造函数,比如`LazyLoader`,它接收图片数组或其他需要延迟加载的...
4. **异常处理**:在某些情况下,如果DLL加载失败,系统会抛出一个异常。为了处理这种情况,需要在代码中加入适当的异常处理机制。 总的来说,延迟加载库是一种实用的技术,可以在保持程序性能的同时减少资源消耗。...
这段代码定义了一个`sleep`函数,它通过循环等待直到达到指定的延迟时间。需要注意的是,由于JavaScript是单线程执行的,因此这种方法会阻塞其他任务的执行,可能会导致页面失去响应。 #### 性能考虑与最佳实践 ...
在这个映射文件中,`lazy="true"`表明了`addresses`集合属性将采用延迟加载的方式。这意味着当`Person`对象被加载时,并不会立即加载`addresses`集合中的所有`Address`对象。 **延迟加载触发时机** 延迟加载会在...
2. **jQuery LazyLoad插件**:这是一个流行的jQuery插件,它提供了简单易用的接口来实现图片的懒加载。通过`$(window).lazyload()`方法,配合适当的配置选项,可以轻松实现图片延迟加载。 3. **Intersection ...
1. **修改Fetch策略**:将Fetch策略设置为`fetch="join"`,即在查询主对象的同时通过JOIN查询的方式加载关联对象,这样就不会抛出延迟加载异常。 2. **禁用延迟加载**:将`lazy="false"`,这样就会在查询主对象时...
此时,如果存在延迟加载的对象,其加载动作还没来得及执行,Session就已经被销毁,那么在后续尝试访问这些延迟加载属性时,就会抛出异常,提示对象已经被托管给事务,无法再执行数据库操作。 为了解决这个问题,...
在这个例子中,`non-critical.css`只会在视口宽度至少为768px时加载,这有助于减少首次加载时不必要的网络请求。 在给定的文件`lazyLoadJC.js`中,可能实现了一个JavaScript库,用于延迟加载JS和CSS资源。这个库...
网页图片延迟加载,也称为懒加载(Lazy Loading),是一种优化网页性能的技术,它允许网页在初始加载时只加载可见区域的图片,而将其他非可视区域的图片推迟到用户滚动到相应位置时再加载。这种技术可以显著减少网页...
标题“ListView延迟加载图片改进”正是针对这个问题,通过延迟加载技术来提升用户体验。 延迟加载(Lazy Loading)是一种策略,它不一次性加载所有图片,而是当用户滚动到某一个列表项时,才加载对应的图片。这种...
**jQuery延迟加载图片技术详解** 在网页设计中,图片往往是页面加载速度的瓶颈。为了提高网页的加载效率和用户体验,开发者通常会采用延迟加载(Lazy Loading)技术,尤其是在图片众多的场景下。jQuery库提供了简单...
这是一款有关网页图片延迟加载的小案例,主要包括了图片随滚动条延迟加载、整个页面loading延迟加载、图片延迟加载、iframe打开页面延迟加载的技术。通过延迟加载技术可以提升网站的性能,有需要的朋友可以下载看看...