db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wessam Abd Rabo" <wessam.abdr...@gmail.com>
Subject MalFormedURL Exception
Date Mon, 24 Sep 2007 20:24:24 GMT
hi,
I'm getting this exception for a long time now and i can't fix it or know
the exact cause. Here's the stack trace:

org.apache.ddlutils.DdlUtilsException: java.net.MalformedURLException
 at org.apache.ddlutils.io.DatabaseIO.read(DatabaseIO.java:194)

Caused by: java.net.MalformedURLException
 at java.net.URL.<init>(URL.java:601)
 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 :771)
 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:107)
 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.apache.commons.digester.Digester.parse(Digester.java:1647)
 at org.apache.commons.betwixt.XMLIntrospector.loadMultiMapping (
XMLIntrospector.java:665)
 at org.apache.commons.betwixt.XMLIntrospector.register(XMLIntrospector.java
:635)
 at org.apache.commons.betwixt.io.BeanReader.registerMultiMapping(
BeanReader.java:216)
 at org.apache.ddlutils.io.DatabaseIO.getReader (DatabaseIO.java:124)
 at org.apache.ddlutils.io.DatabaseIO.read(DatabaseIO.java:190)

After tracing this error, i guess the problem is with "mapping.xml". The
following method is where URL(expandedSystemid) is called in where the error
occurs:

public String setupCurrentEntity(String name, XMLInputSource xmlInputSource,
                boolean literal, boolean isExternal)
            throws IOException, XNIException {
        // get information

        final String publicId = xmlInputSource.getPublicId();
        final String literalSystemId = xmlInputSource.getSystemId();
        String baseSystemId = xmlInputSource.getBaseSystemId();
        String encoding = xmlInputSource.getEncoding();
        Boolean isBigEndian = null;

        // create reader
        InputStream stream = null;
        Reader reader = xmlInputSource.getCharacterStream();
        // First chance checking strict URI
        String expandedSystemId = expandSystemId(literalSystemId,
baseSystemId, fStrictURI);
        if (baseSystemId == null) {
            baseSystemId = expandedSystemId;
        }
        if (reader == null) {
            stream = xmlInputSource.getByteStream();
            if (stream == null) {
                stream = new URL(expandedSystemId).openStream();

i say mapping.xml because XMLInputSource of it is what is propagated to this
method starting getReader which you can find down the stack trace.

I've no clue what URL is that of. And why could it be causing this exception
(which is thrown if an unknown protocol is used )?

I'd appreciate any help.

Thanks in advance

Wessam

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message