Unable to load DLL 'xmogrt': from Tridion metadata query - tridion

I'm trying to use the CustomMetaKeyCriteria class to pull back content from the Broker DB based upon some metadata I set up. However, I get the error listed below. Any ideas? That dll is in my bin folder & I confirmed it is the 32 bit version, as this code is running on a 32 bit box. I missed some set up obviously, but what?
Unable to load DLL 'xmogrt': The specified module could not be found.
(Exception from HRESULT: 0x8007007E)

Check if you have the rest of the dll dependencies for this file?
In my install folder for x86 I see the following DLLs:
MSVCP71.dll
MSVCR71.dll
netrtsn.dll
Tridion.ContentDelivery.Configuration.dll
Tridion.ContentDelivery.dll
Tridion.ContentDelivery.Interop.dll
xmogrt.dll
EDIT: And the following Tridion jars:
cd_broker
cd_cache
cd_core
cd_datalayer
cd_deployer
cd_linking
cd_model
cd_tcdl (not usually needed)
You should probably check cd_core_log for additional details, maybe you're missing one of the 3rd party jars.

Your DLL may be blocked if you copied it from a network location. Try right clicking on the DLL > Properties > Unblock

Related

Send Pipeline Error 0xc0c01658

I created a Send Pipeline that has a Flat File Assembler. When I tried to send the Message I am getting error like, Error Code 0xc0c01658 (Send Pipeline Error)
The detail of the error:
Please verify that the pipeline strong name is correct and that the pipeline assembly is in the GAC
Can anyone help me? I am new to BizTalk and I am learning
Check to see that the Pipeline is in the GAC (C:\Windows\Microsoft.NET\assembly\GAC_MSIL)
There should be a folder there with the Assembly name (Jax.Dhana.SamplePRJ), and then a sub folder which will be in the format of .NetVersion_DLLVersion_PublicKey e.g. v4.0_1.0.0.0_cf96c3b300e6dd40 and under that should be the DLL. If the Name, Assembly Version Number or Public Key do not match then it will not be able to find it in the GAC.
Try to remove the existing assembly in gac using gacutil -u and then reinstall the latest assembly.
Check if you have added the pipeline to BizTalk using add resource, or try doing it again anyway.

Could not load file or assembly when trying to remove/delete Resource/Application

I have a Biztalk application that is basically a housing for a schema that other applications are using. I now want to remove this application, but am unable to from the BizTalk Server Admin Console, when I right-click --> Remove I get an error that says
Could not load file or assembly <assembly_name>.dll or one of its dependencies. The system cannot find the path specified (mscorlib)
followed by:
The system cannot find the path specified (Exception from HRESULT: 0x80070003)
So I go to remove the assembly from the Application and get the exact same error. I remove all references to it in other biztalk resources and still the same error when trying to delete the application or resource. I did notice that in the Modify Resouces dialog of referencing assemblies, this rogue assembly is listed as a dependency status of Not Found.
The strange thing is, when Messages come through, the resources which depend on the rogue assembly, still work fine and no errors are thrown (despite them using components of the assembly which shows as Not Found).
I have made sure to check the GAC and the assembly is loaded to it.
So now I have to ask:
where is Biztalk actually looking for this assembly?
is there a way I can just force a deletion of this application?
why does it care if the assembly is not found, when I'm trying to delete it?
why does it show as Not Found, yet still work?
Thanks.
I think the key is "or one of its dependencies." If it's a dependency it may be using the standard windows mechanism for finding a dll. It searches the current directory and the windows directory for them.
"where is Biztalk actually looking for this assembly?"
Look in the 'resources' section of your application in the biztalk management console. It shows a column with the location of the assembly.
I'd stop all the host instances/orchestrations, and then unload all your stuff from the GAC - if messages are actually still going through then stuff is still loaded that is using your schema.

COM Exception - TYPE_E_CANTLOADLIBRARY?

