activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Supriya Prakash <supriya_praka...@rediffmail.com>
Subject Re: Unable to send a file using BlobMessage via HTTP transport
Date Mon, 04 Feb 2008 10:55:52 GMT

Hi,

I'm facing the same problem. The publisher sends the message but a
NullPointerException is thrown at subscriber's end on the following line : -
InputStream in = bMsg.getInputStream();

On debugging I found that blobUploader attribute of the Blob message
received is null. Whereas this attribute had the entire content and blob
transfer policy when sent by the publisher.

I am using ActiveMQ 5.0. Any pointers or updates??

Thanks,
supriya


Mani.. wrote:
> 
> Hi, 
> 
> I am trying to send a file using BlobMessage over Http. But I am not able
> to read at consumer side [ Code hang here when I am trying to read
> InputStream......]
> Even getting WARN message on broker side everytime when I send a file:
> 
> WARN  ManagedTransportConnection     - Failed to register MBean:
> org.apache.activemq:BrokerName=localhost,Type=Connection,ConnectorName=http,ViewType=address,Name=blockingQueue
> 
> Code at producer side:
> ActiveMQSession mSession = (ActiveMQSession) session;
> InputStream in = new FileInputStream("C:/file.txt");
> BlobMessage message = mSession.createBlobMessage(in);
> producer.send(message);
> 
> Code at consumer side:
> if (message instanceof BlobMessage) {
> try {
>         bMsg = (BlobMessage) message;
> 	InputStream in = bMsg.getInputStream();
>         //Code hang here when I am trying to read InputStream......
> }
> 
> can anybody help in this regard?
> 
> Thanks in advance!
> Manish Gupta
> 

-- 
View this message in context: http://www.nabble.com/Unable-to-send-a-file-using-BlobMessage-via-HTTP-transport-tp14554898s2354p15265747.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message