Thanks Lawrence. An other possibility is to set classgendir parameter.
BR
Johann
Lawrence Jones a écrit :
Hi Johann
By setting the srconly attribute to true you are generating only source files.
In order to get generated class files (and .xsb files which are XmlBeans' way
of storing the schema information) you'll need to do something like the
following:
<target name="compileSchema">
<xmlbean schema="${schema}/transit.xsd"
srcgendir="src"
destfile="YourJarName.jar"
classpath="${lib}/xbean.jar:${lib}/jsr173_1.0_api.jar">
</xmlbean>
</target>
Then a jar file will be generated called YourJarName.jar. After that whenever
you wish to use the generated XmlBeans just include YourJarName.jar on whatever
classpath your application uses.
Cheers,
Lawrence
-----Original Message-----
From: Johann Rénel [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 25, 2006 12:50 AM
To: [email protected]
Subject: SchemaTypeSystem not generated
Hello,
I've compiled my schema so I've my Java types. But when I test them,
I've the following error :
java.lang.ExceptionInInitializerError
at
fr.jouve.elscdweb.launcher.transit.beans.TransitDocument$Factory.newInstan
ce(TransitDocument.java:211)
[...]
Caused by: java.lang.RuntimeException: Cannot load SchemaTypeSystem.
Unable to load class with name
schemaorg_apache_xmlbeans.system.s66B04B8847DD9E1C30DCE7947A16068E.TypeSys
temHolder.
Make sure the generated binary files are on the classpath.
at
org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:781)
at
fr.jouve.elscdweb.launcher.transit.beans.TransitDocument.<clinit>(TransitD
ocument.java:20)
... 17 more
Caused by: java.lang.ClassNotFoundException:
schemaorg_apache_xmlbeans.system.s66B04B8847DD9E1C30DCE7947A16068E.TypeSys
temHolder
[...]
... 18 more
So, my schema.system.... package is not generated ? Why ? My Ant task is
the following :
<property name="lib" location="lib" />
<property name="schema" location="schema" />
<taskdef name="xmlbean"
classname="org.apache.xmlbeans.impl.tool.XMLBean"
classpath="${lib}/xbean.jar:${lib}/jsr173_1.0_api.jar" />
<target name="compileSchema">
<xmlbean schema="${schema}/transit.xsd" srconly="true"
srcgendir="src"
classpath="${lib}/xbean.jar:${lib}/jsr173_1.0_api.jar">
</xmlbean>
</target>
So, I don't understand why, this package is not generated, and I can't
continu my projet without. An idea bout this problem ?
Best Regards,
Johann
PS : sorry for my english ;-)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]