I am using a COM dll in my .Net web application. This works fine on multiple different machines.
However on one particular machine I get the following error:
Unable to cast COM object of type 'CServer.CApplicationClass' to interface type 'CServer.ICApplication'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{CF0DFA28-046B-4C7D-8AA9-F4B7477D8CAE} ' failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).
I have registerd the dll using the regsvr32 command.
I have also created a COM+ application for this dll.
Running a search through the registry
I can find the key in numerous places.
I have also tried unregistering the dll and deleting all referneces on the computer to this dll. And afterwards re-adding the dll and re-registering it.
I have written a simple windows script file which tests the dll. This works fine. However the problem exists in my .net project which is running in iis.
Can anyone help me with this?..
If you need anymore info please leave a comment. Thanks.
I had a similar problem, with the "TYPE_E_CANTLOADLIBRARY" message.
Background:
I had a project which used Interop.ReferenceA.dll. This file was created using tlbimp ReferenceA.dll /out: Interop.ReferenceA.dll.
Solution:
When I took a look at ReferenceA.dll using RegDllView I noticed that ReferenceA.dll had a subclass, which was the IID shown in the error message.
I looked around in the source code of the subclass and noticed that it had a dependency to Interop.ReferenceB.dll.
Turns out that the subclass needed Interop.ReferenceB as a type-library to work. So I ran this:
regasm /tlb:Interop.ReferenceB.tlb Interop.ReferenceB.dll (the 32-bit version of regasm was used.)
And the error went away.
Make sure your AppPool is set to x86. Also make sure your assembly is targeting only x86.
I was having a similar issue. First got Access Denied, which after some looking around was resolved, only to be faced with this error message (TYPE_E_CANTLOADLIBRARY). Mind that I'm running a COM+ Component on Windows 7.
After some fruitless attempts which involved messing with the registry, my workmate and I found a way of getting it up and running:
1) Unregister your dll (regsvr32 -u dllname)
2) make sure your references to the dll are cleared up from registry (backup first)
3) Create an empty com+ application (server app) in Component Services
4) Copy the application id to the clipboard
5) go to "c:\program files (x86)\Complus applications" and create a folder with the id on your clipboard
6) copy your dll into that folder and register it
7) Go back to your Component Services and add the component to the app you created using the dll on "c:\program files (x86)\Complus applications{*app id*}"
that did it for me. Hope it helps.
I had a similar problem where the error was triggered on my PC but not on that of other developers.
It turns out that I had been testing an automatic build process on my PC that had updated the version number of the assembly, thus registering the TLB in the registry with a version number higher than the one we were normally using.
When trying to get the interface, the server was consistently using the wrong TLB information leading to the wrong assembly. Once I deleted the higher version entry in the registry, it worked fine.
Now we just have to ensure the build process is not going to cause that issue again. :)

Assembly loading error in my ASP.NET app, and the assembly isn't even referenced anymore

I had some code that referenced the Noesis.Javascript assembly (http://javascriptdotnet.codeplex.com) and had renamed the Noesis.Javascript.dll to Noesis.Javascript.0.4.dll. I referenced this file through Visual Studio, and when I launched my web app in the ASP.NET development server, I got this error:
Could not load file or assembly
'Noesis.Javascript.0.4' or one of its
dependencies. The located assembly's
manifest definition does not match the
assembly reference. (Exception from
HRESULT: 0x80131040)
I then tried to remove this reference and re-reference the older version of the library. I got the same error. I then tried to remove this reference entirely and comment out all code that used this library. I still get the same error. I have tried to explicitly close out the ASP.NET development server from its icon in the system tray, but this still occurs. I can find no reference of this assembly anywhere in my project now, yet the error persists. What might be happening? Is there some cache that I'm not finding? How can I resolve this error?
Go into the registry and set [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Refresh the page and the error output will show you which assembly has a dependency on Noesis.Javascript.0.4.
Check if "Noesis.Javascript.0.4" appears anywhere in your web.config file and remove it if it does. It might be in the <assemblies> part.
remove the reference and add it again. Please note that the two dll version must be same. Do not add any later version, if its get registered into your web.config, otherwise you need to remove from there too.
In my case, I added a wrong DLL. Instead of adding 64bit, I added 32bit.
Thanks,

ASP.NET MVC 2.0 NHibernate Configure() issue

I have installed NHibernate for my ASP.NET web app although I'm getting a problem in real-time on the following line of code:
if (_sessionFactory == null)
{
_sessionFactory = new Configuration().Configure().BuildSessionFactory();
}
Looking at the inner exception the problem is this:
{"Could not find file 'D:\Websites\Test\Test\Test\bin\hibernate.cfg.xml'.":"D:\Websites\Test\Test\Test\bin\hibernate.cfg.xml"}
This makes sense, as the file doesnt exist in that location. This line of code is within my Core project. File hibernate.cfg.xml is currently in my Infrastucture project, not my Core. Should this be? I have copied the file into this location although I still get problems. If I manually copy the file into this location within windows explorer I then get the following error during runtime.
{"Could not load file or assembly
'Infrastructure' or one of its
dependencies. The system cannot find
the file specified.":"Infrastructure"}
Also, I'm missing DynamicProxy.dll as I'm using castle and I couldnt see a version of the DynamicProxy in the castle folder that I downloaded from http://sourceforge.net/projects/nhibernate/
any suggestions? I can see LinFu.DynamicProxy.dll within the download although it says I only need one of the folders, Linfu or Castle, and I'm using Castle for this experiment. Not sure if this has anything to do with it, just thought it might help.
any ideas? Many thanks,
James
About "Could not find hibernate.cfg.xml": you can either set it to "Copy to Output" (see this) or configure it as an embedded resource.
About "Could not load assembly Infrastructure": you're missing Infrastructure.dll in your bin, or one of its dependencies, just as the error says.
About missing DynamicProxy.dll: if you're using NHibernate 3.x all you need to use the Castle bytecode provider is NHibernate.ByteCode.Castle.dll and Castle.Core.dll

Resources