ActiveMQ and C#.NET (again)

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

ActiveMQ and C#.NET (again)

PHW
All,

I am testing ActiveMQ for use in a mixed Java and C# environment. I have been able (with help) to send messages using a Java producer and a C# consumer using the Openwire dotNet client.

Unfortunately after a while the C# consumer breaks down with

ERROR: Transport Exception: System.IO.IOException: Unknown data type: 51
   at ActiveMQ.OpenWire.OpenWireFormat.LooseUnmarshalNestedObject(BinaryReader d
is) in C:\Documents and Settings\peter.walls\My Documents\activemq-dotnet\src\ma
in\csharp\ActiveMQ\OpenWire\OpenWireFormat.cs:line 267

(complete error given below)

I am using the latest checkout of the dotNet client, compiled is VS2005 and incubator-activemq dated 5/4/06. They are running on (different) W2K machines. I have tried durable and non-durable messages and I am using asynchronous message receipt.

Has anyone else seen these problems? Is there a HOW-TO on the dotNet client that I have missed?

Thanks,
Peter

---
Full error

ERROR: Transport Exception: System.IO.IOException: Unknown data type: 51
   at ActiveMQ.OpenWire.OpenWireFormat.LooseUnmarshalNestedObject(BinaryReader d
is) in C:\Documents and Settings\peter.walls\My Documents\activemq-dotnet\src\ma
in\csharp\ActiveMQ\OpenWire\OpenWireFormat.cs:line 267
   at ActiveMQ.OpenWire.BaseDataStreamMarshaller.LooseUnmarshalCachedObject(Open
WireFormat wireFormat, BinaryReader dataIn) in C:\Documents and Settings\peter.w
alls\My Documents\activemq-dotnet\src\main\csharp\ActiveMQ\OpenWire\BaseDataStre
amMarshaller.cs:line 521
   at ActiveMQ.OpenWire.V1.MessageMarshaller.LooseUnmarshal(OpenWireFormat wireF
ormat, Object o, BinaryReader dataIn) in C:\Documents and Settings\peter.walls\M
y Documents\activemq-dotnet\src\main\csharp\ActiveMQ\OpenWire\V1\MessageMarshall
er.cs:line 172
   at ActiveMQ.OpenWire.V1.ActiveMQMessageMarshaller.LooseUnmarshal(OpenWireForm
at wireFormat, Object o, BinaryReader dataIn) in C:\Documents and Settings\peter
.walls\My Documents\activemq-dotnet\src\main\csharp\ActiveMQ\OpenWire\V1\ActiveM
QMessageMarshaller.cs:line 97
   at ActiveMQ.OpenWire.V1.ActiveMQTextMessageMarshaller.LooseUnmarshal(OpenWire
Format wireFormat, Object o, BinaryReader dataIn) in C:\Documents and Settings\p
eter.walls\My Documents\activemq-dotnet\src\main\csharp\ActiveMQ\OpenWire\V1\Act
iveMQTextMessageMarshaller.cs:line 84
   at ActiveMQ.OpenWire.OpenWireFormat.LooseUnmarshalNestedObject(BinaryReader d
is) in C:\Documents and Settings\peter.walls\My Documents\activemq-dotnet\src\ma
in\csharp\ActiveMQ\OpenWire\OpenWireFormat.cs:line 269
   at ActiveMQ.OpenWire.BaseDataStreamMarshaller.LooseUnmarshalNestedObject(Open
WireFormat wireFormat, BinaryReader dataIn) in C:\Documents and Settings\peter.w
alls\My Documents\activemq-dotnet\src\main\csharp\ActiveMQ\OpenWire\BaseDataStre
amMarshaller.cs:line 491
   at ActiveMQ.OpenWire.V1.MessageDispatchMarshaller.LooseUnmarshal(OpenWireForm
at wireFormat, Object o, BinaryReader dataIn) in C:\Documents and Settings\peter
.walls\My Documents\activemq-dotnet\src\main\csharp\ActiveMQ\OpenWire\V1\Message
DispatchMarshaller.cs:line 104
   at ActiveMQ.OpenWire.OpenWireFormat.Unmarshal(BinaryReader dis) in C:\Documen
ts and Settings\peter.walls\My Documents\activemq-dotnet\src\main\csharp\ActiveM
Q\OpenWire\OpenWireFormat.cs:line 145
   at ActiveMQ.Transport.Tcp.TcpTransport.ReadLoop() in C:\Documents and Setting
s\peter.walls\My Documents\activemq-dotnet\src\main\csharp\ActiveMQ\Transport\Tc
p\TcpTransport.cs:line 117
Reply | Threaded
Open this post in threaded view
|

NullPointerException in InactivityMonitor?

akallio
I'm moving to 4.0-RC2, but keep getting these when my broker is running.
I guess the InactivityMonitor is to blame, as they happen periodically
and during inactivity. There are no connections made to the broker. A
bug, or an issue with my setup?


INFO  Service                        - Async error occurred:
java.lang.NullPointerException
java.lang.NullPointerException
         at
org.apache.activemq.command.PartialCommand.toString(PartialCommand.java:133)
         at java.lang.String.valueOf(String.java:2577)
         at java.lang.StringBuffer.append(StringBuffer.java:220)
         at
org.apache.activemq.command.PartialCommand.visit(PartialCommand.java:86)
         at
org.apache.activemq.broker.AbstractConnection.service(AbstractConnection.java:196)
         at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:62)
         at
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:88)
         at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:70)
         at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:114)
         at
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:122)
         at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:87)
         at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:139)
         at java.lang.Thread.run(Thread.java:595)


My broker config is very simple:

<beans xmlns="http://activemq.org/config/1.0">

   <broker useJmx="false">

     <transportConnectors>
       <transportConnector name="ssl"  uri="ssl://ocicat.csc.fi:61616" />
     </transportConnectors>

   </broker>

</beans>


Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException in InactivityMonitor?

James Strachan-2
I've just patched the NullPointerException to avoid this happening;
though I don't understand why your connection was receiving a
PartialCommand; these are only used with udp and multicast transports
- which you shouldn't be using from your configuration.

I wonder do you have different jars on your client and broker?

James

On 5/5/06, Aleksi Kallio <[hidden email]> wrote:

> I'm moving to 4.0-RC2, but keep getting these when my broker is running.
> I guess the InactivityMonitor is to blame, as they happen periodically
> and during inactivity. There are no connections made to the broker. A
> bug, or an issue with my setup?
>
>
> INFO  Service                        - Async error occurred:
> java.lang.NullPointerException
> java.lang.size
>          at
> org.apache.activemq.command.PartialCommand.toString(PartialCommand.java:133)
>          at java.lang.String.valueOf(String.java:2577)
>          at java.lang.StringBuffer.append(StringBuffer.java:220)
>          at
> org.apache.activemq.command.PartialCommand.visit(PartialCommand.java:86)
>          at
> org.apache.activemq.broker.AbstractConnection.service(AbstractConnection.java:196)
>          at
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:62)
>          at
> org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:88)
>          at
> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:70)
>          at
> org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:114)
>          at
> org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:122)
>          at
> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:87)
>          at
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:139)
>          at java.lang.Thread.run(Thread.java:595)
>
>
> My broker config is very simple:
>
> <beans xmlns="http://activemq.org/config/1.0">
>
>    <broker useJmx="false">
>
>      <transportConnectors>
>        <transportConnector name="ssl"  uri="ssl://ocicat.csc.fi:61616" />
>      </transportConnectors>
>
>    </broker>
>
> </beans>
>
>
>


--

James
-------
http://radio.weblogs.com/0112098/