activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oskareto <oskar...@hotmail.com>
Subject Re: BadImageFormatException with Apache.NMS.ActiveMQ‏
Date Thu, 21 Jan 2010 16:58:27 GMT

Ok, i've changed this code line, but the result is the same. I'll be continue
trying.

Thanks for your help Tim!!



Timothy Bish wrote:
> 
> On Thu, 2010-01-21 at 08:38 -0800, oskareto wrote:
>> Nothing. I've changed the selector to null, and when I send the message,
>> i'm
>> sure that the subscriptor is already registreres. I don't know what's
>> happends! OnMessage event is never thrown...
>> 
>> 
> 
> Not sure what could be going wrong without running the code, will try to
> get to that later today.  One thing I did notice is that you should be
> creating destinations using the session object and not like this
> 
> this.topic = new ActiveMQTopic(topicName);
> 
> instead do this:
> 
> this.topic = session.GetTopic(topicName);
> 
> This will ensure that the NMS provider can properly initialize the
> Destination object.
> 
> Regards
> Tim.
> 
>> 
>> Timothy Bish wrote:
>> > 
>> > On Thu, 2010-01-21 at 08:17 -0800, oskareto wrote:
>> >> I have upload my code files.
>> >> 
>> >> I have to connect to a topic that is already working, this is the
>> reason
>> >> for
>> >> trying with the topics and not with a queue.
>> >> 
>> >> Thanks!!
>> > 
>> > You might want to set the selector to null for now in order to ensure
>> > you are getting messages.  Also note that for a durable subscriber you
>> > must have had a subscription registered previously in order to get any
>> > messages published on the topic while your subscriber was down.  
>> > 
>> > Regards
>> > Tim.
>> > 
>> >> 
>> >> 
>> >> 
>> >> Timothy Bish wrote:
>> >> > 
>> >> > On Thu, 2010-01-21 at 03:25 -0800, oskareto wrote:
>> >> >> Yes, my code makes: connection.Start(); . The code i have deployed
>> is
>> >> >>
>> >>
>> http://remark.wordpress.com/articles/publish-subscribe-with-activemq-and-nms/
>> >> >> . This is giving me a headache!!!
>> >> >> 
>> >> > 
>> >> > Any chance you can post your own version of the code?  
>> >> > Have you tried creating producer and consumer instances that use a
>> >> > Queue?
>> >> > 
>> >> > Regards
>> >> > Tim.
>> >> > 
>> >> >> 
>> >> >> Timothy Bish wrote:
>> >> >> > 
>> >> >> > On Thu, 2010-01-21 at 02:57 -0800, oskareto wrote:
>> >> >> >> I don't know very well what's happend. The
>> BadImageFormatException
>> >> is
>> >> >> >> thrown
>> >> >> >> when I execute  the application debugging from Visual
Studio. If
>> I
>> >> >> >> execute
>> >> >> >> it from the .exe of the bin folder, it works perfectly.
But
>> there's
>> >> >> >> another
>> >> >> >> problem: with the same code I said you (producer and subscriber
>> in
>> >> the
>> >> >> >> same
>> >> >> >> form), the producer works perfectly (I can see in the
ActiveMQ
>> web
>> >> >> panel
>> >> >> >> that the message is sent), but I don't receive anything.
I tried
>> >> with
>> >> >> >> durable and non-durable consumer, but it has no effect:
I DON'T
>> >> >> RECEIVE
>> >> >> >> ANYTHING!! Can you help me please?
>> >> >> > 
>> >> >> > I'd recommend checking you consumer's connection object to
ensure
>> >> you
>> >> >> > called start on it, that's the most common cause of not receiving
>> >> any
>> >> >> > messages from a consumer.
>> >> >> > 
>> >> >> > The BadImageFormatException is likely the result of having
the
>> wrong
>> >> >> > versions of the Apache.NMS and Apache.NMS.ActiveMQ dlls in
you
>> path.
>> >> >> > 
>> >> >> > regards
>> >> >> > Tim.
>> >> >> > 
>> >> >> >> 
>> >> >> >> Thanks a lot.
>> >> >> >> 
>> >> >> >> 
>> >> >> >> Timothy Bish wrote:
>> >> >> >> > 
>> >> >> >> > On Thu, 2010-01-14 at 07:48 -0800, oskareto wrote:
>> >> >> >> >> 
>> >> >> >> >> 
>> >> >> >> >> Timothy Bish wrote:
>> >> >> >> >> > 
>> >> >> >> >> > On Thu, 2010-01-14 at 04:28 -0800, oskareto
wrote:
>> >> >> >> >> >> Hello! First, sorry for my English.
>> >> >> >> >> >>  
>> >> >> >> >> >> I'm deploying this example application
>> >> >> >> >> >>
>> >> >> >> >>
>> >> >> >>
>> >> >>
>> >>
>> http://remark.wordpress.com/articles/publish-subscribe-with-activemq-and-nms/
>> >> >> >> >> >> . When I've created all the project
and i've downloaded
>> the
>> >> >> >> requiered
>> >> >> >> >> >> dll's
>> >> >> >> >> >> (Apache.NMS 1.2.0 and Apache.NMS.ActiveMQ),
and I execute
>> the
>> >> >> >> >> >> application,
>> >> >> >> >> >> the VS2008 throws an exception: "No
se puede cargar el
>> >> archivo o
>> >> >> >> >> >> ensamblado
>> >> >> >> >> >> 'Apache.NMS.ActiveMQ, Version=1.2.0.1823,
Culture=neutral,
>> >> >> >> >> >> PublicKeyToken=82756feee3957618' ni
una de sus
>> dependencias.
>> >> Se
>> >> >> >> >> esperaba
>> >> >> >> >> >> que
>> >> >> >> >> >> el módulo tuviera un manifiesto de
ensamblado.". I don`t
>> know
>> >> >> >> what's
>> >> >> >> >> >> happends. I've seen that if I comment
the code of
>> creatting a
>> >> >> >> >> conection,
>> >> >> >> >> >> the
>> >> >> >> >> >> problem dissapears, but obviously the
application don't
>> >> works. 
>> >> >> >> >> >>  
>> >> >> >> >> >> Can any one help me please? I don't
know if the problem is
>> in
>> >> >> >> config
>> >> >> >> >> file
>> >> >> >> >> >> or
>> >> >> >> >> >> where (I've read that in version 1.2.0
the config files
>> are
>> >> not
>> >> >> >> >> >> necessary).
>> >> >> >> >> >>  
>> >> >> >> >> >> Thank you very much!
>> >> >> >> >> > 
>> >> >> >> >> > I would ensure that you have the correct
versions of the
>> DLL
>> >> >> files,
>> >> >> >> the
>> >> >> >> >> > latest Release candidates are here:
>> >> >> >> >> > http://people.apache.org/~tabish/nms-1.2.0-RC2/
>> >> >> >> >> > 
>> >> >> >> >> > You don't need configuration files, just
place both DLL
>> files
>> >> in
>> >> >> the
>> >> >> >> >> > same location and add references to them
to you project.
>> >> >> >> >> > 
>> >> >> >> >> > Regards
>> >> >> >> >> > Tim.
>> >> >> >> >> > 
>> >> >> >> >> > -- 
>> >> >> >> >> > Tim Bish
>> >> >> >> >> > http://fusesource.com
>> >> >> >> >> > http://timbish.blogspot.com/
>> >> >> >> >> > 
>> >> >> >> >> > 
>> >> >> >> >> 
>> >> >> >> >> Thanks Tim.
>> >> >> >> >> 
>> >> >> >> >> The two DLL I've downloaded are of this page
(version
>> >> 1.2.0.1823)
>> >> >> with
>> >> >> >> >> the
>> >> >> >> >> .NET Framework 3.5. I'm sure too that the DLLs
are the
>> correct
>> >> for
>> >> >> >> this
>> >> >> >> >> framework version. I don't know where is the
problem....
>> >> >> >> >> 
>> >> >> >> > 
>> >> >> >> > This error is due to the various builds that are
out there
>> right
>> >> now
>> >> >> >> and
>> >> >> >> > the version referenced in the NMS.ActiveMQ DLL doesn't
match
>> the
>> >> >> >> version
>> >> >> >> > of the Apache.NMS.Dll you are using.  You can use
an
>> app-config
>> >> file
>> >> >> to
>> >> >> >> > redirect things or just download the release version
of
>> >> Apache.NMS
>> >> >> from
>> >> >> >> > the NMS website and then get the latest release candidate
of
>> >> >> >> > Apache.NMS.ActiveMQ here:
>> >> >> >> > 
>> >> >> >> > http://people.apache.org/~tabish/nms.activemq-1.2.0/
>> >> >> >> > 
>> >> >> >> > Regards
>> >> >> >> > Tim.
>> >> >> >> > 
>> >> >> >> > 
>> >> >> >> > 
>> >> >> >> > 
>> >> >> >> 
>> >> >> > 
>> >> >> > -- 
>> >> >> > Tim Bish
>> >> >> > http://fusesource.com
>> >> >> > http://timbish.blogspot.com/
>> >> >> > 
>> >> >> > 
>> >> >> > 
>> >> >> > 
>> >> >> > 
>> >> >> 
>> >> >> -- 
>> >> >> View this message in context:
>> >> >>
>> >>
>> http://old.nabble.com/BadImageFormatException-with-Apache.NMS.ActiveMQ%E2%80%8F-tp27160515p27256296.html
>> >> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>> >> >> 
>> >> > 
>> >> > -- 
>> >> > Tim Bish
>> >> > http://fusesource.com
>> >> > http://timbish.blogspot.com/
>> >> > 
>> >> > 
>> >> > 
>> >> > 
>> >> > 
>> >> http://old.nabble.com/file/p27260350/TopicConnection.cs
>> >> TopicConnection.cs 
>> >> http://old.nabble.com/file/p27260350/TopicConnectionFactory.cs
>> >> TopicConnectionFactory.cs 
>> >> http://old.nabble.com/file/p27260350/TopicPublisher.cs
>> TopicPublisher.cs 
>> >> http://old.nabble.com/file/p27260350/TopicSubscriber.cs
>> >> TopicSubscriber.cs 
>> >> http://old.nabble.com/file/p27260350/MensajeriaPanelControl.cs
>> >> MensajeriaPanelControl.cs 
>> > 
>> > -- 
>> > Tim Bish
>> > http://fusesource.com
>> > http://timbish.blogspot.com/
>> > 
>> > 
>> > 
>> > 
>> > 
>> 
> 
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/BadImageFormatException-with-Apache.NMS.ActiveMQ%E2%80%8F-tp27160515p27261031.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message