xerces

java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory

大兔子大兔子 提交于 2019-12-07 05:20:04
问题 I am using java1.6 , jboss5.1 and Spring maven 3.2.5 in my project.I am getting java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory This is my Pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.varun

Creating a DOM that is thread safe for read operations

不羁的心 提交于 2019-12-07 04:06:38
问题 My application composes a webpage model from a number of xml sources. These sources are being parsed into memory as DOM objects with the normal Xerces parser. Unfortunately, Xerces DOM objects are not thread safe for read-only operations. I would like to be able to reuse the parsed DOM for read. Does anyone know of another parser or a simple thread safe for read DOM implementation that I use? 回答1: Saxon provides DOM wrappers to its internal and immutable data structure. // create Saxon

WAS 8.5: java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl incompatible with javax.xml.parsers.SAXParserFactory

本小妞迷上赌 提交于 2019-12-07 03:59:37
问题 I am deploying a J2EE web application in Websphere Application Server 8.5. The web application has a shared library with all the third party libraries. All the internally coded libraries are inside the WEB-INF/lib folder. The problem is that in only some jsps WAS it is throwing the following exception. I think it is related with xercesImpl-2.8.1.jar but I don't understand why it is throwing this exception and why it is throwing in only some pages. In tomcat it is working perfectly. java.lang

xerces serialization in Java 6

怎甘沉沦 提交于 2019-12-07 03:09:55
问题 In Java 6, the entire xerces XML parser/serializer implementation is now in the Java runtime (rt.jar). The packages have been moved under the com.sun.* namespace, which places them off-limits for explicit reference within client code. This is not a problem when using the parser, which is instantiated via javax API-defined factories. However, our code also uses xerces serialization (org.apache.xml.serialize.* ). AFAICT, there are no javax.xml API-defined factories for creating instances of

[flowable6.4.1][DMN]cvc-elt.1: 找不到元素 &apos;definitions&apos; 的声明

ぐ巨炮叔叔 提交于 2019-12-06 12:50:17
报错信息: ERROR: 'org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 4; cvc-elt.1: 找不到元素 'definitions' 的声明。' 2019-04-10 10:03:12.869 [http-nio-8830-exec-1] ERROR o.flowable.common.engine.impl.interceptor.CommandContext - Error while closing command context org.flowable.dmn.xml.exception.DmnXMLException: javax.xml.stream.XMLStreamException: org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 4; cvc-elt.1: 找不到元素 'definitions' 的声明。 at org.flowable.dmn.xml.converter.DmnXMLConverter.convertToDmnModel(DmnXMLConverter.java:199) at org.flowable.dmn.engine.impl.parser.DmnParse.execute

Java library that supports XSD 1.1 [closed]

最后都变了- 提交于 2019-12-06 06:59:58
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . Is there a java library that supports XSD 1.1. I have tried finding it for 2 days. The only implementation I found was Xerces2 Java 2.11.0 (XML Schema 1.1) (Beta) which works along with JAXP 1.4. This beta version did not work well either. Basic things like 'assert test' that were introduced in XSD 1.1 were

Locale specific messages in Xerces 2.11.0 (Java)

主宰稳场 提交于 2019-12-06 01:49:25
I want to use locale specific error messages with my JAXP and Xerces2. By default only English messages are available. First step is to retrieve the messages files and put them into the package "org/apache/xerces/impl/msg/" - done. By using Locale.setDefault (Locale.GERMANY) the German messages are displayed so this is working. But I want the messages to be differently localized on a per-instance basis. So one parser should return English messages and another parser should return German messages. The code I'm using to create SAX2 parsers is: org.xml.sax.XMLReader ret = XMLReaderFactory

dynamic_cast failed when hiding symbol

ⅰ亾dé卋堺 提交于 2019-12-05 20:09:08
I have many static libraries. One is static_lib_a.a. I create a dynamic library, dynamic_lib.so to put them together. In static_lib_a.a, it uses xerces 3.1.1 to parse xml. The following is the code snippet in static_lib_a.a xerces::DOMElement *pElementNode = dynamic_cast<xerces::DOMElement *>(pNode); The type of pNode is xerces::DOMNode. It is assigned to an object of xerces::DOMElement. This line of code will do downcasting. In order to hide all symbols of static_lib_a.a in dynamic_lib.so, I use -fvisibility=hidden to build this static library. I found if I add - fvisibility=hidden ,

Creating a DOM that is thread safe for read operations

≯℡__Kan透↙ 提交于 2019-12-05 11:06:49
My application composes a webpage model from a number of xml sources. These sources are being parsed into memory as DOM objects with the normal Xerces parser. Unfortunately, Xerces DOM objects are not thread safe for read-only operations. I would like to be able to reuse the parsed DOM for read. Does anyone know of another parser or a simple thread safe for read DOM implementation that I use? Saxon provides DOM wrappers to its internal and immutable data structure. // create Saxon IdentityTransformer final Transformer transformer = new TransformerFactoryImpl().newTransformer(); // set up

java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory

坚强是说给别人听的谎言 提交于 2019-12-05 10:46:02
I am using java1.6 , jboss5.1 and Spring maven 3.2.5 in my project.I am getting java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory This is my Pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.varun.batch</groupId> <artifactId>myproject</artifactId> <packaging>war</packaging> <version>0.0.1-SNAPSHOT<