You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by David Waite <ma...@akuma.org> on 2004/02/18 08:28:07 UTC

breakage in schema compiler (when importing another schema)

It is difficult to figure out what purpose of the code in XsbReader 
provides for. However, the issue appears to be that the writeHandle 
function is being called with a SchemaComponent (SchemaType) which is a 
document type.  This document type is provided by a separately compiled 
jar on the classpath.

The line
SchemaField sf = type.getContainerField();
sets sf to null. which throws a NullPointerException on the next 
statement.

My Stack Trace is below. I have been using the Ant task

Thread [main] (Suspended (breakpoint at line 1507 in 
SchemaTypeSystemImpl$XsbReader))
	SchemaTypeSystemImpl$XsbReader.writeHandle(SchemaComponent) line: 1507
	SchemaTypeSystemImpl$XsbReader.writeType(SchemaType) line: 1534
	SchemaTypeSystemImpl$XsbReader.writeTypeData(SchemaType) line: 2022
	SchemaTypeSystemImpl.saveType(SchemaType) line: 1004
	SchemaTypeSystemImpl.saveTypesRecursively(SchemaType[]) line: 901
	SchemaTypeSystemImpl.saveToDirectory(File) line: 879
	SchemaCodeGenerator.compileTypeSystem(SchemaTypeSystem, File, File[], 
Map, File[], File, File, boolean, boolean, XmlErrorWatcher, String, 
boolean, List) line: 45
	SchemaCompiler.compile(SchemaCompiler$Parameters) line: 798
	XMLBean.execute() line: 221
	UnknownElement.execute() line: 306
	UnknownElement(Task).perform() line: 401
	Target.execute() line: 338
	Target.performTasks() line: 365
	Project.executeTarget(String) line: 1237
	Project.executeTargets(Vector) line: 1094
	Main.runBuild(ClassLoader) line: 669
	Main.startAnt(String[], Properties, ClassLoader) line: 220
	Launcher.run(String[]) line: 215
	Launcher.main(String[]) line: 90

-David Waite