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 ji...@apache.org on 2004/05/16 00:03:56 UTC

[jira] Assigned: (XERCESJ-960) ArrayIndexOutOfBoundsException error

Message:

   The following issue has been re-assigned.

   Assignee: Michael Glavassevich (mailto:mrglavas@ca.ibm.com)
---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XERCESJ-960

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESJ-960
    Summary: ArrayIndexOutOfBoundsException error
       Type: Bug

     Status: Open
   Priority: Major

    Project: Xerces2-J

   Assignee: Michael Glavassevich
   Reporter: Chin-Tat Teo

    Created: Thu, 13 May 2004 5:02 AM
    Updated: Sat, 15 May 2004 3:02 PM

Description:
I have this exception 
java.lang.ArrayIndexOutOfBoundsException: 15
	at org.apache.xerces.impl.xs.SchemaGrammar.getComponents(Unknown Source)
	at xs.QueryXS.traverse(QueryXS.java:323)
	at xs.QueryXS.main(QueryXS.java:127)

What I am doing is as follows:

XSNamespaceItemList nsItemList = model.getNamespaceItems();
if (nsItemList != null)
   XSNamespaceItem nsItem = nsItemList.item(0);
   XSNamedMap nmap = nsItem.getComponents((short)
                     XSTypeDefinition.COMPLEX_TYPE);


-------
After examining the xerces source files, I notice the error occurs at
line 811 of org.apache.xerces.impl.xs.SchemaGrammar. It tries to check for GLOBAL_COMP with an index larger than the declared array.

    public synchronized XSNamedMap getComponents(short objectType) {
        if (objectType <= 0 || objectType > MAX_COMP_IDX ||
            !GLOBAL_COMP[objectType]) {
            return null;
        }
        ...

Hope the information is helpful


---------------------------------------------------------------------
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: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org