Re: [Ikvm-developers] DLL fixup problem (System.Security)
Brought to you by:
jfrijters
|
From: Jeroen F. <je...@su...> - 2006-08-23 15:33:12
|
Michael Kay wrote:
> Exception java.lang.NoClassDefFoundError
> cli.System.Security.Cryptography.Xml.SignedXml
> java.lang.NoClassDefFoundError:
> cli.System.Security.Cryptography.Xml.SignedXml
> at JavaException.NoClassDefFoundError(Unknown Source)
> at IKVM.Runtime.ByteCodeHelper.LoadTypeWrapper(Unknown Source)
> at=20
> IKVM.Runtime.ByteCodeHelper.DynamicNewCheckOnly(Unknown Source)
> at
> com.saxonica.validate.DotNetVerifier.loadLicense(DotNetVerifier.java)
This stack trace indicates that "com.saxonica.validate.DotNetVerifier"
was dynamically compiled (at runtime) and that it could find the
SignedXml type at that time, because otherwise it wouldn't call
ByteCodeHelper.DynamicNewCheckOnly. This suggests that
System.Security.dll is not yet loaded in the current AppDomain (as 0.30
still uses the model were the boot class loaders loads from all the
assemblies currently in the AppDomain).
The fact that the problem doesn't always show up supports this theory
(e.g. the debugger may load the assembly eagerly for some reason).
The work around is to explicitly load System.Security.dll into the
AppDomain. For example using
Assembly.LoadWithPartialName("System.Security").
Regards,
Jeroen
|