Hi Stuart

 

The problem is that (prior to checkin 220181) a TypeSystemHolder class was directly referenced in every generated class. This TypeSystemHolder class is the link between the .class (generated Java code) world and the .xsb (binary files equivalent to schema entries) world and it’s generated in the _binary_ directory (i.e. the argument to the –d flag if you’re using scomp or the classgendir arg to the xmlbean ant task).

 

When it comes time to compile the generated .java files this will only work if you include the classgendir in the classpath. If you don’t specify the classgendir then a temp dir is created and used for this purpose but unfortunately this is unlikely to be on your classpath.

 

After checkin 220181 we changed the direct reference to be a reference by reflection to avoid this problem (and other similar problems – see e.g. http://issues.apache.org/jira/browse/XMLBEANS-120).

 

So choices are:

 

  1. specify classgendir explicitly and include it in your classpath
  2. upgrade to a version of XmlBeans after revision 220181 (e.g. the new 2.1.0 version that’s just been released)

 

Cheers,

 

Lawrence

 


From: Stuart Robertson [mailto:[EMAIL PROTECTED]
Sent: Friday, November 18, 2005 3:17 PM
To: [email protected]
Subject: TypeSystemHolder does not exist errors

 

I am having the same problem as the user in thread http://www.mail-archive.com/[email protected]/msg07530.html

I added the latest Xerces jars to my 1.4.2_09 jre/lib/endorsed dir (had to make it first) and I still have the same symptoms.  Basically lots of compiler errors like the following when I use the ant task to generate and compile the bindings:

 [xmlbeans] C:\RAD_workspaces\workspace2\app_project\src\generated\xmlb
eans\com\foo\xmlSchemas\eai\blueValidateGrpAndPcpReq\BlueValidateGrpA
ndPcpParmsDocument.java:19: package schemaorg_apache_xmlbeans.system.sD17B886B7C
6CB4F491C29457F4383A81.TypeSystemHolder does not exist
 [xmlbeans]     public static final org.apache.xmlbeans.SchemaType type = (org.a
pache.xmlbeans.SchemaType)schemaorg_apache_xmlbeans.system.sD17B886B7C6CB4F491C2
9457F4383A81.TypeSystemHolder.typeSystem.resolveHandle("bluevalidategrpandpc
pparms8c1adoctype");
 [xmlbeans]

                             ^


The ant task I'm using to build this looks like this:

        <taskdef name="xmlbeans"
            classname="org.apache.xmlbeans.impl.tool.XMLBean ">
            <classpath>
                <path refid="xml-beans.classpath" />
            </classpath>
        </taskdef>

        <xmlbeans schema="${ src.xsd}"
                  srcgendir="${target.xml-beans}"
                  destfile="../lib/member-magna-xmlbeans.jar"
                  debug="true">
            <classpath>
                <path refid="xml-beans.classpath" />
            </classpath>
        </xmlbeans>

with classpath of

    <path id="xml-beans.classpath">
        <fileset dir="${xml-beans.lib.dir}">
            <include name="*.jar" />
        </fileset>
    </path>

Any ideas?

Reply via email to