Thanks for the report on this, David (and for tracking down the issue)! 
I'll look into it tomorrow and verify that the fix is correct. I'll also 
add a test case using an object type - my existing test cases for 
multidimensional arrays only used primitives, unfortunately...

  - Dennis

Dennis M. Sosnoski
SOA, Web Services, and XML
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-296-6194 - Wellington, NZ +64-4-298-6117



David Citron wrote:
> 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
>
>   

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