0

我在 Ubuntu 上的 play v1.2.3 实例直到昨天都运行良好。我不确定我是否同时在 Ubuntu 上安装了任何新软件包。当我现在尝试运行 play (run/start) 时,我得到下面复制的异常。我曾尝试清理 tmp 目录,但没有帮助。任何其他想法(除了重新设置游戏)将不胜感激。谢谢

Exception in thread "main" play.exceptions.UnexpectedException: Unexpected Error
    at play.vfs.VirtualFile.contentAsString(VirtualFile.java:180)
    at play.classloading.hash.ClassStateHashCreator.getClassDefsForFile(ClassStateHashCreator.java:83)
    at play.classloading.hash.ClassStateHashCreator.scan(ClassStateHashCreator.java:58)
    at play.classloading.hash.ClassStateHashCreator.scan(ClassStateHashCreator.java:63)
    at play.classloading.hash.ClassStateHashCreator.scan(ClassStateHashCreator.java:63)
    at play.classloading.hash.ClassStateHashCreator.scan(ClassStateHashCreator.java:63)
    at play.classloading.hash.ClassStateHashCreator.computePathHash(ClassStateHashCreator.java:48)
    at play.classloading.ApplicationClassloader.computePathHash(ApplicationClassloader.java:371)
    at play.classloading.ApplicationClassloader.<init>(ApplicationClassloader.java:62)
    at play.Play.init(Play.java:272)
    at play.server.Server.main(Server.java:158)
Caused by: java.lang.RuntimeException: java.io.IOException: Input/output error
    at play.libs.IO.readContentAsString(IO.java:62)
    at play.libs.IO.readContentAsString(IO.java:49)
    at play.vfs.VirtualFile.contentAsString(VirtualFile.java:178)
    ... 10 more
Caused by: java.io.IOException: Input/output error
    at java.io.FileInputStream.readBytes(Native Method)
    at java.io.FileInputStream.read(FileInputStream.java:220)
    at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
    at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
    at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
    at java.io.InputStreamReader.read(InputStreamReader.java:167)
    at java.io.Reader.read(Reader.java:123)
    at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1364)
    at org.apache.commons.io.IOUtils.copy(IOUtils.java:1340)
    at org.apache.commons.io.IOUtils.copy(IOUtils.java:1315)
    at org.apache.commons.io.IOUtils.toString(IOUtils.java:525)
    at play.libs.IO.readContentAsString(IO.java:60)
4

1 回答 1

0

我项目中的一个 Java 类不知何故损坏了。当我尝试将整个目录复制到另一个位置时,我注意到了这一点 - 复制操作生成了一条错误消息,指定了损坏的文件(我相信也可以通过其他方式检测到)。

删除损坏的文件(并用相同的代码替换)会导致正常行为。希望这对其他人有帮助。

于 2012-11-08T18:06:20.863 回答