AW: [xep-support] MalformedURLException in com.renderx.util.Magic

From: UWE.GOERSCH@LHSYSTEMS.COM
Date: Mon Jul 14 2003 - 08:31:43 PDT

  • Next message: Kurt Werle: "Re: [xep-support] Tables spanning pages horizontally"

    Dear David,

    thank you very much for your quick and helpful response! We have now set the
    XMLReader to be an instance of Saxon "com.icl.saxon.aelfred.SAXDriver". The
    problem with the MalformedURLException is gone.

    Unfortunately now this parser (the same we use "standalone", i.e. not in our
    application) notifies us the following error:

    "error initializing com.renderx.util.Magic:java.io.FileNotFoundException:
    C:\Programme\IBM\WebSphere Studio\resource:com\renderx\util\magic.xml ..."

    where "C:\Programme\IBM\WebSphere Studio" is the value of the system
    property "user.dir". I think that means the EntityResolver does not work as
    expected.

    Do you or anyone else in the mailing list know how to solve this problem?
    Thank you very much in advance!!!

    Uwe

    -----Ursprungliche Nachricht-----
    Von: David Tolpin [mailto:dvd@renderx.com]
    Gesendet: Freitag, 11. Juli 2003 18:20
    An: xep-support@renderx.com
    Betreff: Re: [xep-support] MalformedURLException in com.renderx.util.Magic

    Uwe,

    Magci call com.renderx.sax.XMLReaderFactory:

      org.xml.sax.XMLReader
    xmlreader=com.renderx.sax.XMLReaderFactory.createXMLReader();

    XMLReaderFactory tries a number of way to load the right XMLReader, namely

        try {
          try {
     
    xmlreader=javax.xml.parsers.SAXParserFactory.newInstance().newSAXParser().ge
    tXMLReader();
          } catch(Exception e) { // ParserConfigurationException, but if I write
    it here, the class will not be loaded
            throw new org.xml.sax.SAXException("cannot create SAX2 parser: "+e);
          }
        } catch(Error e) { // no jaxp
          try {
            xmlreader=org.xml.sax.helpers.XMLReaderFactory.createXMLReader();
          } catch(Error e1) {
            xmlreader=new org.xml.sax.helpers.ParserAdapter();
          }
        }

    As a result, an instance of org.xml.sax.XMLReader is returned.

    Magic then passes
    com.renderx.sax.InputSource("resource:com/renderx/util/magic.xml") to the
    xml reader
    for parsing. com.renderx.sax.InputSource catches resource: protocol and
    calls setByteStream on the
    resource.

    A conforming parser should use the open byte stream and not try to retrieve
    it since bytestream is set.

    Your parser evidently ignores that and tries to reconnect to the URL.

    To find out what parser is loaded, execute

    System.err.println("xmlreader class is
    "+com.renderx.sax.XMLReaderFactory.createXMLReader().getClass());

    By the way, why are you still using XEP 3.04? Since you have the license
    key,
    you can use it to download the current version.

    David
    >
    > Hello,
    >
    > once we try to integrate XEP 3.04 client into our application for testing
    > purposes we get the following error message:
    > "com.renderx.util.Magic:java.net.MalformedURLException: unknown protocol:
    > resource"
    > and XEP exits. (I have learned that "resource" is an internal protocol
    used
    > by RenderX, e.g "resource:com/renderx/util/magic.xml")
    >
    > Does anyone know why this problem occurs? Any kind of help is highly
    > appreciated!
    >
    > Thanks in advance
    >
    > Uwe Görsch
    >
    > Uwe Görsch
    > Consultant
    >
    > Lufthansa Systems Business Solutions GmbH
    > HAM AM/D
    > Sportallee 54 a
    > 22335 Hamburg
    > Germany
    >
    > Tel +49 40 5070 1938
    > Fax +49 40 5070 4611
    > mailto:uwe.goersch@lhsystems.com
    > http://www.LHsystems.com
    >
    >
    >
    > -------------------
    > (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
    > in the body of the message to majordomo@renderx.com from the address
    > you are subscribed from.
    > (*) By using the Service, you expressly agree to these Terms of Service
    http://www.renderx.com/tos.html
    >
    >

    -------------------
    (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
    in the body of the message to majordomo@renderx.com from the address
    you are subscribed from.
    (*) By using the Service, you expressly agree to these Terms of Service
    http://www.renderx.com/tos.html

    -------------------
    (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
    in the body of the message to majordomo@renderx.com from the address
    you are subscribed from.
    (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html



    This archive was generated by hypermail 2.1.5 : Mon Jul 14 2003 - 08:35:07 PDT