java.sql.SQLException: Streaming result set com.mysql.jdbc.RowDataDynamic@dafa2c
 is still active. Only one streaming result set may be open and in use per-conne
ction. Ensure that you have called .close() on  any active result sets before at
tempting more queries.
        at com.mysql.jdbc.MysqlIO.checkForOutstandingStreamingData(MysqlIO.java:
1805)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:835)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:956)
        at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:928)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:1871)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:1805)
        at com.mysql.jdbc.Statement.executeQuery(Statement.java:1143)
        at org.apache.jsp.index_jsp._jspService(index_jsp.java:310)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:324)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
92)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)

解决方案 »

  1.   

    你的数据库里一行有2个BLOB类型的字段,而MySQL 只允许在一个连接里面使用一个Stream 流,其他的必须先关闭打开的这个,再打开下一个。查一下你的代码吧!你在使用第二个BLOB 流的时候,前一个忘记关闭了。
      

  2.   

    晕,可能是同时进行的原因我觉得,因为这个是WEB服务器上的,如果2个用户同时操作就会出现这情况,
    请教如何解决这个问题,谢谢!
      

  3.   

    呵呵!那就是你的Connection 不小心共享了!记得 ,涉及到Connection con 的千万不要有 static 之类的东西。 包括 singleton 都不要有,
    否则你的2个用户将拿到同一个连接!