Could not load file or assembly IKVM.OpenJDK.Core

Nipon picture Nipon · Apr 19, 2013 · Viewed 8.7k times · Source

I am using MPXJ , a library allowing project information to be manipulated in Java and .Net. (more info at http://mpxj.sourceforge.net/ ) I am working with Visual Studio 2012. When I use the VSTO project template for console application or windows.forms Application, my program runs without any errors.

But, when I use the sharepoint webpart template, I see the following error message:

System.IO.FileNotFoundException: Could not load file or assembly "IKVM.OpenJDK.Core, Version=7.0.4335.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58" or one of its dependencies. The specified module could not be found.
File: "IKVM.OpenJDK.Core, Version=7.0.4335.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58"
at MA_SQL_Workload.MppTaskController..ctor()
at MA_SQL_Workload.UpdateStarter.startDBUpdate()

So it can't find Assembly "IKVM.OpenJDK.Core".

the class MppTaskController.cs is the only one that uses the MPXJ library. The error occurred when I instanced MppTaskController.

And when I use exactly the same class in console or form application, it works well. I can send you the windows.form application, if you want.

I would like to post the image of project explorer, but I need at least 10 reputation to post images. Maybe the failure can be wrong path of something in project folder.

I would like to show you more information or send you the project folder, if you want.

what do you think, where is the failure?

Here are all *.dll files in the folder ...\ProjectName\WebpartName\bin\Debug\

IKVM.OpenJDK.Beans.dll
IKVM.OpenJDK.Charsets.dll
IKVM.OpenJDK.Core.dll
IKVM.OpenJDK.Jdbc.dll
IKVM.OpenJDK.Security.dll
IKVM.OpenJDK.SwingAWT.dll
IKVM.OpenJDK.Text.dll
IKVM.OpenJDK.Util.dll
IKVM.OpenJDK.XML.API.dll
IKVM.OpenJDK.XML.Bind.dll
IKVM.OpenJDK.XML.Parse.dll
IKVM.Runtime.dll
junit.dll
MA_SQL_Workload.dll
MA_SQL_Workload.pdb
MA_SQL_Workload.wsp
Microsoft.Office.Interop.MSProject.dll
mpxj.dll
poi-3.7-20101029.dll

Answer

Sanjay Uttam picture Sanjay Uttam · Mar 28, 2014

Make sure you have installed the Saxon components on the server using their executable. I encountered the same error, and although my dependencies existed on the server in the correct locations, I got this error until I installed the Saxon components via the executable. Good luck. HTH.