Premature end of file错误,高手来帮忙

luofei8411 2008-01-14 05:07:03
我用的dom4j来解析xml文件,在本地直接读取没什么问题,但把xml文件以请求的方式发到服务器解析就报org.xml.sax.SAXParseException: Premature end of file错.我把
request.getInputStream()的输出流打印出来,值为空.这到底是什么原因啊!!
...全文
23919 12 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
xyq1558 2012-07-25
  • 打赏
  • 举报
回复
我也遇到了,加了句urlConn.addRequestProperty("content-type","text/xml;charset=UTF-8")代码;直接就报org.xml.sax.SAXParseException: Premature end of file.
易水晗天 2012-05-14
  • 打赏
  • 举报
回复
我也遇到这样的问题 真无语啦
xzz7175327 2012-02-24
  • 打赏
  • 举报
回复
我也用Xstream解析xml的时候也遇到这样的情况,求助啊...困惑
zhijunwoo 2011-02-22
  • 打赏
  • 举报
回复
嗯。。今天我也遇到了。。该怎么办,帮帮忙。。
boquanwang 2010-05-20
  • 打赏
  • 举报
回复
俺也,不晓得咋回事
  • 打赏
  • 举报
回复
我今天也出现了同样的问题啊。。。郁闷。。。。。大虾。。。帮帮俺吧。。。。
  • 打赏
  • 举报
回复
我今天也出现了同样的问题啊。。。郁闷。。。。。大虾。。。帮帮俺吧。。。。
  • 打赏
  • 举报
回复
我今天也出现了同样的问题啊。。。郁闷。。。。。大虾。。。帮帮俺吧。。。。
小饕1900 2008-02-22
  • 打赏
  • 举报
回复
我也遇到类似问题,把一字符串通过dom4j解析成xml,,字符串是well formed的 ,可是解析出来的document为空,
报了org.dom4j.DocumentException: Error on line -1 of document : Premature end of file. Nested exception: Premature end of file.的错误.
同样程序在2个独立的环境,一个解析正常,一个解析报上面的错误,达人一起分析看看可能什么原因,初步认为是环境容器造成的编码问题.
解析正常的环境为weblogic 8.1.4 +jdk 1.4.2
解析报错的环境为weblogic 10+jdk1.5
zhangli0803 2008-01-17
  • 打赏
  • 举报
回复
顶你一下~
笔记本的风扇控制 ---------------------------------------- 09 November 2006. Summary of changes for version 20061109: 1) ACPI CA Core Subsystem: Optimized the Load ASL operator in the case where the source operand is an operation region. Simply map the operation region memory, instead of performing a bytewise read. (Region must be of type SystemMemory, see below.) Fixed the Load ASL operator for the case where the source operand is a region field. A buffer object is also allowed as the source operand. BZ 480 Fixed a problem where the Load ASL operator allowed the source operand to be an operation region of any type. It is now restricted to regions of type SystemMemory, as per the ACPI specification. BZ 481 Additional cleanup and optimizations for the new Table Manager code. AcpiEnable will now fail if all of the required ACPI tables are not loaded (FADT, FACS, DSDT). BZ 477 Added #pragma pack(8/4) to acobject.h to ensure that the structures in this header are always compiled as aligned. The ACPI_OPERAND_OBJECT has been manually optimized to be aligned and will not work if it is byte-packed. Example Code and Data Size: These are the sizes for the OS- independent acpica.lib produced by the Microsoft Visual C++ 6.0 32- bit compiler. The debug version of the code includes the debug output trace mechanism and has a much larger code and data size. Previous Release: Non-Debug Version: 78.1K Code, 17.1K Data, 95.2K Total Debug Version: 155.4K Code, 63.1K Data, 218.5K Total Current Release: Non-Debug Version: 77.9K Code, 17.0K Data, 94.9K Total Debug Version: 155.2K Code, 63.1K Data, 218.3K Total 2) iASL Compiler/Disassembler and Tools: Fixed a problem where the presence of the _OSI predefined control method within complex expressions could cause an internal compiler error. AcpiExec: Implemented full region support for multiple address spaces. SpaceId is now part of the REGION object. BZ 429 ---------------------------------------- 11 Oc

67,545

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