Currently I run Castor to generate Java files from an XML Schema. I call Castor from inside a .bat file, and execute that .bat file from inside ant with the <exec> task. It works, but I decided today to try to ditch the .bat file and instead directly call the org.exolab.castor.builder.SourceGenerator class by using the <java> task.
Well, it doesn't work - the SourceGenerator class can't find my schema, even though I specify it the same way as in the .bat file: "-i x/y/z/upl.xsd".
OK, a bug. What else is new? The only thing that makes me upset is the sloppy error message from Castor:
unable to open XML schema file
Now, where did Castor try to find this file? Well, I have no idea, since the error message isn't telling me. What if the programmer instead had told me:
Unable to open this XML schema file: /home/mats/x/y/z/upl.xsd
Then I could have figured out what was wrong. Now I have to dig into the source.