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 Urgent: MalformedUrlException
Date Tue, 18 Sep 2007 12:52:08 GMT
Hi,
The following piece of code creates a MalFormedUrl exception. I just read
from an XML file and create a database. This is error Trace:

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


This is the only code i write:

 String  nameoffile= "xmltodb.xml";
        Database targetModel = new DatabaseIO().read(nameoffile);

        BasicDataSource dataSource = new BasicDataSource();
        dataSource.setUrl("jdbc:derby://localhost:1527/instancedb");
        dataSource.setDriverClassName("org.apache.derby.jdbc.ClientDriver");

        boolean    alterDb = false;

        Platform platform = PlatformFactory.createNewPlatformInstance
(dataSource);

        if (alterDb) {
            platform.alterTables(targetModel, false);
        } else {

            platform.createTables(targetModel, true, true);
        }


Thanks in advance

Wessam

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