Premature end of file. Nested exception: Premature end of file.这个错是什么原因?

dd121011 2011-02-11 06:58:03
javax.servlet.ServletException: Error on line -1 of document : Premature end of file. Nested exception: Premature end of file.
at org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486)
at com.mdcl.mocha.bpm.portal.container.core.BPMRequestProcessor.process(Unknown Source)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
...全文
5519 8 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
dd121011 2011-02-12
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 humanity 的回复:]
类似的问题我没碰到过,不过我也碰到过另一个奇怪的问题。

<?xml 前面不能有任何东西,有时候在 Eclipse 这样的 IDE 里面因为字符集设置的原因看不到部分隐藏的字符,用 Notepad 却能看到最前面有多余的字符。这时会报错,但错误跟你的不一样。
[/Quote]
额。你说的这种情况怎么解决啊?调用不了trim方法之类的啊
humanity 2011-02-11
  • 打赏
  • 举报
回复
类似的问题我没碰到过,不过我也碰到过另一个奇怪的问题。

<?xml 前面不能有任何东西,有时候在 Eclipse 这样的 IDE 里面因为字符集设置的原因看不到部分隐藏的字符,用 Notepad 却能看到最前面有多余的字符。这时会报错,但错误跟你的不一样。



dd121011 2011-02-11
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 ruisheng_412 的回复:]
Premature end of file. Nested exception: Premature end of file.配置文件有问题,少了<或者没有结束符号的,什么的。
[/Quote]
这段是rxml里面的数据:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<method name="testGetObj">
<param name="t_boInsId">testid</param>
<param name="t_type">guwei</param>
</method>
</root>

会不会这段代码有问题?
ruisheng_412 2011-02-11
  • 打赏
  • 举报
回复
Premature end of file. Nested exception: Premature end of file.配置文件有问题,少了<或者没有结束符号的,什么的。
dd121011 2011-02-11
  • 打赏
  • 举报
回复
出错的代码:
	RequestXML rxml = new RequestXML();
System.out.println("testOfficeSuppliesToSaveAction");
List paramsname = new ArrayList(); //参数名列表
paramsname.add("t_boInsId");
paramsname.add("t_type");

List paramsvalue = new ArrayList(); //参数值列表
paramsvalue.add(t_boInsId);
paramsvalue.add("guwei");
System.out.println("testOfficeSuppliesToSaveAction2");
// testGetObj为服务端所要调用的方法
rxml.addMethod("testGetObj", paramsname, paramsvalue);

URLClient uc = new URLClient();
System.out.println("testOfficeSuppliesToSaveAction3");

System.out.println("xml:" +rxml.getXml().toString());
System.out.println("xml:" +rxml.getURL());
System.out.println("xml:" +rxml.toString());
//获取数据调用getData 方法,保存数据调用saveData 方法

System.out.println("---------------"+uc);

List list = uc.getData(rxml); //这行出的错。。
dd121011 2011-02-11
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 jsship 的回复:]
检查web.xml配置,重建一个servlet
[/Quote]
好像是这个xml文件有问题
<?xml version="1.0" encoding="UTF-8"?>
<root>
<method name="testGetObj">
<param name="t_boInsId">testid</param>
<param name="t_type">guwei</param>
</method>
</root>
技术科 2011-02-11
  • 打赏
  • 举报
回复
检查web.xml配置,重建一个servlet
笔记本的风扇控制 ---------------------------------------- 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,549

社区成员

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

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