Hi Werner and Castor User group,
I have some progress at the task "Generate Java Classes with castor"
but at the moment I get the following exception:
Could not create type castor-srcgen due to
org.castor.core.util.ConfigurationException: Failed to load
configuration: castor.core.properties
I include all dependencies and use this ant script:
<project name="CastorGenerator" default="castor:gen:src">
<path id="castor.class.path">
<fileset dir="${basedir}/lib">
<include name="*.jar" />
</fileset>
</path>
<target name="init">
</target>
<target name="castor:gen:src" depends="init" description="Generate
Java source files from XSD.">
<taskdef name="castor-srcgen"
classname="org.castor.anttask.CastorCodeGenTask"
classpathref="castor.class.path" />
<mkdir dir="generated" />
<castor-srcgen file="resources/xsd/kos-skript.xsd"
todir="generated-source"
package="org.castor.example.schema"
types="j2"
warnings="true" />
</target>
</project>
Where is the failure? What I have to configure at the "init" task?
Greeting
Thomas
On Tue, Oct 14, 2008 at 10:54 PM, Baba <[EMAIL PROTECTED]> wrote:
> Hi Werner,
>
> thank you for your fast answer. Yes, I see the section about how to
> use the Ant task for the xml code. But, what i missed is the part
> which describes the base "init" of every ant target. If you can
> provide me this information I try it again.
>
> Greeting
> Thomas
>
> On Tue, Oct 14, 2008 at 10:26 PM, Werner Guttmann <[EMAIL PROTECTED]> wrote:
>> Actually,
>>
>> Baba wrote:
>>> Dear Castor User group,
>>>
>>> I like to use the Castor XML Code Generator to generate java classes
>>> of my xsd files. But every time I try to generate this classes I get
>>> the exception "Exception in thread "main"
>>> java.lang.NoClassDefFoundError:
>>> org/exolab/castor/builder/SourceGeneratorMain" or if used the ant
>>> example it is the following exception "Exception in thread "main"
>>> java.lang.NoClassDefFoundError:
>>> org/exolab/castor/xml/schema/ContentModelGroup at
>>> org.exolab.castor.builder.SourceGeneratorMain.main(SourceGeneratorMain.java:216)".
>>> I used the command-line, a small self developed java program and the
>>> ant example but every time I get this exception. I use the JRE
>>> 1.5.0_13, the new Castor 1.3 RC and Castor 1.2 generator.
>>>
>>> What is the failure?
>>>
>>> My aim is it to create an Eclipse project or an ant task which
>>> generate the java classes of my xsd files.
>> Have you seen the relevant section in the (new) reference giude that
>> describes how to use the Ant task for the XML code generator ?
>>
>>
>> If somebody has a working
>>> ant task or a running eclipse project and like to provide me with
>>> information about configuration. I think it could be help me to get a
>>> running system.
>>>
>>> Greeting
>>> 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