gpt4 book ai didi

java - hibernate 中的连接代理错误

转载 作者:行者123 更新时间:2023-11-30 04:37:13 25 4
gpt4 key购买 nike

当我们通过 hibernate 获得连接时,当我们使用多个连接时,会出现错误连接代理错误

错误消息类似于下面的语句

SEVERE: Servlet.service() for servlet action threw exception org.hibernate.HibernateException: connnection proxy not usable after transaction completion at org.hibernate.jdbc.BorrowedConnectionProxy.invoke(BorrowedConnectionProxy.java:66) at $Proxy0.prepareStatement(Unknown Source) at com.indiamoney.api.advisor.dashboard.dao.impl.AdvisorDashboardDAOImpl.getCustemerRequestsCount(AdvisorDashboardDAOImpl.java:571) at com.indiamoney.api.advisor.dashboard.bo.AdvisorDashboardBO.getCustemerRequestsCount(AdvisorDashboardBO.java:226) at com.indiamoney.advisor.dashboard.action.AdvisorDashboardAction.dashboardDetails(AdvisorDashboardAction.java:307) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:269) at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:170) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125) 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:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source) Nov 1, 2012 9:18:37 PM org.apache.tomcat.util.http.Parameters processParameters WARNING: Parameters: Invalid chunk ignored. Nov 1, 2012 9:18:37 PM org.apache.tomcat.util.http.Parameters processParameters WARNING: Parameters: Invalid chunk ignored.

最佳答案

我在使用 hibernate 3.2.7/Spring 3.0.5 和 ope-session-in-view 过滤器的更棘手的用例中遇到了异常。大概是因为分离的实体作为参数传递给新线程并在单独的事务中更新。

关于java - hibernate 中的连接代理错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13195487/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com