db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Dudziak" <tom...@gmail.com>
Subject Re: Could not parse xml data
Date Mon, 19 Nov 2007 19:43:07 GMT
On 11/18/07, fx.robin@laposte.net <fx.robin@laposte.net> wrote:

<snip>

> Now I'm trying to import with this task :
>
> <project name="cofaxddl" default="ddlToDatabase" basedir=".">
>
>
> <path id="project-classpath">
>   <fileset dir="lib">
>     <include name="**/*.jar"/>
>     <include name="**/*.zip"/>
>
>   </fileset>
> </path>
>
> <taskdef classname="org.apache.ddlutils.task.DdlToDatabaseTask"
>           name="ddlToDatabase"
>           classpathref="project-classpath"/>
>
>  <ddlToDatabase usedelimitedsqlidentifiers="true">
>    <database driverclassname="org.apache.derby.jdbc.ClientDriver"
>              url="jdbc:derby://localhost:1527/MyDbTest';"
>              username="root"
>              password="root"/>
>    <fileset dir=".">
>      <include name="*schema.xml"/>
>    </fileset>
>
>    <createdatabase failonerror="false"/>
>    <writeschematodatabase alterdatabase="true"
>                           failonerror="false"/>
>    <writedatatodatabase datafile="data.xml"
>                         />
>  </ddlToDatabase>
>
> </project>
>
> which produces :
>
> C:\ant-ddl>ant -buildfile import-derby.xml -v
>
> Apache Ant version 1.7.0 compiled on December 13 2006
> Buildfile: import-derby.xml
> Detected Java version: 1.6 in: c:\jdk\6\jre
> Detected OS: Windows 2000
> parsing buildfile C:\ant-ddl\import-derby.xml with URI = file:/C:/ant-ddl/import-derby.xml
> Project base dir set to: C:\ant-ddl
> [antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml.
It could not be found.
> [ddlToDatabase] Read schema file C:\ant-ddl\schema.xml
> [ddlToDatabase] Created database
> [ddlToDatabase] Executed 0 SQL command(s) with 0 error(s)
> [ddlToDatabase] Written schema to database
> BUILD FAILED
> C:\ant-ddl\import-derby.xml:16: Could not parse or write data file C:\ant-ddl\data.xml
>         at org.apache.ddlutils.task.Command.handleException(Command.java:81)
>         at org.apache.ddlutils.task.WriteDataToDatabaseCommand.readSingleDataFile(WriteDataToDatabas
> eCommand.java:222)
>         at org.apache.ddlutils.task.WriteDataToDatabaseCommand.execute(WriteDataToDatabaseCommand.ja
> va:161)
>         at org.apache.ddlutils.task.DatabaseTaskBase.executeCommands(DatabaseTaskBase.java:337)
>         at org.apache.ddlutils.task.DatabaseTaskBase.execute(DatabaseTaskBase.java:365)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
>         at org.apache.tools.ant.Task.perform(Task.java:348)
>         at org.apache.tools.ant.Target.execute(Target.java:357)
>         at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:140)
>         at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:96)
>         at org.apache.tools.ant.Main.runBuild(Main.java:683)
>         at org.apache.tools.ant.Main.startAnt(Main.java:199)
>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
> Caused by: org.apache.ddlutils.DdlUtilsException: java.net.MalformedURLException: unknown
protocol:
> c
>         at org.apache.ddlutils.io.DatabaseDataIO.writeDataToDatabase(DatabaseDataIO.java:730)
>         at org.apache.ddlutils.task.WriteDataToDatabaseCommand.readSingleDataFile(WriteDataToDatabas
> eCommand.java:217)
>         ... 17 more
> Caused by: java.net.MalformedURLException: unknown protocol: c


This could be a bug in DdlUtils under Windows, could you file it in JIRA ?

Tom

Mime
View raw message