You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by JanV <ja...@vrxstudios.com> on 2007/01/04 19:37:00 UTC
Re: NMS and 4.1.0 problems
I am having the same problem here using the demo/test code.
// START SNIPPET: demo
IConnectionFactory factory = new ConnectionFactory(new
Uri("tcp://localhost:61616"));
using (IConnection connection = factory.CreateConnection())
{
Console.WriteLine("Created a connection!");
ISession session = connection.CreateSession(); //<---
hangs here.
I tracked it down to the ResponseCorrelator
public override Response Request(Command command)
{
FutureResponse future = AsyncRequest(command); // <-- this
returns a null in the response (probably as per the unmarshalling problem
David mentioned.
Response response = future.Response; // <--
and so this blocks indefinately
I am currently using NMS C# client revision 492630. Windows XP SP2. The same
issue occurs on Release 4.1.0, and the following SNAPSHOTS that I've tried
apache-activemq-4.1-incubator-20070103.004543-24,
apache-activemq-4.2-incubator-20061204.023752-14
The code doesnt really crash, so there is no stack trace for the issue,
however I do have some 'System.NullReferenceException' messages in my
output. Here is how it looks:
'activemq-test.vshost.exe' (Managed): Loaded
'D:\activemq-dotnet\bin\Debug\activemq-test.exe', Symbols loaded.
'activemq-test.vshost.exe' (Managed): Loaded
'D:\activemq-dotnet\bin\Debug\nms.dll', Symbols loaded.
'activemq-test.vshost.exe' (Managed): Loaded
'D:\activemq-dotnet\bin\Debug\activemq.dll', Symbols loaded.
'activemq-test.vshost.exe' (Managed): Loaded
'C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll',
Skipped loading symbols. Module is optimized and the debugger option 'Just
My Code' is enabled.
A first chance exception of type 'System.NullReferenceException' occurred in
activemq.dll
A first chance exception of type 'System.NullReferenceException' occurred in
activemq.dll
A first chance exception of type 'System.NullReferenceException' occurred in
activemq.dll
A first chance exception of type 'System.NullReferenceException' occurred in
activemq.dll
Here is my ActiveMQ broker output:
ACTIVEMQ_HOME: D:\apache-activemq-4.1.0-incubator\bin\..
Loading message broker from: xbean:activemq.xml
INFO BrokerService - ActiveMQ 4.1.0-incubator JMS Message
Broker (localhost) is starting
INFO BrokerService - For help or more information please
see: http://incubator.apache.org/activemq/
INFO ManagementContext - JMX consoles can connect to
service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
INFO JDBCPersistenceAdapter - Database driver recognized:
[apache_derby_embedded_jdbc_driver]
INFO DefaultDatabaseLocker - Attempting to acquire the exclusive
lock to become the Master broker
INFO DefaultDatabaseLocker - Becoming the master on dataSource:
org.apache.derby.jdbc.EmbeddedDataSource@11a5f
d0
INFO TransportServerThreadSupport - Listening for connections at:
tcp://tech2:61616
INFO TransportConnector - Connector openwire Started
INFO BrokerService - ActiveMQ JMS Message Broker
(localhost, ID:tech2-1497-1167935001787-1:0) started
As per David's suggestion 4.0.2 worked. It did produce the following two
messages in the output:
A first chance exception of type 'System.IO.IOException' occurred in
System.dll
A first chance exception of type 'System.NullReferenceException' occurred in
activemq.dll
--
View this message in context: http://www.nabble.com/NMS-and-4.1.0-problems-tf2787347.html#a8164763
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: NMS and 4.1.0 problems
Posted by JanV <ja...@vrxstudios.com>.
Here is some more info. Running TestMain demo code for NMS with added
ConnectionException handler.
--------------------
IConnectionFactory factory = new ConnectionFactory(new
Uri("tcp://localhost:61616"));
using (IConnection connection = factory.CreateConnection())
{
Console.WriteLine("Created a connection!");
connection.ExceptionListener += new
ExceptionListener(connection_ExceptionListener);
ISession session = connection.CreateSession();
---------------------
static void connection_ExceptionListener(Exception exception)
{
Console.WriteLine("Exception Message: " + exception.Message);
Console.WriteLine("Exception Stack: " + exception.StackTrace);
}
--------------------------------
Running AMQ Broker 4.0.2. Following two exceptions seem to alternate in no
particular order. (This version runs the full course and exits).
About to connect to ActiveMQ
Created a connection!
Using destination: FOO.BAR
Received message with ID: 61ebf54e-f07c-4598-b8e9-18bb629ba45d:1:1:1
Received message with text: Hello World!
Exception Message: Unable to read beyond the end of the stream.
Exception Stack: at System.IO.__Error.EndOfFile()
at System.IO.BinaryReader.FillBuffer(Int32 numBytes)
at System.IO.BinaryReader.ReadInt32()
at ActiveMQ.OpenWire.OpenWireBinaryReader.ReadInt32() in
D:\activemq-dotnet\s
rc\main\csharp\ActiveMQ\OpenWire\OpenWireBinaryReader.cs:line 132
at ActiveMQ.OpenWire.OpenWireFormat.Unmarshal(BinaryReader dis) in
D:\activem
q-dotnet\src\main\csharp\ActiveMQ\OpenWire\OpenWireFormat.cs:line 157
at ActiveMQ.Transport.Tcp.TcpTransport.ReadLoop() in
D:\activemq-dotnet\src\m
ain\csharp\ActiveMQ\Transport\Tcp\TcpTransport.cs:line 131
About to connect to ActiveMQ
Created a connection!
Using destination: FOO.BAR
Received message with ID: 414aea76-0b1f-43a1-b078-bab35937c475:1:1:1
Received message with text: Hello World!
Exception Message: Object reference not set to an instance of an object.
Exception Stack: at
ActiveMQ.Transport.WireFormatNegotiator.OnCommand(ITransp
ort sender, Command command) in
D:\activemq-dotnet\src\main\csharp\ActiveMQ\Tran
sport\WireFormatNegotiator.cs:line 75
at ActiveMQ.Transport.Tcp.TcpTransport.ReadLoop() in
D:\activemq-dotnet\src\m
ain\csharp\ActiveMQ\Transport\Tcp\TcpTransport.cs:line 146
Now the latest release. Running AMQ Broker 4.1.0 and the TestMain demo code
for NMS. (This version hangs at the ISession session =
connection.CreateSession() statement in TestMain).
About to connect to ActiveMQ
Created a connection!
Exception Message: Object reference not set to an instance of an object.
Exception Stack: at
ActiveMQ.Transport.WireFormatNegotiator.OnCommand(ITransp
ort sender, Command command) in
D:\activemq-dotnet\src\main\csharp\ActiveMQ\Tran
sport\WireFormatNegotiator.cs:line 75
at ActiveMQ.Transport.Tcp.TcpTransport.ReadLoop() in
D:\activemq-dotnet\src\m
ain\csharp\ActiveMQ\Transport\Tcp\TcpTransport.cs:line 146
Exception Message: Object reference not set to an instance of an object.
Exception Stack: at
ActiveMQ.Transport.WireFormatNegotiator.OnCommand(ITransp
ort sender, Command command) in
D:\activemq-dotnet\src\main\csharp\ActiveMQ\Tran
sport\WireFormatNegotiator.cs:line 75
at ActiveMQ.Transport.Tcp.TcpTransport.ReadLoop() in
D:\activemq-dotnet\src\m
ain\csharp\ActiveMQ\Transport\Tcp\TcpTransport.cs:line 146
Exception Message: Object reference not set to an instance of an object.
Exception Stack: at
ActiveMQ.Transport.WireFormatNegotiator.OnCommand(ITransp
ort sender, Command command) in
D:\activemq-dotnet\src\main\csharp\ActiveMQ\Tran
sport\WireFormatNegotiator.cs:line 75
at ActiveMQ.Transport.Tcp.TcpTransport.ReadLoop() in
D:\activemq-dotnet\src\m
ain\csharp\ActiveMQ\Transport\Tcp\TcpTransport.cs:line 146
Exception Message: Object reference not set to an instance of an object.
Exception Stack: at
ActiveMQ.Transport.WireFormatNegotiator.OnCommand(ITransp
ort sender, Command command) in
D:\activemq-dotnet\src\main\csharp\ActiveMQ\Tran
sport\WireFormatNegotiator.cs:line 75
at ActiveMQ.Transport.Tcp.TcpTransport.ReadLoop() in
D:\activemq-dotnet\src\m
ain\csharp\ActiveMQ\Transport\Tcp\TcpTransport.cs:line 146
--
View this message in context: http://www.nabble.com/NMS-and-4.1.0-problems-tf2787347.html#a8165515
Sent from the ActiveMQ - User mailing list archive at Nabble.com.