Could not load file or assembly 'JVM'

User 715e498bfb

07-05-2010 02:49:45

Hi, All


I download jchem from http://www.chemaxon.com/download.php?d=/data/download/jchem/JChem_NET_API_5_3_02_63.zip and use it in .NET environment(vs2008+win7 64bit), but we encounter an error.


 

Server Error in '/' Application.



Could not load file or assembly 'JVM' or one of its dependencies. An attempt was made to load a program with an incorrect format.


Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.BadImageFormatException: Could not load file or assembly 'JVM' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Source Error:








An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Assembly Load Trace: The following information can be helpful to determine why the assembly 'JVM' could not be loaded.









=== Pre-bind state information ===
LOG: User = IIS APPPOOL\webshop
LOG: DisplayName = JVM
(Partial)
LOG: Appbase = file:///D:/webshop/
LOG: Initial PrivatePath = D:\webshop\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\webshop\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/root/42e641d3/465ac390/JVM.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/root/42e641d3/465ac390/JVM/JVM.DLL.
LOG: Attempting download of new URL file:///D:/webshop/bin/JVM.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.



Stack Trace:









[BadImageFormatException: Could not load file or assembly 'JVM' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +416
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +166
System.Reflection.Assembly.Load(String assemblyString) +35
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +190

[ConfigurationErrorsException: Could not load file or assembly 'JVM' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +11207304
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +388
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +232
System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +48
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +210
System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +76
System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +11196482
System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +185
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +551

[HttpException (0x80004005): Could not load file or assembly 'JVM' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +76
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +1012
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +1025

[HttpException (0x80004005): Could not load file or assembly 'JVM' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11301302
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +88
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4338644


Would you tell me where is wrong and how can i do it well?


thanks in advance.


zhourui

ChemAxon 7c2d26e5cf

07-05-2010 11:42:45

I have moved your post into the proper forum (Integration .NET). My colleagues will answer you.

ChemAxon b62f37c21a

07-05-2010 16:56:05

Hi,


 


only 32 bit mode is supported by JChem .NET API (because of native components).


We are working on this issue.


Until then you could compile your code with x86 architecture.


 


Hope this helps.


 


Best regards,


Gabor Vasko