`
ghost_fly
  • 浏览: 111036 次
  • 性别: Icon_minigender_1
  • 来自: 长沙
社区版块
存档分类
最新评论

请教:JAVA读取word流异常:Unable to read entire block

    博客分类:
  • JAVA
阅读更多
请问在JAVA 用POI 在读取Oracle数据库中的Blob word文件时报如下错误,该如何解决,有的读取时没有问题,有的就会报这样的错误.
异常如下:
java.io.IOException: Unable to read entire block; 2 bytes read; expected 512 bytes
at org.apache.poi.poifs.storage.RawDataBlock.<init>(RawDataBlock.java:68)
at org.apache.poi.poifs.storage.RawDataBlockList.<init>(RawDataBlockList.java:52)
at org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(POIFSFileSystem.java:87)
at org.textmining.extraction.word.WordTextExtractor.initWordHeader(Unknown Source)
at org.textmining.extraction.word.Word97TextExtractor.<init>(Unknown Source)
at Timing.ReadWord.ReadWord(ReadWord.java:15)
at Timing.GetInfo.ReadWord(GetInfo.java:11)
at Timing.TimingMaster.RunGongGao(TimingMaster.java:783)
at Timing.TimingMaster.main(TimingMaster.java:49)

在网上看了下,说这个POI的一个BUG,也照所说的方法试了但也不行
http://www.blogjava.net/alex/archive/2006/08/10/62823.html

另外有的还会报这样的错误:
java.io.IOException: Invalid header signature; read 7311066695147732796, expected -2226271756974174256
at org.apache.poi.poifs.storage.HeaderBlockReader.<init>(HeaderBlockReader.java:100)
at org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(POIFSFileSystem.java:84)
at org.textmining.extraction.word.WordTextExtractor.initWordHeader(Unknown Source)
at org.textmining.extraction.word.Word97TextExtractor.<init>(Unknown Source)
at Timing.ReadWord.ReadWord(ReadWord.java:15)
at Timing.GetInfo.ReadWord(GetInfo.java:11)

哪位高手遇到过这样问题,有什么好的解决方案吗.
谢谢.

分享到:
评论

相关推荐

    C# to Java 代码转换工具

    Folder conversion: Entire folders of C# code files are converted to Java code files.(文件夹转换) 2. Code snippet and file conversion: Our snippet conversion accuracy is outstanding and does not ...

    Java Crash Course [2016]

    Java Crash Course - The Complete Beginner's Course to Learn Java Programming in 21 Clear-Cut Lessons Paperback – December 20, 2016 Are you bored of the traditional methods people tell you to use to ...

    解决linux磁盘扩容出现Bad magic number in super-block while trying问题

    在Linux环境中,对磁盘进行扩容时可能会遇到各种问题,其中一种常见的错误是"Bad magic number in super-block while trying to open"。这个错误通常发生在尝试使用`resize2fs`命令扩展文件系统时,表明系统无法识别...

    tex-源文档组织结构.pdf

    - **Left-to-right Mode (从左到右模式)**:文本从左到右输出,不会换行。 这些模式确保了文档的正确排版,并提供了丰富的命令和环境来帮助文档的编写。 ##### 2. 大文档项目 对于大型文档项目,推荐使用以下命令...

    javacard applet 开发实例 正常运行 带jar包

    Sets the content of the entire sector 8 (3 block 8.0, 8.1, 8.2) and the first 4 bytes of block 9.0; total 52bytes. Filed Length (in bytes) Data Comments CLA 1 0x80 Fixed class for ...

    Java邮件开发Fundamentals of the JavaMail API

    jGuru has been dedicated to promoting the growth of the Java technology community through evangelism, education, and software since 1995. You can find out more about their activities, including ...

    基于JAVA网络考试系统设计软件程序源码+数据库+WORD毕业设计论文文档.zip

    基于JAVA网络考试系统设计软件程序源码+数据库+WORD毕业设计论文文档。 网络考试系统主要用于实现高校在线考试,基本功能包括:自动组卷、试卷发布、试卷批阅、试卷成绩统计等。本系统结构如下: (1)学生端: ...

    RecurrentJava:Java中的深度递归神经网络

    递归Java RecurrentJava是Java中Andrej Karpathy的的重新实现。 它当前具有: 深度递归神经网络 长短期记忆网络 门控递归单元神经网络 通过自动微分处理的时间反向传播。 ExamplePaulGraham.java演示了如何进行...

    Absolute Java(PEARSON,6ed,2015)

    Step-by-step VideoNote Tutorials enhance the programming concepts presented in your Pearson textbook by allowing students to view the entire problem-solving process outside of the classroom–when they...

    Java The Complete Reference ,11th Edition.pdf

    Best-selling programming author Herb Schildt covers the entire Java language, including its syntax, keywords, and fundamental programming principles. You’ll also find information on key portions of ...

    BURNINTEST--硬件检测工具

    will need to be sent to Microsoft as per the normal process. However, a log entry will be added to the normal BurnInTest log. - Changes to trace logging to reduce activity when trace logging is not...

    Oracle数据库时间类型与JAVA之间的转换和应用.pdf

    如果没有对日期格式进行适当的处理,直接将Java中以字符串形式表示的日期(如`2011-03-22 22:39:34.0`)插入Oracle数据库中,可能会遇到`ORA-01830: date format picture ends before converting entire input ...

    BCGControlBarPro.v12.00

    Implemented ability to add Ribbon Galleries to the dialogs (see screenshot). The new class CBCGPRibbonGalleryCtrl may be used for this purpose. Please take a look at BCGPMSOffice2007Demo example ...

    The.Agile.Consultant.Guiding.Clients.to.Enterprise.Agility.epub

    Learn the agile philosophy of lean processes, incremental delivery, deep client participation, decentralized authority, and just-in-time planning to bring speed, creativity, empowerment and increased ...

    jBroadcaster:Java 平台的事件广播

    // In your entire Java or Android application new jBroadcaster(); 使用 jBroadcaster 处理事件 要监听事件,只需订阅传递 addEventListener 方法一个新的 Handler 类型回调的事件 // The addEventListener ...

    squashfs1.3r3.tar.gz

    SQUASHFS 1.3r3 - A squashed read-only filesystem for Linux Copyright 2004 Phillip Lougher (phillip@lougher.demon.co.uk) Released under the GPL licence (version 2 or later). Squashfs is currently ...

    java 常用设计模式chm

    * Permission to administer the entire sytem. */ public static final int SYSTEM_ADMIN = 1; /** * Permission to administer a particular forum. */ public static final int FORUM_ADMIN = 2; /** * ...

    Java™ Swing, 2nd Edition

    What This Book Covers This book gives a complete introduction to the entire Swing component set. Of course, it shows you how to use all of the components: how to display them on the screen, ...

Global site tag (gtag.js) - Google Analytics