jdbc(连接池)问题 — oracle-tech

    Forum Stats

  • 3,716,128 Users
  • 2,242,960 Discussions
  • 7,845,836 Comments

Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

jdbc(连接池)问题

673652
673652 Member Posts: 23
edited March 2009 in 中间件
配置:windows2000 weblogic812 oracle10.0.0.2

使用连接池,jdbc日之中只有下面问题,请问谁遇见过下面问题,请帮忙分析下,谢谢
SQLException: SQLState(null) vendor code(17133)
java.sql.SQLException: 试图在处理 SQL 之后设置转义处理
at oracle.jdbc.driver.DatabaseError.throwSqlException(Ljava.lang.String;Ljava.lang.String;I)V(Optimized Method)
at oracle.jdbc.driver.DatabaseError.throwSqlException(ILjava.lang.Object;)V(DatabaseError.java:161)
at oracle.jdbc.driver.DatabaseError.throwSqlException(I)V(DatabaseError.java:226)
at oracle.jdbc.driver.OracleSql.setEscapeProcessing(Z)V(OracleSql.java:342)
at oracle.jdbc.driver.OraclePreparedStatement.setEscapeProcessing(Z)V(OraclePreparedStatement.java:3189)
at weblogic.jdbc.common.internal.ConnectionEnv.cleanUpStatementForReUse(Ljava.sql.PreparedStatement;)V(ConnectionEnv.java:1080)
at weblogic.jdbc.common.internal.ConnectionEnv.returnCachedStatement(Lweblogic.jdbc.common.internal.StatementHolder;)V(Optimized Method)
at weblogic.jdbc.wrapper.Statement.internalClose(Z)V(Statement.java:271)
at weblogic.jdbc.wrapper.Statement.close()V(Statement.java:293)
at org.hibernate.jdbc.AbstractBatcher.closePreparedStatement(Ljava.sql.PreparedStatement;)V(Optimized Method)
at org.hibernate.jdbc.AbstractBatcher.closeStatement(Ljava.sql.PreparedStatement;)V(AbstractBatcher.java:218)
at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(Ljava.sql.PreparedStatement;)V(AbstractBatcher.java:234)
at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(Ljava.sql.PreparedStatement;Ljava.sql.ResultSet;)V(AbstractBatcher.java:162)
at org.hibernate.loader.Loader.doQuery(Lorg.hibernate.engine.SessionImplementor;Lorg.hibernate.engine.QueryParameters;Z)Ljava.util.List;(Optimized Method)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Lorg.hibernate.engine.SessionImplementor;Lorg.hibernate.engine.QueryParameters;Z)Ljava.util.List;(Optimized Method)
at org.hibernate.loader.Loader.doList(Lorg.hibernate.engine.SessionImplementor;Lorg.hibernate.engine.QueryParameters;)Ljava.util.List;(Loader.java:2145)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Lorg.hibernate.engine.SessionImplementor;Lorg.hibernate.engine.QueryParameters;)Ljava.util.List;(Loader.java:2029)
at org.hibernate.loader.Loader.list(Lorg.hibernate.engine.SessionImplementor;Lorg.hibernate.engine.QueryParameters;Ljava.util.Set;[Lorg.hibernate.type.Type;)Ljava.util.List;(Loader.java:2024)
at org.hibernate.loader.custom.CustomLoader.list(Lorg.hibernate.engine.SessionImplementor;Lorg.hibernate.engine.QueryParameters;)Ljava.util.List;(CustomLoader.java:111)
at org.hibernate.impl.SessionImpl.listCustomQuery(Lorg.hibernate.loader.custom.CustomQuery;Lorg.hibernate.engine.QueryParameters;)Ljava.util.List;(SessionImpl.java:1655)
at org.hibernate.impl.AbstractSessionImpl.list(Lorg.hibernate.engine.query.NativeSQLQuerySpecification;Lorg.hibernate.engine.QueryParameters;)Ljava.util.List;(AbstractSessionImpl.java:142)
at org.hibernate.impl.SQLQueryImpl.list()Ljava.util.List;(SQLQueryImpl.java:164)
at com.belstar.pacificpm.service.assist.InvoiceOutputTypeService.getAllTypeSpe(Ljava.lang.String;Ljava.lang.String;)Ljava.util.List;(InvoiceOutputTypeService.java:169)
at com.belstar.pacificpm.service.business.WriteFile.Invoice(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;ILjava.io.RandomAccessFile;ZZZLjava.lang.Character;Ljava.lang.String;Ljava.lang.String;IILcom.belstar.pacificpm.assist.bo.JobDetails;Z)V(Optimized Method)
at com.belstar.pacificpm.service.business.WriteFile.WriteBody(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;ILjava.io.RandomAccessFile;JLjava.lang.String;Ljava.lang.String;Ljava.lang.String;IZZLjava.lang.Character;Ljava.lang.String;Ljava.lang.String;IILcom.belstar.pacificpm.assist.bo.JobDetails;)V(WriteFile.java:1117)
at com.belstar.pacificpm.process.action.GetPrintJobDetails.execute(Lorg.apache.struts.action.ActionMapping;Lorg.apache.struts.action.ActionForm;Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)Lorg.apache.struts.action.ActionForward;(Optimized Method)
at org.apache.struts.action.RequestProcessor.processActionPerform(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;Lorg.apache.struts.action.Action;Lorg.apache.struts.action.ActionForm;Lorg.apache.struts.action.ActionMapping;)Lorg.apache.struts.action.ActionForward;(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(HttpServlet.java:853)

===================

启动startWebLogic.cmd重定向日志:
一直出现的问题,每次连接jdbc数很少,都要通过测试连接池才能够用,这是怎么回事呢?


<2009-3-30 上午08时40分02秒 GMT+08:00> <Warning> <JDBC> <BEA-001153> <Forcibly releasing inactive connection "weblog[email protected]52ae6f" back into the connection pool "PMSA".>
ERROR [ExecuteThread: '18' for queue: 'weblogic.kernel.Default'] (?:?) - Could not toggle autocommit
java.sql.SQLException: Connection has already been closed.
at weblogic.jdbc.wrapper.PoolConnection.setAutoCommit(Z)V(Optimized Method)
at org.hibernate.transaction.JDBCTransaction.toggleAutoCommit()V(Optimized Method)
at org.hibernate.transaction.JDBCTransaction.rollbackAndResetAutoCommit()V(JDBCTransaction.java:186)
at org.hibernate.transaction.JDBCTransaction.rollback()V(JDBCTransaction.java:162)
at com.belstar.util.HibernateUtil.rollbackTransaction(Lorg.hibernate.Transaction;)V(HibernateUtil.java:128)
at com.belstar.pacificpm.service.assist.JobDetailsService.getPrintJobInfosByStatus(Ljava.lang.String;Ljava.lang.String;ZLjava.lang.String;Ljava.lang.String;)Ljava.util.List;(JobDetailsService.java:1225)
at com.belstar.pacificpm.process.action.ListPrintJobs.execute(Lorg.apache.struts.action.ActionMapping;Lorg.apache.struts.action.ActionForm;Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)Lorg.apache.struts.action.ActionForward;(ListPrintJobs.java:137)
at org.apache.struts.action.RequestProcessor.processActionPerform(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;Lorg.apache.struts.action.Action;Lorg.apache.struts.action.ActionForm;Lorg.apache.struts.action.ActionMapping;)Lorg.apache.struts.action.ActionForward;(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava.lang.Object;(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.FilterChainImpl;)V(ServletStubImpl.java:402)
at weblogic.servlet.internal.TailFilter.doFilter(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Ljavax.servlet.FilterChain;)V(TailFilter.java:28)
at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(FilterChainImpl.java:27)
at com.belstar.util.CharSetFilter.doFilter(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Ljavax.servlet.FilterChain;)V(CharSetFilter.java:35)
at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(FilterChainImpl.java:27)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava.lang.Object;(WebAppServletContext.java:6356)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.security.subject.AbstractSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(Optimized Method)
at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic.servlet.internal.ServletRequestImpl;Lweblogic.servlet.internal.ServletResponseImpl;)V(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic.kernel.ExecuteThread;)V(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:170)
at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)
======================

帖子经 user10434435编辑过
This discussion has been closed.