ActiveMQ as 32 bit application on a 64bit PC

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ActiveMQ as 32 bit application on a 64bit PC

satramas
I am using ActiveMQ c# client library (Apache.NMS.ActiveMQ.dll) inside a c# application compiled for 32 bit (X86).I am running this client application on a 64bit PC. While trying to establish a connection to ActiveMQ server running as a windows service I am getting the exception as below.

Could not create the IConnectionFactory implementation: Exception has been thrown by the target of an invocation.
   at Apache.NMS.NMSConnectionFactory.CreateConnectionFactory(Uri uriProvider, Object[] constructorParams)
   at Apache.NMS.NMSConnectionFactory..ctor(Uri uriProvider, Object[] constructorParams)


Later I added "nmsprovider-activemq.config" file with contents below.

<configuration>
<provider assembly="Apache.NMS.ActiveMQ.dll"
classFactory="Apache.NMS.ActiveMQ.ConnectionFactory"/>
</configuration>


Now I am getting the exception below.

No IConnectionFactory implementation found for connection URI: activemq:tcp://satheesh-cpg:-1?jms.useAsyncSend=true&wireFormat.MaxInactivityDuration=-1
   at Apache.NMS.NMSConnectionFactory.CreateConnectionFactory(Uri uriProvider, Object[] constructorParams)
   at Apache.NMS.NMSConnectionFactory..ctor(Uri uriProvider, Object[] constructorParams)


I enabled the logging inside "Apache.NMS.ActiveMQ" ,to see the exact message,and I see the below exception.

Exception loading assembly failed: Could not load file or assembly 'C:\\Users\\saaaaa\\Desktop\\XX\\Apache.NMS.ActiveMQ.dll' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

I tried loading the assembly by myself in the same app domain ,and it was successful.
I am not sure,what is missing here.Can someone help me with this?

Thanks
Satheesh
jB
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ as 32 bit application on a 64bit PC

jB
Try removing extension .dll from the config
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ as 32 bit application on a 64bit PC

Romanopoly
This post has NOT been accepted by the mailing list yet.
I think my problem is comparable.
I have a SharePoint 2010 Application and try to use ActiveMQ in it.
But the assembly (dll) Apache.NMS cannot be loaded.
In a normal Windows App there is no problem.
So I think the Apache.NMS reference is not deployed and therefore not found.
Maybe someone knows the answer?

Kind Regards

Roman