activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Birdsall <david.birds...@mxdata.co.uk>
Subject NMS and 4.1.0 problems
Date Sat, 09 Dec 2006 21:44:17 GMT

Hi there,

I checked out the ActiveMQ-dotnet trunk from:

https://svn.apache.org/repos/asf/incubator/activemq/activemq-dotnet/trunk

Revision 484893 jlim
Last commit revision 477581

And have been having problems with the NMS client and ActiveMQ release
4.1.0.

I can get a connection, but when I try and do anything with it, the code
throws a Null reference exception. I based my code on the example given on
the NMS webpage on the ActiveMQ website:

IConnectionFactory factory = new ConnectionFactory(new
Uri("tcp://serendipity:61616"));
using (IConnection connection = factory.CreateConnection())
{
  connection.ExceptionListener += new
ExceptionListener(connection_ExceptionListener);
  ISession session = connection.CreateSession();
}
...

I've configured everything up as follows:

    <transportConnectors>
       <transportConnector name="openwire" uri="tcp://serendipity:61616"/>
       <transportConnector name="stomp"    uri="stomp://serendipity:61613"/>
    </transportConnectors>

The example java consumer and producers work fine, so I am guessing there's
some problem with the C# code, unless I am doing something wrong?

I've tried changing the url from "serendipity" to "localhost" in both client
and configuration, but the problem still remains.

There seems to be a problem in TcpTransport.ReadLoop caused by a NULL_TYPE
being read inside OpenWireFormat.Unmarshal, because the first two commands
(dataTypes = 1, 2) are unmarshalled:

{WireFormatInfo[ Magic=System.Byte[] Version=2
MarshalledProperties={StackTraceEnabled=True, MaxInactivityDuration=30000,
CacheSize=1024, TcpNoDelayEnabled=True, TightEncodingEnabled=True,
SizePrefixDisabled=False, CacheEnabled=True} ]}
{BrokerInfo[ BrokerId=BrokerId[ Value=ID:serendipity-1439-1165697313562-1:0
] BrokerURL=tcp://serendipity:61616
PeerBrokerInfos=ActiveMQ.Commands.BrokerInfo[] BrokerName=localhost
SlaveBroker=False MasterBroker=False FaultTolerantConfiguration=False
DuplexConnection=False NetworkConnection=False ]}

But on the 3rd iteration, it reads a NULL_TYPE and then throws with a null
Command.

I did notice the "NetworkConnection=False" in the second command - am I
doing something wrong with my configuration? And if so, how come the example
java consumer and producers work okay with my installation.

The java examples both work when ActiveMQ is run as a Windows service and
from the batch file.

Another slight problem I had - the Service Wrapper "wrapper.jar" wasn't
included in the 4.1.0 binary distribution I downloaded, so I had to download
it separately from TanukiSoftware's website.

Many thanks for your time and help, I'm looking forward to using ActiveMQ
once I can get NMS working :-)

David Birdsall
Software Engineer
mxData Ltd
david.birdsall@mxdata.co.uk
-- 
View this message in context: http://www.nabble.com/NMS-and-4.1.0-problems-tf2787347.html#a7776760
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message