Re: Illegal UTF8 String in Constant Pool

Jeroen Frijters <[email protected]>
Newsgroups gmane.comp.java.ikvm.devel
Message-ID <[email protected]>
Hi,

You need to reference an assembly that contains org.jboss.logging.BasicLogger when compiling XNIO (or include the jar). There is a bug in IKVM's dynamic class loading fall back mechanism that causes the class to be truncated when loaded dynamically, but you shouldn't be loading it dynamically.

Regards,
Jeroen

> -----Original Message-----
> From: Nathan Mascitelli [mailto:[email protected]]
> Sent: Monday, September 15, 2014 21:20
> To: [email protected]
> Subject: [Ikvm-developers] Illegal UTF8 String in Constant Pool
> 
> Hi,
> 
> I have used IKVM to get a DLL of the XNIO project. The DLL is created
> successfully however when I try and use some of the classes I get the
> following error:
> 
> Illegal UTF8 string in constant pool in class file
> org.xnio._private.Messages
> 
> And the following stack trace:
> 
>   at Java_java_lang_ClassLoader.defineClass1(ClassLoader
> thisClassLoader, String name, Byte[] b, Int32 off, Int32 len,
> ProtectionDomain pd, String source)
>   at IKVM.Internal.AssemblyClassLoader.DefineDynamic(String name, URL
> url)
>   at IKVM.Internal.AssemblyClassLoader.LoadDynamic(String name)
>   at IKVM.Internal.AssemblyClassLoader.LoadClassImpl(String name,
> Boolean throwClassNotFoundException)
>   at
> IKVM.Internal.ClassLoaderWrapper.LoadClassByDottedNameFastImpl(String
> name, Boolean throwClassNotFoundException)
>   at IKVM.Internal.ClassLoaderWrapper.LoadClassByDottedName(String name)
>   at IKVM.Runtime.ByteCodeHelper.LoadTypeWrapper(String clazz, CallerID
> callerId)
>   at IKVM.Runtime.ByteCodeHelper.DynamicLoadMethodHandleImpl(Int32 kind,
> String clazz, String name, String sig, CallerID callerID)
>   at IKVM.Runtime.ByteCodeHelper.DynamicBinderMemberLookup[T](Int32
> kind, String clazz, String name, String sig, CallerID callerID)
>   at org.xnio.Xnio.__<>MHC()
>   at org.xnio.Xnio..cctor()
> 
> The Messages class is an interface that inherets from
> org.jboss.logging.BasicLogger.
> 
> Has anyone encountered this issue before?
> 
> Thanks,
> 
> Nathan Mascitelli
> Geotab Inc.
> Developer | B. Eng Engineering Physics
> 
> 
> [Direct] +1 (289) 681-1005
> [Toll-Free] +1 (877) 436-8221
> [Visit] www.geotab.com <http://www.geotab.com/> Twitter
> <http://twitter.com/geotab>  | Facebook
> <http://www.facebook.com/mygeotab>  | YouTube
> <http://www.youtube.com/mygeotab>  | LinkedIn
> <http://www.linkedin.com/company/102661?trk=tyah&trkInfo=tarId:140319925
> 0031,tas:geotab,idx:2-1-3>

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce.
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.