sinat_33415638
sinat_33415638
采纳率36.8%
2016-02-01 07:06 阅读 7.4k
已采纳

小白求助,java输入流问题

我有好几个方法每个里面都用到了sc.write(s);这个写入的方法,我在主函数里调用这些方法,结果报出:
Exception in thread "main" org.apache.poi.openxml4j.exceptions.OpenXML4JRuntimeException: Fail to save: an error occurs while saving the package : The part /docProps/app.xml fail to be saved in the stream with marshaller org.apache.poi.openxml4j.opc.internal.marshallers.DefaultMarshaller@4fbf1942
at org.apache.poi.openxml4j.opc.ZipPackage.saveImpl(ZipPackage.java:503)
at org.apache.poi.openxml4j.opc.OPCPackage.save(OPCPackage.java:1467)
at org.apache.poi.POIXMLDocument.write(POIXMLDocument.java:217)
at test.UseProcess.UseProcessSum(UseProcess.java:198)
at test.TestMain.main(TestMain.java:42)
Caused by: org.apache.poi.openxml4j.exceptions.OpenXML4JException: The part /docProps/app.xml fail to be saved in the stream with marshaller org.apache.poi.openxml4j.opc.internal.marshallers.DefaultMarshaller@4fbf1942
at org.apache.poi.openxml4j.opc.ZipPackage.saveImpl(ZipPackage.java:494)
... 4 more

我只执行一个方法就没事,我该怎么办啊?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

3条回答 默认 最新

  • 已采纳
    wen_wxpk 找工作那些事 2016-02-01 12:04

    at test.UseProcess.UseProcessSum(UseProcess.java:198)
    at test.TestMain.main(TestMain.java:42)
    看看这两句有没有问题

    点赞 评论 复制链接分享
  • w120699 w120699 2018-01-31 08:04

    是不是把写文件和关闭流放在循环里面了

    点赞 3 评论 复制链接分享
  • weixin_29444181 哈喽大海豚 2016-02-11 04:51

    能不能把test M ai n程序发来看看。

    点赞 评论 复制链接分享

相关推荐