Jennifer, this is probably related to an idiosyncracy in the Java Virtual Machine specification. From the VM Spec, section 3.6.1 (http://java.sun.com/docs/books/vmspec/2nd-edition/html/Overview.doc.htm l#15722):
"Each frame contains an array of variables known as its local variables... A single local variable can hold a value of type boolean, byte, char, short, int, float, reference, or returnAddress. A pair of local variables can hold a value of type long or double." As you can see, longs and doubles are treated differently than ints or floats. So, it makes perfect sense that the code could work with float or int, but not double or long (due to, as Dennis stated previously, a code generation glitch in jibx). Most likely, the jibx compiler generated an "faload" instead of an "daload" or something like that. Note that this particular idiosyncracy has probably bitten Sun a couple of times - in section 4.4.5 (http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.ht ml#1348), they mention: "The constant_pool index n+1 must be valid but is considered unusable (2)" and (http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.ht ml#16628): "2: In retrospect, making 8-byte constants take two constant pool entries was a poor choice." -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jennifer Gau Sent: Wednesday, July 26, 2006 7:18 AM To: [email protected] Subject: Re: [jibx-users] java.lang.VerifyError: Attempt to split long ordouble on the stack I wanted to clarify that the sample I posted works when I change the "double" to either "int" or "float". Thus, I can create a collection of primitives, such as an int array or a float array with out any problems using this sample code. This error appears since I want to create a double array not a float array. As suggested, I will try to use a custom marshaller and wrap this to a Double, but I don't see why double is treated differently than float or int. Thanks, Jennifer __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ------------------------------------------------------------------------ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE V _______________________________________________ jibx-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jibx-users ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ jibx-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jibx-users
