You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2002/10/17 07:00:48 UTC
DO NOT REPLY [Bug 13717] New: -
Can not parse HTML document
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13717>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13717
Can not parse HTML document
Summary: Can not parse HTML document
Product: Xerces2-J
Version: 2.2.0
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Blocker
Priority: Other
Component: DOM
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: walterc@enlight.com.tw
The following exception is thrown during parsing of a html document. Upon
further inspection of the soruce code,
org.apache.xerces.util.ObjectFactory.newInstance is called to create a bunch of
HTML element types using Class.newInstance() which requires a default, no-arg
constructor and none of the HTML element implementations has it.
----------------------------------------------------------------------------
org.apache.xerces.util.ObjectFactory$ConfigurationError: Provider
org.apache.html.dom.HTMLAnchorElementImpl could not be instantiated:
java.lang.InstantiationException: org.apache.html.dom.HTMLAnchorElementImpl
at org.apache.xerces.util.ObjectFactory.newInstance
(ObjectFactory.java:249)
at org.apache.html.dom.HTMLDocumentImpl.populateElementType
(HTMLDocumentImpl.java:780)
at org.apache.html.dom.HTMLDocumentImpl.populateElementTypes
(HTMLDocumentImpl.java:711)
at org.apache.html.dom.HTMLDocumentImpl.<init>
(HTMLDocumentImpl.java:167)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance
(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:306)
at java.lang.Class.newInstance(Class.java:259)
at org.apache.xerces.parsers.AbstractDOMParser.startDocument
(AbstractDOMParser.java:771)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument
(XMLDTDValidator.java:693)
at org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity
(XMLDocumentScannerImpl.java:491)
at org.apache.xerces.impl.XMLEntityManager.startEntity
(XMLEntityManager.java:939)
at org.apache.xerces.impl.XMLEntityManager.startDocumentEntity
(XMLEntityManager.java:793)
at org.apache.xerces.impl.XMLDocumentScannerImpl.setInputSource
(XMLDocumentScannerImpl.java:268)
at org.apache.xerces.parsers.DTDConfiguration.parse
(DTDConfiguration.java:503)
at org.apache.xerces.parsers.DTDConfiguration.parse
(DTDConfiguration.java:585)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:253)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse
(DocumentBuilderImpl.java:201)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
at StockTest.testHtmlDom(StockTest.java:34)
at StockTest.main(StockTest.java:17)
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org