If the file is present as a result of the ant build, I'd say the issue lay
somewhere in your netbeans configuration.
Is there a reason you need the xmlbeans sources?
>From your ant task it looks like you want the task to generate source
(srcOnly) and a jar (destFile). I've only used the task with one or the
other options specified.
There are several options for scomp output, but I think srconly overrides
destfile.
-jacobd

On Sun, Sep 13, 2009 at 6:58 AM, Wynand Vermeulen <groendra...@gmail.com>wrote:

> Hello,
>
> I'm trying to get XMLBeans 2.4.0 to work in a standard Netbeans project. I
> have a built.xml file in my project directory, which contains ANT script to
> build the XMLBeans source. I get no errors while performing the build,
> but do get a runtime exeception "java.lang.RuntimeException: Cannot load
> SchemaTypeSystem. Unable to load class with name
> schemaorg_apache_xmlbeans.system.sBA558E54E426CCFF39A8E684578DC966.TypeSystemHolder.
> Make sure the generated binary files are on the classpath.".
>
> I have been finecombing the documentation, and searching the web (and this
> list's archives) for days now and have found several of these types of
> messages reported, and usually the advice is to make sure the
> TypeSystemHolder.class is on the classpath. My ANT script stores the
> generated files in the project's build\classes folder, and directly after
> the build I can see that the class file and xsd files have been generated in
> the proper location, however for some strange reason once I run the
> application the TypeSystemHolder.class file disappears and the exception
> occurs!
>
> I assume that everything in the build\classes folder is part of the
> classpath. If not, how do I add the
> schemaorg_apache_xmlbeans.system.sBA558E54E426CCFF39A8E684578DC966.TypeSystemHolder
> to the classpath in Netbeans? I've tried right clicking on the project, and
> adding the folder to the compile and runtime classpaths, and I've tried
> adding it to the classpath in the ANT script together with xbean.jar, but as
> then the compiler complains that the directory does not exist (since it has
> not yet been built).
>
> The ANT Script I use (based on tutorial at
> http://lajavaloca.wordpress.com/2008/05/26/xmlbeans-with-netbeans-thats-a-lot-of-beans/
> ):
>
>      <taskdef name="xmlbean"
>         classname="org.apache.xmlbeans.impl.tool.XMLBean"
>         classpath="../3rd Party/xmlbeans-2.4.0/lib/jsr173.jar: ../3rd
> Party/xmlbeans-2.4.0/lib/xbean.jar" />
>     <target name="-pre-compile">
>         <antcall target="gen-schema2"/>
>     </target>
>     <target name="gen-schema">
>         <xmlbean srconly="true"
>             verbose="true"
>             srcgendir="src"
>             classgendir="build/classes"
>             download="true"
>             destfile="DeviceListXmlTypes.jar"
>             schema="./src/CardWizard/resources/config/DeviceList.xsd"/>
>     </target>
>
> Please help, I really need to get XMLBeans working asap.
>
> Kind Regards
> Wynand
>

Reply via email to