SAXException Parser configuration problem: namespace reporting is not enabled
问题描述:
用sax的方式组装xml,在tomcat上正常运行,在weblogic12c上报错:
SAXException Parser configuration problem: namespace reporting is not enabled
JDK都是用的1.8
搜索,
发现SAXException Parser configuration problem: namespace reporting is not enabled来自 saxon jar包中的错误
找到代码:
// net.sf.saxon.event.ReceivingContentHandler // It's also possible (especially when using a TransformerHandler) that the parser
// has been configured to report the QName rather than the localname+URI
if (localname.length() == 0) {
throw new SAXException("Parser configuration problem: namespace reporting is not enabled");
}
分析
通过
System.setProperty("javax.xml.transform.TransformerFactory",
"net.sf.saxon.TransformerFactoryImpl");
即指定了SAXTransformerFactory的实现方式,便可以在单元测试时重现。
修复
在sax中做write时要指定localname,不能空着。
handler.startElement("", ROOT_ELEMENT_NAME, ROOT_ELEMENT_NAME, atts);
像这样即可修复。
SAXException Parser configuration problem: namespace reporting is not enabled的更多相关文章
- jar项目 BeanDefinitionParsingException: Configuration problem:Unable to locate Spring NamespaceHandler for XML schema namespace
最近由于项目需要,需要jar项目来处理. 我在项目中整合了Spring,在编辑器中启动没有问题,但是使用ant打包为一个完整jar文件,部署后启动报错如下 org.springframework.be ...
- 整合mybatis时报错:Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/tx]
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Una ...
- Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://dubbo.apache.org/schema/dubbo]
dubbo的官方文档写的真好, http://dubbo.apache.org/zh-cn/docs/2.7/user/dependencies/ 在使用dubbo过程中的问题, 和解决 org.sp ...
- BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler错误的解决方法
出现这个问题是因为我的spring3.0里的包是单独引用的,缺少了别的包 譬如Configuration problem: Unable to locate Spring NamespaceHandl ...
- Maven Java EE Configuration Problem 的完美解决办法
背景: 最近在修改项目的时候,发现修改了项目依赖以后会出现如下图:Maven Java EE Configuration Problem 的问题,对于有强迫症的我来说,看到项目上面有个很小的红色小叉号 ...
- sharepoint 2013 "The module ... owssvr.dll could not be loaded due to a configuration problem"
打开sharepoint站点可以看到这个503的错误, 在event viewer中查看如下: The Module DLL 'C:\Program Files\Common Files\Micros ...
- org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unexpected failure during bean definition parsing Offending resource: class path resource [applicationC
这个错误是 org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration proble ...
- springsecurity启动出现org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: You must use a 3.0 schema with Spring Security 3.0.
在换了spring-security的jar包以后启动出现org.springframework.beans.factory.parsing.BeanDefinitionParsingExceptio ...
- Configuration problem: Failed to import bean definitions from relative location
问题现象: 最近开始做新需求,然后在Tomcat上部署项目时,出现了如下报错: [12-05 09:54:27,161 ERROR] ContextLoader.java:351 - Context ...
随机推荐
- WPF MATERAIL DESIGN TOOKIT
最近有个程序需要用到WPF,本以为WEB可以做到很炫的,没有想到XAML也能做到如此之炫.心动了,那就行动吧. 搜到有各种款式的:METRO风格,RIBBON风格,MATERIAL风格…… 也许是玩W ...
- Android recyclerview 只显示一行 宽度不适配
最近学习recyclerview 遇到的问题 1.宽度不适配 正确写法 LayoutInflater.from(context).inflate(R.layout.item_view,parent,f ...
- CSS声明各个浏览器私有属性的命名前缀
-moz代表firefox浏览器私有属性-ms代表IE浏览器私有属性-webkit代表chrome.safari私有属性-o代表opera私有属性
- 【转】IntelliJ 创建main函数快捷
http://blog.csdn.net/tiantiandjava/article/details/42269173 今天偶然发现了IntelliJ中 创建main函数的快捷键,依次还有for循环, ...
- 利用VS自带的命令行工具查看和生产PublicKeyToken
使用VS2008(或其他版本)命令行工具,键入:SN -T C:\*****.dll 就会显示出该dll具体的PublicKeyToken数值. 如果该程序集没有强命 名,则不会有PublicKeyT ...
- React初识整理(四)--React Router(路由)
官网:https://reacttraining.com/react-router 后端路由:主要做路径和方法的匹配,从而从后台获取相应的数据 前端路由:用于路径和组件的匹配,从而实现组件的切换. 如 ...
- c++ 结构体,设置物品体积并输出物品属性
#include <iostream> using namespace std; struct box { char maker[40]; float height; float widt ...
- (38)zabbix中配置snmp监控
1.首先按照“snmp监控快速配置”文本文档在被监控的主机上安装.配置及启动snmp服务, 具体内容如下: 1).安装snmp yum install net-snmp* -y cp -a /etc/ ...
- Centos6.9 搭建rsync服务端与客户端 案例:全网备份项目
rsync的企业工作场景说明 1)定时备份 1.1生产场景集群架构服务器备份方案项目 借助cron+rsync把所有客户服务器数据同步到备份服务器 2)实时复制 本地数据传输模式(local-only ...
- DOM事件模型浅析
1.何为DOM DOM是"Document Object Model"的缩写,中文译为"文档对象模型".它是一种跨平台.跨语言的编程接口,将HTML,XHTML ...