facebook

java.net.MalformedURLException: no protocol:

  1. MyEclipse Archived
  2.  > 
  3. General
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #235012 Reply

    everZ
    Member

    Hi,

    I am trying to run a short Java application, which reads in a MAGE-ML format xml file. I got the following error.

    java.net.MalformedURLException: no protocol: MAGE-ML.dtd
    at java.net.URL.<init>(URL.java:537)
    at java.net.URL.<init>(URL.java:434)
    at java.net.URL.<init>(URL.java:383)
    at gnu.xml.aelfred2.SAXDriver.absolutize(SAXDriver.java:608)
    at gnu.xml.aelfred2.SAXDriver.resolveEntity(SAXDriver.java:585)
    at gnu.xml.aelfred2.XmlParser.pushURL(XmlParser.java:3336)
    at gnu.xml.aelfred2.XmlParser.parseDoctypedecl(XmlParser.java:845)
    at gnu.xml.aelfred2.XmlParser.parseProlog(XmlParser.java:522)
    at gnu.xml.aelfred2.XmlParser.parseDocument(XmlParser.java:414)
    at gnu.xml.aelfred2.XmlParser.doParse(XmlParser.java:167)
    at gnu.xml.aelfred2.SAXDriver.parse(SAXDriver.java:320)
    at gnu.xml.aelfred2.XmlReader.parse(XmlReader.java:294)
    at edu.unc.LCCC.caBIG.DWD.javaCode.ImportMAGEMLFiles.XMLAnalyzer.main(XMLAnalyzer.java:43)

    It looks like it can not find MAGE-ML.dtd. I use same codes without package definition and run it in dos. It works fine. Should I import this dtd file into some folder of MyEclipse? If yes, where?

    I found a smilar error at the following site (it is also for Eclipse user community). But it was written in another language I donot understand.
    http://jsurfer.de/modules.php?name=Forums&file=viewtopic&p=1933

    BTW, I use the following version of MyEclipse:

    Eclipse Platform
    Version: 3.0.0
    Build id: 200406251208

    MyEclipse
    Version: 3.8.2
    Build id: 200409171200-3.8.2

    JDK: j2sdk1.4.2_05

    Thanks.

    Everett

    #235065 Reply

    Riyad Kalla
    Member

    Everett,
    This has nothing to do with MyEclipse and my guess is that your parser is being set to validate so it’s trying to load the DTD. You can either fully qualify the DTD location or turn off the validating functionality of your XML parser.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: java.net.MalformedURLException: no protocol:

You must be logged in to post in the forum log in