Re: [Ikvm-developers] ikvm (0.46) String Encoding / conversion issues with corba?
Brought to you by:
jfrijters
From: Jeroen F. <je...@su...> - 2011-04-22 13:06:52
|
Hello Jörg, I found the problem. It's not an IKVM.NET problem, there is a bug in the Java code. It depends on the order in which fields are returned by Java reflection (spec says: "The elements in the array returned are not sorted and are not in any particular order.") The bug is in the method convertAllStrings(Object obj, boolean fromDefaultToUTF8, Stack classStack, int depth) in com.starbase.caliber.util.UnicodeHelper. When it encounters a field with a null value, it stops processing the fields and for statically compiled code the fields in com.inprise.vbroker.orb.AnyImpl are returned in such an order that a null field precedes the _refValue field (which is the string that is supposed to be converted). I hacked the IKVM.NET reflection code to return the _refValue field first and that indeed solved the problem. The workaround patch is attached, but if you want to use it you'll have to build your own version of IKVM.NET (should not be too difficult). (BTW, thank you very much for the excellent reproduction.) Regards, Jeroen > -----Original Message----- > From: Jörg Battermann [mailto:jb...@jo...] > Sent: Friday, April 15, 2011 1:58 PM > To: ikv...@li... > Subject: [Ikvm-developers] ikvm (0.46) String Encoding / conversion > issues with corba? > > Hello there, > > I tried taking a java .jar that internally uses corba, compile it with > ikvm to a .net assembly and all worked perfectly fine so far in terms of > retrieving/reading data from the system the .jar/java api talks to. Now > I also tried changing data and I get a > > "org.omg.CORBA.DATA_CONVERSION: char of value 8230 is not an 8-bit > entity" .. Exception > > Using the exact same code in pure java with the .jar, it does work > perfectly fine with the same input string. Are there any known > limitations in regards of the java > .net String handling in combination > with corba? If so, are there any known workarounds? > > > Ikvm is the released 0.46 version.. > > > Cheers and all the best, > -J > > ------------------------------------------------------------------------ > ------ > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and > improve application availability and disaster protection. Learn more > about boosting the value of server virtualization. > http://p.sf.net/sfu/vmware-sfdev2dev > _______________________________________________ > Ikvm-developers mailing list > Ikv...@li... > https://lists.sourceforge.net/lists/listinfo/ikvm-developers |