[jdom-interest] malformed URL exception exception in saxbuilder.build due to unreachable URL

cliff palmer palmercliff at gmail.com
Thu Feb 9 13:31:16 PST 2012


I don't believe this is a DTD problem - no DTD is referenced.
This is the stack trace:
at java.net.URL.<init>(URL.java:567)
	at java.net.URL.<init>(URL.java:464)
	at java.net.URL.<init>(URL.java:413)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:650)
	at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:186)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:772)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:518)
	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:986)
	at com.dt.XMLUtility.ProfileXMLAttributes.process(ProfileXMLAttributes.java:162)
	at com.dt.XMLUtility.main.main(main.java:22)
java.io.FileNotFoundException:
/home/cpalmer/workspace/ProfileXMLAttributes/< (No such file or
directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:120)
	at java.io.FileInputStream.<init>(FileInputStream.java:79)
	at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
	at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:653)
	at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:186)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:772)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:518)
	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:986)
	at com.dt.XMLUtility.ProfileXMLAttributes.process(ProfileXMLAttributes.java:162)
	at com.dt.XMLUtility.main.main(main.java:22)
java.net.MalformedURLException: no protocol: <?xml version="1.0"?>

Thanks
Cliff

On 2/9/12, Paul Libbrecht <paul at hoplahup.net> wrote:
> Cliff,
>
> this doesn't sound reasonable to me. I have never seen code doing such and
> would not expect it (I also run jdom offline quite often).
>
> Could it be the DTD is hitting you?
> Can you copy a full stacktrace?
>
> thanks in advance
>
> Paul
>
>
> Le 9 févr. 2012 à 21:54, cliff palmer a écrit :
>
>> I'm reading through several hundred thousand existing XML documents
>> building counts of XML tags and have encountered a
>> Java.net.MalformedURL Exception raised by saxBuilder.build because the
>> xmlns points to a URL that can not be reached.
>> I am using JDOM 1.1.2.
>> Is there a call or parameter setting that will cause saxBuilder to
>> ignore namespaces when parsing?
>> Thanks!
>> Cliff
>> _______________________________________________
>> To control your jdom-interest membership:
>> http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com
>
>



More information about the jdom-interest mailing list