Uploaded image for project: 'FtpServer'
  1. FtpServer
  2. FTPSERVER-242

DbUserManager Operates on closed result ret

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.0-M4
    • 1.0.0-RC1
    • Core
    • None
    • Java6 Linux MySQL backing database Connector/J 5.x

    Description

      It appears DbUserManager operates on a closed result set.

      DbUserManager.getUserByName() calls a private method ResultSet selectUserByName() which closes the stmt (which I believe also closes the ResultSet, at least in mysql)

      A fix would be to simply collapse the logic into a single method.

      Exception:

      DbUserManager.getUserByName()
      java.sql.SQLException: Operation not allowed after ResultSet closed
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
      at com.mysql.jdbc.ResultSet.checkClosed(ResultSet.java:644)
      at com.mysql.jdbc.ResultSet.next(ResultSet.java:6674)
      at org.apache.commons.dbcp.DelegatingResultSet.next(DelegatingResultSet.java:169)
      at org.apache.ftpserver.usermanager.impl.DbUserManager.getUserByName(DbUserManager.java:484)
      at org.apache.ftpserver.command.impl.USER.execute(USER.java:142)
      at org.apache.ftpserver.impl.DefaultFtpHandler.messageReceived(DefaultFtpHandler.java:147)
      at org.apache.ftpserver.listener.nio.FtpHandlerAdapter.messageReceived(FtpHandlerAdapter.java:62)
      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.listener.nio.FtpLoggingFilter.messageReceived(FtpLoggingFilter.java:90)
      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)

      Attachments

        Activity

          People

            niklas Niklas Therning
            randy@fixflyer.com Randy Prager
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: