很少,我的生产应用程序在调用FileChannel
上的方法时遇到意外的ClosedByInterruptException
。根据Java文档,这发生在调用线程处于中断状态时。有趣的是,我的应用程序从不中断任何线程。这似乎是从应用程序下面发生的。某种系统中断也许?有没有人遇到过这个问题?Unexplained ClosedByInterruptException。 Java FileChannel Bug?
java.nio.channels.ClosedByInterruptException
at java.nio.channels.spi.AbstractInterruptibleChannel.end(\
AbstractInterruptibleChannel.java:184)
at sun.nio.ch.FileChannelImpl.size(FileChannelImpl.java:314)
...
你有没有取消任何期货? – jtahlborn 2012-04-10 00:45:09
你的envinronment是什么?像Tomcat或普通Java应用程序? – dash1e 2012-04-10 00:59:48
该应用程序是一个管理文件通道的简单Web应用程序。环境是Linux,Java 1.6和Resin Web容器。 Web应用程序不执行线程管理。它不使用线程池执行程序或期货。 – Elliot 2012-04-10 03:15:27