ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Java Plugin Input Node not working properly

Post new topic  Reply to topic
 Java Plugin Input Node not working properly « View previous topic :: View next topic » 
Author Message
suneelsh
PostPosted: Wed Apr 24, 2002 6:54 am    Post subject: Reply with quote

Acolyte

Joined: 13 Apr 2002
Posts: 69
Location: Pune,India

Hi all i have plugin node written by me that reads messages in a queue and puts to an outQ. but when i deploy it my page file goes up till the max size and i get an error in the event log every second saying that the maximum no of channels have beem reached.

I return a time out if my msg from queue is null and sucess_continue if i get a msg from q. I can seem to target the errror. any solutions??

[ This Message was edited by: suneelsh on 2002-04-24 07:56 ]
Back to top
View user's profile Send private message Send e-mail
dnaren
PostPosted: Wed Apr 24, 2002 6:12 pm    Post subject: Reply with quote

Apprentice

Joined: 10 Aug 2001
Posts: 45
Location: Charlotte, NC

Are you reading the message from an external queue? Or do you mean the queue associated with the input node?

What platform are you on?

What programming language are you using?

Do the queues you are referring to belong to the same queue manager of the broker?

I have written a plug-in node that extracts the data from the incoming message, posts a message to an external queue (belonging to the same queue manager of the broker) and reads the response from a different queue and propagates the message through the out terminal. It works fine. I used Java API.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
chuanchen
PostPosted: Wed Apr 24, 2002 6:58 pm    Post subject: Reply with quote

Novice

Joined: 11 Jul 2001
Posts: 11

Has anyone got Support Pac IA76 working with W2K?
I have seen that Right-click for property in message flow,nothing
display.Is this support pac only imply for Win NT?

Thansk!

Chuan
Back to top
View user's profile Send private message
suneelsh
PostPosted: Thu Apr 25, 2002 10:00 pm    Post subject: Reply with quote

Acolyte

Joined: 13 Apr 2002
Posts: 69
Location: Pune,India

I am using a java plugin. I fixed the page file problem. By connecting the qmgr and disc from the run method. I want to put the msg in INQ and get it from OUTQ in the same qmgr.

now it is not writing to the OUTQ..although i get the bytes and print it to a file and see the data i put in the INQ is correct. the error i get in the event log is:


( MQSIV2.Run ) Output message is empty; output node 'JavaInputNode_EX.OUTQ'.

The MQSeries output node 'JavaInputNode_EX.OUTQ' has received a message to write to an MQSeries output queue,
but the message appears to be empty.
This error may be generated when

1) there is no MQMD and no message content
in the output bitstream (there really is no data) or

2) there is no MQMD and the size of the message content is less
that the size of the MQMD (it appears there is no content). This situation can occur when a output message is built
incorrectly using the Compute node.

Check the message flow to determine whether the message is being built correctly. If not, correct the problem and
redeploy the broker.

dnarren can u pls give me ur source code or can i send u mine??
Back to top
View user's profile Send private message Send e-mail
suneelsh
PostPosted: Thu Apr 25, 2002 10:11 pm    Post subject: Reply with quote

Acolyte

Joined: 13 Apr 2002
Posts: 69
Location: Pune,India

I am using MQ api to get message and out.propogate to propogate the msg.
Back to top
View user's profile Send private message Send e-mail
Coz
PostPosted: Thu Apr 25, 2002 11:42 pm    Post subject: Reply with quote

Apprentice

Joined: 20 Feb 2002
Posts: 44
Location: Basel CH

What message are you trying to propogate? I have tried this and can find no way to map am MQMessage (which is read off the queue) to an MbAssembly which is the message that the broker uses. If you are copying the data from the MQ message into a MbAssembly created in the node then be aware that the MbAssembly created will not have an MQMD. YOu either need to add the MQMD tree within the Node or use a compute node after the plugin to add the MQMD. (I am assuming that you are propogating to the out which is attached to an MQOutput node).
Back to top
View user's profile Send private message
suneelsh
PostPosted: Fri Apr 26, 2002 5:41 am    Post subject: Reply with quote

Acolyte

Joined: 13 Apr 2002
Posts: 69
Location: Pune,India

i cant put a compute node after my plugin node as it dosent get out of my plugin node. So now i have to add the MQMD in the plugin node. Now the question is how do i put an MQMD in the plugin node. I have tried going thru that sick API and i cant find any. can anyone enlightnen me on this???
Back to top
View user's profile Send private message Send e-mail
dnaren
PostPosted: Fri Apr 26, 2002 8:43 pm    Post subject: Reply with quote

Apprentice

Joined: 10 Aug 2001
Posts: 45
Location: Charlotte, NC

I am curious, why are you developing an 'input' plug-in node to read the message from the queue? I assume you are developing an 'input' plug-in node since mentioned 'run' method.

I developed a message 'processing' node and implemented 'evaluate' method.

The incoming message is of type BLOB. It is actually XML, but since the JAVA API to parse an XML message and to build an XML message inside a processing node is soooooooooo inadequate, I avoid using it. Hey, it's DOM based stupid API. I am treating the incoming message as a BLOB and getting the Message Body out of it using:
Code:

MbElement rootElement = newAssembly.getMessage().getRootElement();
MbElement msgElement = rootElement.getFirstElementByPath("/BLOB/BLOB");

String Message = new String((byte [])msgElement.getValue());


Note: newAssembly is a copy of the incoming message assembly.

After processing the string, I am posting it to a queue and getting the response from a different queue. I make an outgoing message and propagate using:
Code:

//responseMessage string holds the response read from the queue
byte[] blob = responseMessage.getBytes();
msgElement.setValue(blob);
MbOutputTerminal out = getOutputTerminal("out");
out.propagate(newAssembly);


This way I retain all the headers as they are with the incoming message. If you wish to read/change the MQMD headers, get the appropriate syntax element from the incoming message and process it. For example,

MbElement rootElement = newAssembly.getMessage().getRootElement();
MbElement mmqmdElement = rootElement.getFirstElementByPath("/MQMD");

There are child elements under MQMD folder which you need to process. Use the MbElement object methods to investigate the type, name, value of those child elements.

Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
suneelsh
PostPosted: Fri Apr 26, 2002 9:37 pm    Post subject: Reply with quote

Acolyte

Joined: 13 Apr 2002
Posts: 69
Location: Pune,India

why i need a ip node is because of the project requirement. we need to monitor several queues and get the data from there and send it to a unified message flow...instead of multiple message flows on each queue. So once i get the ip message from the queues this i/p node will send it to the msg flow.

Now since i am using MQ-api to get the message I loose the MQMD headers. Now i need to find some way to construct the MQMD header
Back to top
View user's profile Send private message Send e-mail
Coz
PostPosted: Sun Apr 28, 2002 10:11 pm    Post subject: Reply with quote

Apprentice

Joined: 20 Feb 2002
Posts: 44
Location: Basel CH

I assume that I am right then that you have the Output node directly after your Plugin node.
There is absolutely no problem in slipping a compute node in between the two to add an MQMD. (We do it for a File To Queue plugin node). The compute node will happily accept a MbAssembly which does not contain the MQMD. Only the Output node cares because it is effectivly a MQSeries PUT application and so must see the MQMD and it is this node that is generating your error.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Java Plugin Input Node not working properly
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.