[ 
https://issues.apache.org/jira/browse/XERCESJ-176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Elliotte Rusty Harold closed XERCESJ-176.
-----------------------------------------

> java.lang.outOfMemory Exception during parsing and getting global elements.
> ---------------------------------------------------------------------------
>
>                 Key: XERCESJ-176
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-176
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema 1.0 Structures
>    Affects Versions: 2.0.0 [beta 2]
>         Environment: Operating System: Windows NT/2K
> Platform: PC
>            Reporter: Rahul Sunder
>
> 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



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to