You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Denis Abramov (JIRA)" <ji...@apache.org> on 2007/02/05 15:06:04 UTC
[jira] Commented: (AMQ-1145) C# Client CRASHES when trying to do
Connection.Start()
[ https://issues.apache.org/activemq/browse/AMQ-1145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38471 ]
Denis Abramov commented on AMQ-1145:
------------------------------------
This seems to exhibit the problem in the same line of code as AMQ-1131. Seems like the same issue but through a different method.
> C# Client CRASHES when trying to do Connection.Start()
> ------------------------------------------------------
>
> Key: AMQ-1145
> URL: https://issues.apache.org/activemq/browse/AMQ-1145
> Project: ActiveMQ
> Issue Type: Bug
> Components: NMS (C# client)
> Affects Versions: 4.1.0
> Environment: NMS C# revision 501459
> ACTIVEMQ v. 4.1.0
> Reporter: Denis Abramov
> Priority: Blocker
>
> A few days ago I checked out the latest C#/.NET code using svn as per the instructions on the website. Revision: "Checked out revision 501459". I built the code without any problems but am now trying to run it in VS2005. From the debugger it looks like the error occurs when I call _connection.Start() Here is my code:
> private IConnection _connection;
> private string JMS_URL = "tcp://localhost:61616";
> public MessageManager() {
> IConnectionFactory connectionFactory = new ConnectionFactory(new Uri(JMS_URL));
> _connection = connectionFactory.CreateConnection();
> _connection.ExceptionListener += new ExceptionListener(_connection_ExceptionListener);
> _connection.Start();
> }
> void _connection_ExceptionListener(Exception exception)
> {
> Console.WriteLine("Received Exception from JMS: " + exception);
> }
>
> In the console window I get:
> Received Exception from JMS: System.NullReferenceException: Object reference not
> set to an instance of an object.
> at ActiveMQ.Transport.WireFormatNegotiator.OnCommand(ITransport sender, Comma
> nd command)
> at ActiveMQ.Transport.Tcp.TcpTransport.ReadLoop()
> Received Exception from JMS: System.NullReferenceException: Object reference not
> set to an instance of an object.
> at ActiveMQ.Transport.WireFormatNegotiator.OnCommand(ITransport sender, Comma
> nd command)
> at ActiveMQ.Transport.Tcp.TcpTransport.ReadLoop()
> Received Exception from JMS: System.NullReferenceException: Object reference not
> set to an instance of an object.
> at ActiveMQ.Transport.WireFormatNegotiator.OnCommand(ITransport sender, Comma
> nd command)
> at ActiveMQ.Transport.Tcp.TcpTransport.ReadLoop()
> Received Exception from JMS: System.NullReferenceException: Object reference not
> set to an instance of an object.
> at ActiveMQ.Transport.WireFormatNegotiator.OnCommand(ITransport sender, Comma
> nd command)
> at ActiveMQ.Transport.Tcp.TcpTransport.ReadLoop()
> More concrete error after debugging using ActiveMQ source code:
> -------------------------------------------------------------------------------------------
> in ActiveMQ.Transport.WireFormatNegotiator the "command" argument is sometimes "Null" -- not sure why it happens or how to fix it (protecting it doesn't help but hangs the whole system)
> protected override void OnCommand(ITransport sender, Command command)
> {
> if ( command.GetDataStructureType() == WireFormatInfo.ID_WireFormatInfo )
> ...
> }
> Complete error message:
> System.NullReferenceException: Object reference not set to an instance of an object.
> at ActiveMQ.Transport.WireFormatNegotiator.OnCommand(ITransport sender, Command command) in D:\activemq-dotnet\activemq-dotnet\src\main\csharp\ActiveMQ\Transport\WireFormatNegotiator.cs:line 75
> at ActiveMQ.Transport.Tcp.TcpTransport.ReadLoop() in D:\activemq-dotnet\activemq-dotnet\src\main\csharp\ActiveMQ\Transport\Tcp\TcpTransport.cs:line 146
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.