Hello, I found you need to set classgendir to point into sources instead of build. So this should fix problem:
<target name="gen-schema"> <xmlbean srconly="true" verbose="true" srcgendir="src" classgendir="src" schema="./src/CardWizard/resources/config/DeviceList.xsd"/> </target> <quote author="Wynand Vermeulen"> 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 </quote> Regards, Rafal Rusin http://rrusin.blogspot.com --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org For additional commands, e-mail: user-h...@xmlbeans.apache.org