Hi,
as Stephen has pointed out, you are obviously missing some required JARs
at run-time. Have a look at
http://www.castor.org/download.html#Dependent-Libraries
for information on what's required to use carious parts of Castor.
Werner
PS You will definitely need some XML parser, whether Xerces or not. When
using Xerces, it does not have to be 1.4.0. Any version, including the
latest will work.
Stephen Winnall wrote:
The following is an example that works for me in NetBeans. Presumably it
can be adapted for Eclipse and your environment:
<target name="castor:srcgen:regex"
depends="init"
description="Generate Java source files from regex.xsd.">
<taskdef name="castor-srcgen"
classpath="${java.lib}/castor-1.1.2.1-anttasks.jar:${java.lib}/castor-1.1.2.1-codegen.jar:${java.lib}/castor-1.1.2.1-xml.jar:${java.lib}/commons-logging-1.1.jar:${java.lib}/Deprecated/xerces-1.4.4.jar"
classname="org.castor.anttask.CastorCodeGenTask"
/>
<castor-srcgen file="src/regex.xsd"
package="org.vimia.multipatch.xml"
todir="${basedir}/src"
types="j2"
verbose="true"
warnings="true"
/>
</target>
The JAR you're missing seems to be xerces-1.4.4.jar. This is a
deprecated version, but I can't remember why I needed it.
Steve
On 20 Sep 2007, at 15:35, Thomas Papendieck wrote:
Hello,
Im trying to set up an antfile to run within eclipse to generate code.
but the anttask tels me not being able to create an sax parser.
I have all castor jars in the classpath. What else do I need?
bye
Thomas
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email