3

I'm trying to mount a small web application that uses Content Delivery to fetch the content broker and check that the content is correctly published (we merge info of our back office sw with content in CMS and we have to guarantee that all is correctly configured and published).

I developed it in my dev environment and it's working fine.

Then, I want to deploy it in the server where we have installed Tridion CMS Gui. This server is a Windows 2012 server 64 bits.

The webapp that I developed is compiled as Any CPU app and, in my dev environment, I'm using 32 bits java vm.

To deploy in the server I changed all the libraries to 64bits version (as said in other questions in stack exchange). But when is trying to use the java part is throwing the following exception:

An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) 

Line 176:            List<String> result = null;
Line 177:
Line 178:            Query query = new Query();
Line 179:            CustomMetaKeyCriteria metaKeyCriteria = new CustomMetaKeyCriteria(name);

[BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)]
   Codemesh.JuggerNET.NativeInterface.GetJvmLoader(Int32 ctorVersion, String configFile, String vers, String conf, String reserved, Boolean bEnvOverrides, Boolean bDefaultJvm, Int32 traceFacility, Int32 traceLevel, Int32& error) +0
   Codemesh.JuggerNET.JvmLoader.GetJvmLoader(Boolean bEnvOverrides, Boolean bDefaultJvm, TraceFacility fac, TraceLevel level) +138
   Codemesh.JuggerNET.JvmLoader.GetJvmLoader() +49
   Codemesh.JuggerNET.JavaClass.init() +105
   Codemesh.JuggerNET.JavaClass.get_JObject() +33
   Codemesh.JuggerNET.JavaMethod.init() +1118
   Codemesh.JuggerNET.JavaMethod.get_MethodPtr() +56
   Codemesh.JuggerNET.JavaMethod.get_Handle() +50
   Codemesh.JuggerNET.JavaMethod.CallObject(JavaProxy jpo) +195
   Com.Tridion.Broker.Querying.Query..ctor() +96
   Tridion.ContentDelivery.DynamicContent.Query.Query..ctor() +57

Then, I figured out that the problem is that Jugger is not able to start the jvm. In this server I installed jvm 64 bits for Tridion CMS requirements. Could I install 32 bits version of jvm in this server without affecting to Tridion?

Another option that I tried is to set my dev environment to 64 bits but, when I try to run my app in VS2012 I get an error like:

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

=== Pre-bind state information ===
LOG: DisplayName = RateViewer
 (Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: RateViewer | Domain ID: 2
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/RateViewer/RateViewer/
LOG: Initial PrivatePath = C:\RateViewer\RateViewer\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\RateViewer\RateViewer\web.config
LOG: Using host configuration file: \\Mac\Home\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\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:/Users/AppData/Local/Temp/Temporary ASP.NET Files/root/a4a9fd24/35097e62/RateViewer.DLL.
LOG: Attempting download of new URL file:///C:/Users/AppData/Local/Temp/Temporary ASP.NET Files/root/a4a9fd24/35097e62/RateViewer/RateViewer.DLL.
LOG: Attempting download of new URL file:///C:/RateViewer/RateViewer/bin/RateViewer.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.

How I have to configure my Visual Studio to deploy my app in a 64 bits server?

Thank you!

2 Answers 2

3

It's important to know that the operating system is not what matters; it's the web application that determine if you are running a 32-bit or 64-bit run-time.

For example, if you use IIS 7 and have set the Application Pool for the website to "Enable 32-Bit Applications" -- everything will be running in 32-bit. That seems to be what is happening here.

0

You need to make sure all your Content Delivery DLLs are from the x64 directory in your installation media and try to use 64 bit Java.

Mixing 32 bit and 64 bit DLLs is generally a bad idea in Tridion. It shouldn't matter how you compile your app generally. It's usually a problem with mixing x64 and x86

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.