> I am getting the error below every time I try and compile my XML schema into 
> XML beans.  This error only arises after the initial build is done and I make 
> modifications to my XML schema.  I have cleaned up my classes, beansrc 
> directories but still get this error.  If I copy my schema over to another 
> directory this problem goes away, i.e. make a copy in a different directory 
> and modify my build script to look there instead.  I am completely stumped 
> why it works the first time and every time after I make additional changes it 
> doesn't.  
> 
> Thanks
> 
> Ian
> 
> 
> /vobs/OSA/tornado/java/guibuild.xml:46: 
> org.apache.xmlbeans.impl.jam.internal.ja
> vadoc.JavadocClassloadingException: An error has occurred while invoking 
> javadoc
>  to inspect your source
> files.  This may be due to the fact that $JAVA_HOME/lib/tools.jar does
> not seem to be in your system classloader.  One common case in which
> this happens is when using the 'ant' tool, which uses a special
> context classloader to load classes from tools.jar.
> 
> This situation elicits what is believed to a javadoc bug in the initial
> release of JDK 1.5.  Javadoc attempts to use its own context classloader
> tools.jar but ignores one that may have already been set, which leads
> to some classes being loaded into two different classloaders.  The
> telltale sign of this problem is a javadoc error message saying that
> 'languageVersion() must return LanguageVersion - you might see this
> message in your process' output.
> 
> This will hopefully be fixed in a later release of JDK 1.5; if a new
> version of 1.5 has become available, you might be able to solve this
> by simply upgrading to the latest JDK.
> 
> Alternatively, you can work around it by simply including
> $JAVA_HOME/lib/tools.jar in the java -classpath
> parameter.  If you are running ant, you will need to modify the standard
> ant script to include tools.jar in the -classpath.
> 
> Here's the build script:
> 
> 
> <project name="build" default="all" basedir=".">
>       <!-- set global properties for this build -->
>       <property environment="env"/>
>       <property name="build.compiler" value="modern"/>
>       <property name="src" value="src"/>
>       <property name="output" value="."/>
>       <property name="dest" value="${output}/classes"/>
>       <property name="lib" value="${output}/lib"/>
>       <property name="srcbase" value="${env.VOB}/src/com"/>
>       <property name="package" value="${output}/package"/>
>       <property name="staging" value="${package}/STAGING"/>
>       <property name="debug" value="true"/>
>       <property name="dynamicgui" value="${srcbase}/dynamicgui"/>
>       <property name="xmlbeans.lib" 
> value="${env.COTSVOB}/java/xmlbeans/xmlbeans-2.0.0/lib"/>
>       <property name="xmlbeansjar" value="${xmlbeans.lib}//xbean.jar"/>
>       <property name="xmlbeanspath" value="${xmlbeans.lib}/xbean_xpath.jar"/>
>       <property name="xmlbeansjsr173" value="${xmlbeans.lib}/jsr173_api.jar"/>
>       <property name="beansrc" value="${output}/beansrc"/>
>       <mkdir dir="${dest}"/>
>       <mkdir dir="${lib}"/>
>       <path id="javac.classpath">
>               <pathelement location="${dest}"/>
>               <pathelement location="${xmlbeansjar}"/>
>               <pathelement location="${xmlbeanspath}"/>
>               <pathelement location="${xmlbeansjsr173}"/>
>       </path>
>       <path id="xmlbeans.path">
>               <fileset dir="${xmlbeans.lib}" includes="*.jar"/>
>       </path>
>       <taskdef name="xmlbean" 
> classname="org.apache.xmlbeans.impl.tool.XMLBean" 
> classpathref="xmlbeans.path"/>
>       <target name="all" depends="dynamicgui" description="compile all"/>
>       <target name="dynamicguiCheck" description="check if xsd files changed 
> since service model extensions last built">
>               <dependset>
>                       <srcfileset dir="${dynamicgui}" includes="*.xsd"/>      
>         
>                       <targetfileset file="${lib}/dynamicgui.jar"/>
>               </dependset>
>               <available file="${lib}/dynamicgui.jar" 
> property="dynamicguiUpToDate"/>
>       </target>
>       <target name="dynamicgui" depends="dynamicguiCheck> " 
> unless="dynamicguiUpToDate">
>               <xmlbean download="false" schema="${dynamicgui}" 
> srcgendir="${beansrc}/dynamicgui" destfile="${lib}/dynamicgui.jar" 
> classpathref="xmlbeans.path"/>
>       </target>
>       <target name="clean">
>               <delete>
>                       <fileset dir="${dest}" includes="**/*.class"/>
>               </delete>
>               <delete dir="${beansrc}"/>
>       </target>
> </project>
> 
>  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to