Re: [Ikvm-developers] DeclaringTypeWrapper is only available for finished types ?
Brought to you by:
jfrijters
|
From: Jeroen F. <je...@su...> - 2011-01-21 11:01:50
|
Hi, Here's a new build that includes the fix: http://www.frijters.net/ikvmbin-0.45.4038.zip Regards, Jeroen > -----Original Message----- > From: ¨˜”°º•C0D3w@lk3r•º°”˜¨ [mailto:c0d...@gm...] > Sent: Friday, January 21, 2011 11:42 AM > To: Jeroen Frijters > Cc: ikv...@li... > Subject: Re: [Ikvm-developers] DeclaringTypeWrapper is only available > for finished types ? > > Thanks Jeroen, > > Class.forName could work, but would not suit my current requirement. > I'm trying to create a tool which can convert any serialized binary file > to xml and back, provided the jars are present in the CLASSPATH. > > This requires the tools to be dynamic in nature. Will await the next > development snapshot very eagerly :)) Thanks for all the help provided > so far. > > Regards, > Manish > > > On Fri, Jan 21, 2011 at 4:03 PM, Jeroen Frijters <je...@su...> > wrote: > > Hi, > > > > This is an IKVM bug. It is unrelated to IKVM.Reflection. The runtime > is trying to reflect on a class that has not been fully compiled yet. > > > > If you know what types are involved, you can work around the problem > by forcing the types to be compiled using Class.forName("..."). > > > > I will fix this in the next development snapshot. > > > > Regards, > > Jeroen > > > >> -----Original Message----- > >> From: ¨˜”°º•C0D3w@lk3r•º°”˜¨ [mailto:c0d...@gm...] > >> Sent: Friday, January 21, 2011 10:34 AM > >> To: ikv...@li... > >> Subject: [Ikvm-developers] DeclaringTypeWrapper is only available for > >> finished types ? > >> > >> Hi, > >> > >> I'm trying to serialize a JAVA object to xml using woxSerializer > >> (compiled to .dll and used within a .net class). While doing so, I'm > >> able to successfully convert JAVA classes to xml, but for one of the > >> class <-> xml conversion I get the following error. > >> > >> What does "DeclaringTypeWrapper is only available for finished types" > >> mean over hear. I checked the TypeWrapper.cs code and tried my best > >> to understand. > >> Is there some implementation missing within the IKVM.Reflection for > >> some special cases of Java <-> .Net conversion. > >> > >> Sorry of this is a very basic question, but it would help me > >> understand what is exactly happening here > >> > >> The error is as follows: > >> > >> Unhandled Exception: System.InvalidOperationException: > >> DeclaringTypeWrapper is only available for finished types > >> at > >> IKVM.Internal.DynamicTypeWrapper.JavaTypeImpl.get_DeclaringTypeWrappe > >> r() > >> at IKVM.Internal.DynamicTypeWrapper.get_DeclaringTypeWrapper() > >> at IKVM.Internal.TypeWrapper.get_IsFakeNestedType() > >> at > >> IKVM.NativeCode.sun.reflect.ReflectionFactory.FieldAccessorImplBase.F > >> iel dAccessor`1.IsSpecialType(TypeWrapper > >> tw) > >> at > >> IKVM.NativeCode.sun.reflect.ReflectionFactory.FieldAccessorImplBase.F > >> iel dAccessor`1.IsSlowPathCompatible(FieldWrapper > >> fw) > >> at > >> IKVM.NativeCode.sun.reflect.ReflectionFactory.FieldAccessorImplBase.F > >> iel > >> dAccessor`1..ctor(FieldWrapper > >> fw, Boolean overrideAccessCheck) > >> at > >> IKVM.NativeCode.sun.reflect.ReflectionFactory.FieldAccessorImplBase.C > >> rea > >> te(FieldWrapper > >> field, Boolean overrideAccessCheck) > >> at sun.reflect.ReflectionFactory.newFieldAccessor(Field f, Boolean > >> b) > >> at java.lang.reflect.Field.acquireFieldAccessor(Boolean ) > >> at java.lang.reflect.Field.getFieldAccessor(Object , CallerID ) > >> at java.lang.reflect.Field.get(Object obj, CallerID ) > >> at wox.serial.SimpleWriter.writeFields(Object , Element ) > >> at wox.serial.SimpleWriter.write(Object ob) > >> at wox.serial.SimpleWriter.writeFields(Object , Element ) > >> at wox.serial.SimpleWriter.write(Object ob) > >> at wox.serial.SimpleWriter.writeObjectArrayGeneric(Object , > >> Element ) > >> at wox.serial.SimpleWriter.writeArrayList(Object ) > >> at wox.serial.SimpleWriter.write(Object ob) > >> at wox.serial.SimpleWriter.writeFields(Object , Element ) > >> at wox.serial.SimpleWriter.write(Object ob) > >> at wox.serial.SimpleWriter.writeObjectArrayGeneric(Object , > >> Element ) > >> at wox.serial.SimpleWriter.writeArrayList(Object ) > >> at wox.serial.SimpleWriter.write(Object ob) > >> at wox.serial.SimpleWriter.writeFields(Object , Element ) > >> at wox.serial.SimpleWriter.write(Object ob) > >> at wox.serial.Easy.save(Object ob, String filename) > >> at DotNetJavaInterop.Program.Main(String[] args) in C:\..\Visual > >> Studio > >> 2010\Projects\DotNetJavaInterop\DotNetJavaInterop\Program.cs:line > >> 30 > >> > >> -- > >> Manish > >> > >> --------------------------------------------------------------------- > >> --- > >> ------ > >> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > >> Finally, a world-class log management solution at an even better > >> price- free! > >> Download using promo code Free_Logger_4_Dev2Dev. Offer expires > >> February 28th, so secure your free ArcSight Logger TODAY! > >> http://p.sf.net/sfu/arcsight-sfd2d > >> _______________________________________________ > >> Ikvm-developers mailing list > >> Ikv...@li... > >> https://lists.sourceforge.net/lists/listinfo/ikvm-developers > > > > > > -- > ¨˜”°º•C0D3w@lk3r•º°”˜¨ |