You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Roshan Punnoose (JIRA)" <xm...@xml.apache.org> on 2005/03/24 16:24:27 UTC

[jira] Commented: (XMLBEANS-131) XmlBeans ant task throws ArrayIndexOutOfBoundsException

     [ http://issues.apache.org/jira/browse/XMLBEANS-131?page=comments#action_61492 ]
     
Roshan Punnoose commented on XMLBEANS-131:
------------------------------------------

Actually, after looking at the code again I found out the real problem. The function I had was overloading another function, and XMLbeans seemed to only take into account the number of parameters in the first function.

Interface Code:

public Foo createFoo(String identifier);
	
public Foo createFoo(String identifier, String href);

Handler Code:

public static Foo createFoo(XmlObject xo, String identifier){
		return null;
	}
public static Foo createFoo(XmlObject xo, String identifier, String href){
		return null;
	}

In the generation of the source, I get an ArrayIndexOutofBoundsException: 2. Which probably means that XMLBeans is only counting the number of parameters in the first function with one parameter, and not the second function with 2 parameters.

> XmlBeans ant task throws ArrayIndexOutOfBoundsException
> -------------------------------------------------------
>
>          Key: XMLBEANS-131
>          URL: http://issues.apache.org/jira/browse/XMLBEANS-131
>      Project: XMLBeans
>         Type: Bug
>   Components: Binding
>     Versions: Version 2 Beta 1
>  Environment: Windows XP
> jdk 1.4.06
> ant 1.6
>     Reporter: Roshan Punnoose

>
> I am using the XMLBeans 2.0 beta. Specifically I am using the Extensions capability that is built in with this version.
> If I have a function with more than 2 parameters, for example:
> public EventRef createEventRef(String identifier, String href, String temp);
> in my interface and handler, the xmlbeans ant task to generate a jar file will throw this error:
> java.lang.ArrayIndexOutOfBoundsException: 2
> If I take the String temp out:
> public EventRef createEventRef(String identifier, String href);
> it works perfectly.
> Thank You.

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