java.lang.Exception: Someone tried to close the stream System.err

Atlassian JIRA | Igor Ristic | 1 decade ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Quoting the error description: {quote} I can confirm that the cvs components of JIRA do indirectly attempt close the logs, resulting in a close of System.err, which, due to tomcat invocation redirection, is the same as stdout. I have attached a wrapping Stream to stderr that dumps a stacktrace whenever someone attempts to close it. Here is it's output (there are plenty of those at JIRA startup): {noformat} java.lang.Exception: Someone tried to close the stream System.err at be.rmi.intranet.tomcat.IOGuardianListener$GuardedStream.close(IOGuardianListener.java:95) at org.apache.jasper.util.SystemLogHandler.close(SystemLogHandler.java:123) at org.apache.jasper.util.SystemLogHandler.close(SystemLogHandler.java:123) at org.apache.jasper.util.SystemLogHandler.close(SystemLogHandler.java:123) at com.jcraft.jsch.IO.close(Unknown Source) at com.jcraft.jsch.Channel.disconnect(Unknown Source) at org.netbeans.lib.cvsclient.connection.ExtConnection.close(Unknown Source) at com.atlassian.jira.vcs.cvsimpl.CvsRepositoryUtilImpl.updateCvs(CvsRepositoryUtilImpl.java:427) at com.atlassian.jira.vcs.cvsimpl.CvsRepository.updateCvs(CvsRepository.java:232) at com.atlassian.jira.vcs.cvsimpl.CvsRepository.updateRepository(CvsRepository.java:287) at com.atlassian.jira.vcs.DefaultRepositoryManager.updateRepository(DefaultRepositoryManager.java:547) at com.atlassian.jira.vcs.DefaultRepositoryManager.updateRepositories(DefaultRepositoryManager.java:500) at com.atlassian.jira.service.services.vcs.VcsService.run(VcsService.java:54) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:67) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:48) at org.quartz.core.JobRunShell.run(JobRunShell.java:191) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516) {noformat} Here is, basically, the code used to 'guard' System.err stream: {noformat} PrintStream err = System.err; err.flush(); System.setErr(new GuardedStream(err,"System.err")); {noformat} GuardedStream follows simply the delegation pattern, except for close() where it refuses the close() operation and dumps a stacktrace to stdout. {quote}

    Atlassian JIRA | 1 decade ago | Igor Ristic
    java.lang.Exception: Someone tried to close the stream System.err
  2. 0

    Quoting the error description: {quote} I can confirm that the cvs components of JIRA do indirectly attempt close the logs, resulting in a close of System.err, which, due to tomcat invocation redirection, is the same as stdout. I have attached a wrapping Stream to stderr that dumps a stacktrace whenever someone attempts to close it. Here is it's output (there are plenty of those at JIRA startup): {noformat} java.lang.Exception: Someone tried to close the stream System.err at be.rmi.intranet.tomcat.IOGuardianListener$GuardedStream.close(IOGuardianListener.java:95) at org.apache.jasper.util.SystemLogHandler.close(SystemLogHandler.java:123) at org.apache.jasper.util.SystemLogHandler.close(SystemLogHandler.java:123) at org.apache.jasper.util.SystemLogHandler.close(SystemLogHandler.java:123) at com.jcraft.jsch.IO.close(Unknown Source) at com.jcraft.jsch.Channel.disconnect(Unknown Source) at org.netbeans.lib.cvsclient.connection.ExtConnection.close(Unknown Source) at com.atlassian.jira.vcs.cvsimpl.CvsRepositoryUtilImpl.updateCvs(CvsRepositoryUtilImpl.java:427) at com.atlassian.jira.vcs.cvsimpl.CvsRepository.updateCvs(CvsRepository.java:232) at com.atlassian.jira.vcs.cvsimpl.CvsRepository.updateRepository(CvsRepository.java:287) at com.atlassian.jira.vcs.DefaultRepositoryManager.updateRepository(DefaultRepositoryManager.java:547) at com.atlassian.jira.vcs.DefaultRepositoryManager.updateRepositories(DefaultRepositoryManager.java:500) at com.atlassian.jira.service.services.vcs.VcsService.run(VcsService.java:54) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:67) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:48) at org.quartz.core.JobRunShell.run(JobRunShell.java:191) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516) {noformat} Here is, basically, the code used to 'guard' System.err stream: {noformat} PrintStream err = System.err; err.flush(); System.setErr(new GuardedStream(err,"System.err")); {noformat} GuardedStream follows simply the delegation pattern, except for close() where it refuses the close() operation and dumps a stacktrace to stdout. {quote}

    Atlassian JIRA | 1 decade ago | Igor Ristic
    java.lang.Exception: Someone tried to close the stream System.err

    Root Cause Analysis

    1. java.lang.Exception

      Someone tried to close the stream System.err

      at be.rmi.intranet.tomcat.IOGuardianListener$GuardedStream.close()
    2. be.rmi.intranet
      IOGuardianListener$GuardedStream.close
      1. be.rmi.intranet.tomcat.IOGuardianListener$GuardedStream.close(IOGuardianListener.java:95)
      1 frame
    3. GWT dev
      SystemLogHandler.close
      1. org.apache.jasper.util.SystemLogHandler.close(SystemLogHandler.java:123)
      2. org.apache.jasper.util.SystemLogHandler.close(SystemLogHandler.java:123)
      3. org.apache.jasper.util.SystemLogHandler.close(SystemLogHandler.java:123)
      3 frames
    4. JSch
      Channel.disconnect
      1. com.jcraft.jsch.IO.close(Unknown Source)
      2. com.jcraft.jsch.Channel.disconnect(Unknown Source)
      2 frames
    5. org.netbeans.lib
      ExtConnection.close
      1. org.netbeans.lib.cvsclient.connection.ExtConnection.close(Unknown Source)
      1 frame
    6. com.atlassian.jira
      ServiceRunner.execute
      1. com.atlassian.jira.vcs.cvsimpl.CvsRepositoryUtilImpl.updateCvs(CvsRepositoryUtilImpl.java:427)
      2. com.atlassian.jira.vcs.cvsimpl.CvsRepository.updateCvs(CvsRepository.java:232)
      3. com.atlassian.jira.vcs.cvsimpl.CvsRepository.updateRepository(CvsRepository.java:287)
      4. com.atlassian.jira.vcs.DefaultRepositoryManager.updateRepository(DefaultRepositoryManager.java:547)
      5. com.atlassian.jira.vcs.DefaultRepositoryManager.updateRepositories(DefaultRepositoryManager.java:500)
      6. com.atlassian.jira.service.services.vcs.VcsService.run(VcsService.java:54)
      7. com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:67)
      8. com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:48)
      8 frames
    7. quartz
      SimpleThreadPool$WorkerThread.run
      1. org.quartz.core.JobRunShell.run(JobRunShell.java:191)
      2. org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
      2 frames