[NuGet] IKVM.NET issue, missing IKVM.OpenJDK.Security assembly dependency

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[NuGet] IKVM.NET issue, missing IKVM.OpenJDK.Security assembly dependency

Andrew Smart
This issue is not with Saxon-HE itself, but with the NuGet package which deploys it.

I had installed the Saxon-HE NuGet package, in MonoDevelop:  https://www.nuget.org/packages/Saxon-HE/

That NuGet package is missing components of IKVM.NET that Saxon may call. Some components (assemblies) of IKVM.NET are distributed with the Saxon-HE package, but not all.

I suggest future releases of the Saxon-HE NuGet package be modified so that it depends on the latest IKVM.NET NuGet package, instead of distributing certain IKVM.NET assemblies as it is currently. The IKVM.NET NuGet package can be found here: http://weblog.ikvm.net/default.aspx?date=2015-01-12

Sample code to demonstrate error is:
System.Net.WebClient wc = new System.Net.WebClient();
string str = wc.DownloadString(uri);
MemoryStream ms = new System.IO.MemoryStream(System.Text.Encoding.Unicode.GetBytes(str ?? ""));
Saxon.Api.DocumentBuilder loader = processor.NewDocumentBuilder();
loader.BaseUri = uri;
Saxon.Api.XdmNode firstPage = loader.Build(ms); //error here

The particular error I'm getting is:
System.IO.FileNotFoundException: Could not load file or assembly 'IKVM.OpenJDK.Security, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58' or one of its dependencies.
File name: 'IKVM.OpenJDK.Security, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58'
  at (wrapper synchronized) java.util.jar.JarFile:getInputStream (java.util.zip.ZipEntry)
  at sun.net.www.protocol.jar.JarURLConnection.getInputStream () [0x00000] in <filename unknown>:0
  at java.net.URL.openStream () [0x00000] in <filename unknown>:0
  at java.lang.ClassLoader.getResourceAsStream (System.String name) [0x00000] in <filename unknown>:0
  at java.util.ResourceBundle$Control$1.run () [0x00000] in <filename unknown>:0
  at java.util.ResourceBundle$Control$1.run () [0x00000] in <filename unknown>:0
  at java.security.AccessController.doPrivileged (System.Object , java.security.AccessControlContext , ikvm.internal.CallerID ) [0x00000] in <filename unknown>:0

The Saxon-HE package works well after I had installed the IKVM.NET NuGet package manually.

Thank you!
-Andrew Smart

One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]