You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by xm...@xml.apache.org on 2004/10/02 01:04:32 UTC

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

The following comment has been added to this issue:

     Author: Radu Preotiuc-Pietro
    Created: Fri, 1 Oct 2004 4:03 PM
       Body:
The patch hasn't been applied, yet I tried the reduces sample and it seems to compile ok. DavidW, can you confirm that the issue has been resolved some other way?

---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/XMLBEANS-23?page=comments#action_53609

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XMLBEANS-23

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XMLBEANS-23
    Summary: schema compiler failure while importing schemas from a jar
       Type: Bug

     Status: Open
   Priority: Major

    Project: XMLBeans
 Components: 
             Compiler

   Assignee: Radu Preotiuc-Pietro
   Reporter: David Waite

    Created: Wed, 18 Feb 2004 11:51 PM
    Updated: Fri, 1 Oct 2004 4:03 PM
Environment: Windows XP, Linux

Description:
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


---------------------------------------------------------------------
JIRA INFORMATION:
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