Hi,

In the java code, when I catch error, I have the code: e.printStackTrace();
That is all error messages I have on the screen. Do you have any idea ?

I appreciate your help.

Thanks



James.Strachan wrote:
> 
> On 6/23/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> I still have problem. I appreciate your help.
>>
>> Here is the code that I use to send large file (it's part of the file
>> ConsumerTool.java, it send out file after receiving message from
>> RequestTool.java
>>
>> //////////begin/////////////
>>
>> if (message.getJMSReplyTo() != null) {
>>         activeMQSession = (ActiveMQSession)session;
>>         message1 = activeMQSession.createBlobMessage(new
>> File("/tmp/0/testFile.exe"));
>>         replyProducer.send(message1);
>>         message1.acknowledge();
>>       }
> 
> FWIW you only acknowledge messages you consume.
> 
> 
>> /////////end////////////////
>>
>>
>> Here is the code that I use to receive large file (it's part of the file
>> RequestTool.java)
>>
>> ////////////begin////////////
>>
>> message1 = consumer.receive();
>>     if (message1 instanceof BlobMessage) {
>>       blobMessage = (BlobMessage) message1;
>>       in = blobMessage.getInputStream();
>>       fout = new FileOutputStream("/tmp/testFile.exe");
>>       while((i = in.read(fileData)) != -1) {
>>         fout.write(fileData, 0, i);
>>       }
>>       fout.close();
>>     } else {
>>       System.out.println("Wrong, please send file: ");
>>     }
>>
>> ////////////end/////////////
>>
>>
>> This is the error that I receive on the side that receive large file
>> (RequestTool.java)
>>
>> /////////////////////begin////////////////
>>
>> Error occur: [Ljava.lang.StackTraceElement;@187814
> 
> No other stack trace?
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-send-file-using-ActiveMQ-tf3960326s2354.html#a11288110
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to