openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Drew Lethbridge <d...@bund.com.au>
Subject Problem with MappingToolTask action export
Date Thu, 23 Aug 2007 15:09:31 GMT
Hello,  Using openJPA 0.9.7, I have another ant task problem, this  
time with org.apache.openjpa.jdbc.ant.MappingToolTask.  I am trying  
to execute the "export" action but so far without any success.  My  
ant target is as follows:

<target name="export-metadata">
     <taskdef name="mappingtool"  
classname="org.apache.openjpa.jdbc.ant.MappingToolTask"  
classpathref="cp"/>
     <mappingtool action="export" file="metadata.xml"  
ignoreErrors="false">
         <fileset file="pkg/pkg.jdo"/>
         <classpath refid="cp"/>
         <config propertiesFile="kodo.properties"/>
     </mappingtool>
</target>

And I get an error as follows:

export-metadata:
[mappingtool] The options supplied to the MappingToolTask are not  
valid. Please check your ant build file.
[mappingtool]   at  
org.apache.openjpa.jdbc.ant.MappingToolTask.executeOn 
(MappingToolTask.java:191)
[mappingtool]   at org.apache.openjpa.lib.ant.AbstractTask.execute 
(AbstractTask.java:169)
[mappingtool]   at org.apache.tools.ant.UnknownElement.execute 
(UnknownElement.java:275)
[mappingtool]   at org.apache.tools.ant.Task.perform(Task.java:364)
[mappingtool]   at org.apache.tools.ant.Target.execute(Target.java:341)
[mappingtool]   at org.apache.tools.ant.Target.performTasks 
(Target.java:369)
[mappingtool]   at org.apache.tools.ant.Project.executeSortedTargets 
(Project.java:1216)
[mappingtool]   at org.apache.tools.ant.Project.executeTarget 
(Project.java:1185)
[mappingtool]   at  
org.apache.tools.ant.helper.DefaultExecutor.executeTargets 
(DefaultExecutor.java:40)
[mappingtool]   at org.apache.tools.ant.Project.executeTargets 
(Project.java:1068)
[mappingtool]   at org.apache.tools.ant.Main.runBuild(Main.java:668)
[mappingtool]   at org.apache.tools.ant.Main.startAnt(Main.java:187)
[mappingtool]   at org.apache.tools.ant.launch.Launcher.run 
(Launcher.java:246)
[mappingtool]   at org.apache.tools.ant.launch.Launcher.main 
(Launcher.java:67)

I think the options are valid.  When I run the equivalent mappingtool  
command on the command line as follows, it works fine:

mappingtool -a export -f metadata.xml pkg/pkg.jdo

Running the command line tool is ok in a test harness, but is not  
suitable for our production development environment.  Does anyone  
have an idea about how I can get the ant task to work?

cheers and thanks

Drew

Mime
View raw message