You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Radu Preotiuc-Pietro (JIRA)" <xm...@xml.apache.org> on 2005/01/18 02:24:20 UTC

[jira] Resolved: (XMLBEANS-23) schema compiler failure while importing schemas from a jar

     [ http://issues.apache.org/jira/browse/XMLBEANS-23?page=history ]
     
Radu Preotiuc-Pietro resolved XMLBEANS-23:
------------------------------------------

      Assign To:     (was: Radu Preotiuc-Pietro)
     Resolution: Fixed
    Fix Version: Version 2 Beta 1

SVN 125456

> schema compiler failure while importing schemas from a jar
> ----------------------------------------------------------
>
>          Key: XMLBEANS-23
>          URL: http://issues.apache.org/jira/browse/XMLBEANS-23
>      Project: XMLBeans
>         Type: Bug
>   Components: Compiler
>  Environment: Windows XP, Linux
>     Reporter: David Waite
>      Fix For: Version 2 Beta 1
>  Attachments: import-doc-support.patch, import-test-reduced.zip, import-test.tgz
>
> I create one jar file with SAML 1.1 and its dependancies (xmldsig), and then attempt to include that in creating another jar for Liberty IDFF 1.2 and its other dependancies.
> 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.
> From Radu:
> I have looked at this and it seems that we somehow get a reference from
> a type in one Schema to a document type in another Schema. The code in
> XsbReader tries to save this type, but it is not prepared to do so.
> It seems that, since document types are generated by XmlBeans there
> should be no way for them to be referenced from a Schema type in another
> document.
> It would take me some more time to untangle all of it, so I suggest you
> should file this as bug, or maybe investigate it further yourself.
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org