[ERROR]Premature end of file
原因:
解析xml文档时,文件已经从头读到了尾.
在解析前遍历输出xml文档内容.
解决办法:再重建对象.
说明:解析前调用InputStream.reset()方法,不报错,但是不能解决此问题.
Repositions this stream to the position at the time the mark method was last called on this input stream.
org.xml.sax.SAXParseException: Premature end of file.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:465)
at org.dom4j.io.SAXReader.read(SAXReader.java:343)
分享到:
相关推荐
### Caffe官网翻译知识点概述 #### 1. Brewing Imagenet **数据准备** - **环境**: 所有命令在`cafferoot`目录下执行。 - **数据**: 使用ILSVRC12挑战赛的数据集。 - **组织结构**: 训练数据与测试数据分别存放。...
在本文中,我们将详细探讨"PHP Parse Error: syntax error, unexpected $end"错误的产生原因及其解决办法。此问题在配置服务器或编写PHP脚本时可能会遇到,通常提示是在代码的特定行数发生了语法错误。下面,我们将...
这可以通过`try-catch`语句或者连接`error`信号来实现。同时,考虑到用户体验,可以添加进度条或提示信息来反馈传输状态。 总的来说,这个项目涉及到QT的TCP网络编程和GUI界面设计,虽然界面设计有待提升,但核心的...
### 解压cpio文件 在Linux环境中,`cpio`是一种常见的用于归档文件的工具。它可以用来创建、查看和提取归档文件。本篇内容将详细介绍如何解压`cpio`格式的文件,特别是那些经过gzip压缩的文件。...
/* 04h Length of APP0 Field */ BYTE Identifier[5]; /* 06h "JFIF" (zero terminated) Id String */ BYTE Version[2]; /* 0Bh JFIF Format Revision */ BYTE Units; /* 0Dh Units used for Resolution */ ...
**有限差分时域法(FDTD)简介** 有限差分时域法(Finite Difference Time Domain,简称FDTD)是一种广泛应用于电磁场数值计算的方法,它通过在时间和空间上对麦克斯韦方程进行离散化来求解电磁问题。...
throw std::runtime_error("Premature end of input file"); } gzclose(gzipFile); inputFile.close(); } ``` 在解压缩方面,我们可以使用`gzopen`以读模式打开gzip文件,然后通过`gzread`读取解压缩后的数据...
查看apache日志,发觉是mod_fcgid模块异常,提示”Connection reset by peer:mod_fcgid:error reading data from FastCGI server”、”Premature end of script headers:index.php”、”process /usr/… apache/cgi-...
此版本解决dpkg报错dpkg-deb: error: archive 'device-tree-compiler_1.4.5-3_amd64.deb' has premature member 'control.tar.xz' before 'control.tar.gz' bug
解决Failed to connect to remote VM com.sun.jdi.connect.spi.ClosedConnectionException错误,tomcat远程调试
fields at the end of some of the subtables. The disassembler now emits a comment if a buffer appears to be a ResourceTemplate, but cannot be disassembled as such because the EndTag does not appear at...
15.11 premature termination of client or server 390 15.12 summary 397 chapter 16. sun rpc 16.1 introduction 399 16.2 multithreading 407 16.3 server binding 411 16.4 authentication 414 16.5 ...
在Java编程环境中,"java.security.InvalidKeyException: illegal Key Size" 是一个常见的错误,通常发生在加密或解密操作中。这个错误表示你试图使用的密钥长度超过了Java默认的安全限制。在给定的上下文中,这个...
a premature failure of the whole battery. Cell balancing is a way of compensating for these weaker cells by equalizing the charge on all the cells in the chain, thus extending the battery life.
connection.setRequestProperty("Range", "bytes=" + startByte + "-" + endByte); InputStream in = connection.getInputStream(); ``` 服务端需要支持处理这种请求,并返回206 Partial Content状态码,同时在...
DBT3514W The db2prereqcheck utility failed to find the following 32-bit library file: "/lib/i386-libpam.so" 解决方法: sudo dpkg --force-architecture -i libpam0g_1.1.8-3.6ubuntu2_i386.deb sudo ln -s /...
A malfunction in these components or boards can occur immediately or the apparatus may perform for weeks, months, or even years before an unpredictable and premature breakdown causes a field failure.
however, PSO is easy to get trapped in local extremum, to have premature convergence or stagnation. In order to help PSO strike a balance between individual diversity and swarm convergence, this ...