I seem to have found the issue. It appears to be a bug in JiBX, 
specifically in 
org.jibx.binding.classes.MethodBuilder.appendCreateArray(String)

It looks like the following code:

       String cname = type + "[]";
       if (ClassItem.isPrimitive(btype)) {
           cname = Utility.getSignature(cname);
       }

should just read:

       String cname = Utility.getSignature(type + "[]");

I.e. Utility.getSignature() should be called whether it's a primitive or 
not.

Anyone have any comments about this?

I'll file a bug report.

Thanks,
David Citron

On Tue, 24 Oct 2006, David Citron wrote:

> Hi!
>
> I'm trying to get a simple multi-dimensional array mapping working, but am
> getting a java.lang.VerifyError (Illegal dimension argument) when I try to
> run the program.
>
> I have:
>
> public class JiBXMultiArray
> {
>     private String[][] matrix;
>
>     //<snip marshalling code>
> }
>
> and:
>
> <binding>
>     <mapping name="JiBXMultiArray" class="JiBXMultiArray">
>         <collection name="matrix" field="matrix">
>             <collection name="element">
>                 <value name="item"/>
>             </collection>
>         </collection>
>     </mapping>
> </binding>
>
> This compiles and binds, but yields the following error at runtime:
>
> Exception in thread "main" java.lang.VerifyError: (class:
> JiBX_MungeAdapter, method: JiBX_JiBXMultiArray_newinstance_1_0 signature:
> (Lorg/jibx/runtime/impl/UnmarshallingContext;)[[Ljava/lang/String;)
> Illegal dimension argument
>
> The bytecode in question looks like:
>
> public static java.lang.String[][] 
> JiBX_JiBXMultiArray_newinstance_1_0(org.jibx.runtime.impl.UnmarshallingContext);
>    throws org/jibx/runtime/JiBXException
>   Code:
>    0:   bipush  16
>    2:   multianewarray  #17,  1; //class String[][]"
>    6:   areturn
>
> Certainly others must have gotten multidimensional array mapping working,
> so what am I doing wrong?
>
> Vitals: java version "1.4.2.09"
>         jibx-1.1
>
> Thanks!
> David Citron
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> jibx-users mailing list
> jibx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to