You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2002/02/13 10:56:58 UTC

DO NOT REPLY [Bug 6421] New: - java.lang.outOfMemory Exception during parsing and getting global elements.

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6421>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6421

java.lang.outOfMemory Exception during parsing and getting global elements.

           Summary: java.lang.outOfMemory Exception during parsing and
                    getting global elements.
           Product: Xerces2-J
           Version: 2.0.0 [beta 2]
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: XML Schema Structures
        AssignedTo: xerces-j-dev@xml.apache.org
        ReportedBy: rahul@yasutech.com


While parsing through the schema, For a few schemas the parsing keeps going on 
and on until java.lang.outOfMemory excepton comes up. 

public List getGlobalElements(){
	
      if(globalElements == null){
	    int size = globalElementNames.size();
	    globalElements = new ArrayList(size);
	    
	    for(int i=0; i<globalElementNames.size(); i++){
		
		String name = (String)globalElementNames.get(i);
		//SchemaUtils,XSType,XSElementImpl are selfdefined class here
                XSElementDecl elementDecl = grammar.getGlobalElementDecl(name);
				
		XSType type = SchemaUtils.getType(elementDecl.fType);
		
		XSElementImpl element = new XSElementImpl(name, type, 
elementDecl);
		element.setGlobal(true);
		element.setXPath("/"+name);
		globalElements.add(element);
	    }
	}
	return globalElements;
    }
When this method is called it goes for a toss-an infintite loop where it is 
getting the type(XSType type = SchemaUtils.getType(elementDecl.fType) 
infinitely. The same elements are got again and again.

    Could you please tell me all the possible cases of schema that this is 
happens? 
Thanx in advance.
Rahul

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