Xerces jar 是 DOM 解析器或 SAX 解析器
我想了解 Xerces.jar 的实现 Xerces.jar 是 DOM 解析器还是 SAX 解析器。 当我尝试读取一个巨大的 XML 文件时,我收到以下错误消息。请帮忙 java.lang.StackOverflowError 错误
at org.apache.xerces.dom.ParentNode.readObject(Unknown Source)
at sun.reflect.GeneratedMethodAccessor569.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1098)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1756)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1342)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1948)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1872)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1756)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1342)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1948)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1872)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1756)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1342)
I would like to know about Xerces.jar implementation
is Xerces.jar a DOM parser or SAX parser.
When I try reading a huge XML file I am getting the following error message. Please help
java.lang.StackOverflowError
at org.apache.xerces.dom.ParentNode.readObject(Unknown Source)
at sun.reflect.GeneratedMethodAccessor569.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1098)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1756)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1342)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1948)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1872)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1756)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1342)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1948)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1872)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1756)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1342)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
两个都。
这是甜点配料和地板蜡:)
http://xerces。 apache.org/xerces2-j/faq-sax.html
http://xerces.apache.org/xerces2-j/faq-dom.html
PS:
请张贴堆栈中实际发生异常的空间。你似乎把它遗漏了:)
PPS:
另请参阅此处:
考虑关闭架构检查,或更改 minOccurs/maxOccurs:
Both.
It's a dessert topping AND a floor wax :)
http://xerces.apache.org/xerces2-j/faq-sax.html
http://xerces.apache.org/xerces2-j/faq-dom.html
PS:
Please post the space in the stack where the exception actually occurred. You seem to have left it out :)
PPS:
Also look here:
Consider turning schema checking OFF, or changing minOccurs/maxOccurs: