3

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
Jon Iles
  • 2,519
  • 1
  • 20
  • 30
Nipon
  • 31
  • 1
  • 1
  • 3
  • Please translate the exception message into English; you'll get better help and others will benefit when looking for this exception. – Emond Apr 19 '13 at 10:01
  • Do you have the assembly in your GAC and it's missing on the sharepoint server? Try adding the assemblie to the bin folder – Yeronimo Apr 19 '13 at 10:07
  • Yes, there are all *.dll files in the folder: C:\Users\sp\Documents\Visual Studio 2012\Projects\MA_SQL_Workload\MA_SQL_Workload\bin\Debug – Nipon Apr 19 '13 at 12:47
  • I try to use Microsoft.Office.Interop.MSProject.dll instead of MPXJ. There are also same Exception: searching files in : C:\02_current_ProjectsSystem.IO.FileNotFoundException: Could not load file or assembly "Microsoft.Office.Interop.MSProject, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" or one of its dependencies. The specified module could not be found. file name: "Microsoft.Office.Interop.MSProject, ... bei MA_SQL_Workload.MppTaskController..ctor(List`1 files) bei MA_SQL_Workload.UpdateStarter.startDBUpdate() – Nipon Apr 19 '13 at 13:06
  • I have also copied all assembly I've above in folder ...\ProjectName\WebpartName\bin\ It still doesn't work. I will try in a few weeks later. Anyways thanks for advices. – Nipon Apr 19 '13 at 13:59

2 Answers2

1

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.

Sanjay Uttam
  • 786
  • 1
  • 7
  • 19
0

I would guess the installer loads the required dlls into the GAC, but without the installer you should be able to get it working by loading the following dlls into the GAC on each machine that uses Saxon HE:

saxon9he.dll
saxon9he-api.dll
IKVM.OpenJDK.Charsets.dll
IKVM.OpenJDK.Core.dll
IKVM.OpenJDK.Text.dll
IKVM.OpenJDK.Util.dll
IKVM.OpenJDK.XML.API.dll
IKVM.Runtime.dll

Running the following the following command with admin rights will load a single dll into the GAC

"<Path To GACUtil>\GACUtil.exe" /if <Path to dll>\IKVM.OpenJDK.Charsets.dll

I am using .Net 4.5, so on my machine GACUtil.exe is in C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools\