mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Randy Prager (JIRA)" <j...@apache.org>
Subject [jira] Created: (FTPSERVER-214) DbUserManager seems to improperly cache a database connection
Date Thu, 06 Nov 2008 14:35:52 GMT
DbUserManager seems to improperly cache a database connection
-------------------------------------------------------------

                 Key: FTPSERVER-214
                 URL: https://issues.apache.org/jira/browse/FTPSERVER-214
             Project: FtpServer
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.0-M3
         Environment: Java6 SLES, Windows


            Reporter: Randy Prager


We have configured the FTP server with a org.apache.commons.dbcp.BasicDataSource datasource
and MySQL (com.mysql.jdbc.Driver) driver.

It appears that either the commons datasource idles/closes the connection, or MySQL does,
however the DbUserManager keeps a reference to the connection (see cachedConnection).

Should we let the datasource do that -- and remove any sort of cached connection.

java.io.EOFException
      at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1913)
      at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2304)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2803)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
      at com.mysql.jdbc.Connection.execSQL(Connection.java:3118)
      at com.mysql.jdbc.Connection.execSQL(Connection.java:3047)
      at com.mysql.jdbc.Statement.executeQuery(Statement.java:1166)
      at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
      at org.apache.ftpserver.usermanager.DbUserManager.getUserByName(DbUserManager.java:519)
      at org.apache.ftpserver.command.USER.execute(USER.java:139)
      at org.apache.ftpserver.DefaultFtpHandler.messageReceived(DefaultFtpHandler.java:138)
      at org.apache.ftpserver.listener.nio.FtpHandlerAdapter.messageReceived(FtpHandlerAdapter.java:60)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:752)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:414)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:49)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:832)
      at org.apache.ftpserver.filter.FtpLoggingFilter.messageReceived(FtpLoggingFilter.java:81)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:414)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:49)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:832)
      at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:60)
      at org.apache.mina.filter.logging.MdcInjectionFilter.filter(MdcInjectionFilter.java:137)
      at org.apache.mina.filter.util.CommonEventFilter.messageReceived(CommonEventFilter.java:70)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:414)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:49)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:832)
      at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:379)
      at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:173)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:414)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:49)
      at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:832)
      at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:60)
      at org.apache.mina.core.session.IoEvent.run(IoEvent.java:64)
      at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTask(OrderedThreadPoolExecutor.java:551)
      at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTasks(OrderedThreadPoolExecutor.java:543)
      at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.run(OrderedThreadPoolExecutor.java:487)
      at java.lang.Thread.run(Thread.java:619)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message