org.apache.commons.digester.Digester fatalError Parse Fatal Error at line 1 colu

今天赶到客户实施现场,因为应用某个项目组开发好程序后客户按照手册部署应用一直出莫名问题,部份关键功能模块不能使用,后台报错(我们在公司开发时使用的也是和客户类似的环境做的测试都是没有问题的)

db2 9.0+websphere6.0,想要玩点高级的,在db2中用了xml格式的字段来存储数据,

[09-12-9 17:54:56:871 CST] 000000d6 Digester      E org.apache.commons.digester.Digester fatalError Parse Fatal Error at line 1 column 39: prolog 中不允许有内容。
                                 org.xml.sax.SAXParseException: prolog 中不允许有内容。
	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.XMLScanner.reportFatalError(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(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.commons.digester.Digester.parse(Digester.java:1785)
	at com.icitic.flowmodel.RoleFlowsHelper.wrapPropertys(RoleFlowsHelper.java:82)
	at com.icitic.lightning.biz.webapp.action.RoleToMaintenanceAction.getDoc(RoleToMaintenanceAction.java:506)
	at com.icitic.lightning.biz.webapp.action.RoleToMaintenanceAction.showDoc(RoleToMaintenanceAction.java:119)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
	at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
	at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:269)
	at com.icitic.ibpms.web.action.base.BaseAction.baseDispatchMethod(BaseAction.java:122)
	at com.icitic.ibpms.web.action.base.BaseAction.execute(BaseAction.java:92)
	at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
	at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
	at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
	at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java(Compiled Code))
	at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
	at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java(Compiled Code))
	at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
	at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
	at com.icitic.filter.LogFilter.doFilter(LogFilter.java:103)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java(Compiled Code))
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
	at com.icitic.filter.AuthFilter.doFilter(AuthFilter.java:247)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java(Compiled Code))
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
	at com.icitic.lightning.base.webapp.filter.CharsetFilter.doFilter(CharsetFilter.java:62)
	at com.icitic.lightning.base.webapp.filter.CharsetFilter.doFilter(CharsetFilter.java:39)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java(Compiled Code))
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java(Compiled Code))
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java(Compiled Code))
	at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java(Compiled Code))
	at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java(Compiled Code))
	at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java(Compiled Code))
	at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java(Compiled Code))
	at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java(Compiled Code))
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java(Compiled Code))
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java(Compiled Code))
	at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java(Compiled Code))
	at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))
	at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
	at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))
	at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))

[09-12-9 17:54:56:934 CST] 000000d6 SystemOut     O 2009-12-09 17:54:56,934 [ERROR] marine.printLog(63) 
【线程编号:WebContainer : 4】【错误】prolog 中不允许有内容。

 google了一下,很多的人说是解析xml时xml格式不合法造成的

<?xml version="1.0" encoding="utf-8" ?>  <role-flows>
    <instanceId>006884a925729ea4012572a779420001</instanceId>
    <roleFlowList>
      <roleFlow>
        <deptId>10013033</deptId>
        <deptName>企业服务部</deptName>
        <description>awfrew</description>
        <fucid>UAMS.org##org.savesamelevel##org.savesublevel##org.delete##org.update##org.view##org.enable##org.disable##</fucid>
        <id>1</id>
        <optionId>10013016</optionId>
        <optionName>团险部</optionName>
        <postId>4</postId>
        <postName>account_trans</postName>
        <rolename>egweg</rolename>
        <sysid>UAMS</sysid>
        <sysname>权限统一管理平台</sysname>
      </roleFlow>
    </roleFlowList>
    <state>0</state>
  </role-flows>

 简单在ie浏览器中测试了一下这个xml的格式,发现出错的,果然,将编码改为“GBK”,好了,格式好了,但是还是出现xml解析失败,我本机测试没有问题,为什么服务器上就有问题呢?jar的版本的问题,对,就是这个原因,一看解析xml的jar是“commons-betwixt-0.8.jar”,其编译的jdk的版本是4.2....的,而我们的was的jdk还是很低的版本的,换了一个“commons-betwixt-0.7.jar”,发布测试,ok

 

很多的时候,我们很多的开发程序员应该的应用莫名的错误负责的,项目经理和技术经理在这方面应该要有全面的控制。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值