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 » Help Regarding UserDefined Nodes [Solved]

Post new topic  Reply to topic Goto page Previous  1, 2
 Help Regarding UserDefined Nodes [Solved] « View previous topic :: View next topic » 
Author Message
Vitor
PostPosted: Thu Oct 31, 2013 4:54 am    Post subject: Re: Same Issue Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kiruthigeshwar wrote:
Is there any log I can check to find the error occurred.


All the usual ones, including the Eclipse ones.

kiruthigeshwar wrote:
what could be the issue.


User defined nodes are like user exits. If you don't have enough experience to fix problems with them, you don't have enough experience to be using them.

(For the record, I count myself in that group & use both only after exhausting all other possibilities and excuses).

kiruthigeshwar wrote:
Will installing the plugins using links file help?


It might. It might not. It depends what the problem is. I'd recommend that rather than using this zombie thread (appropriate though it is at this Halloween time) you start a new thread where you describe what you have done, what your node looks like, how you installed it, what you have observed and what steps you have already taken.

Better information, better advice.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
MKHODER
PostPosted: Thu Dec 28, 2017 9:31 am    Post subject: Problems UDN input java Reply with quote

Newbie

Joined: 27 Dec 2017
Posts: 7

Hello everyone,

I created a user-defined node with java.

My node appeared well in the palette of the toolkit, and my java project exists in the lilPath path, except when I deploy my flow, I go out in exception The /BasicInoutTest.msgflow message flow does not contain input node

Yet my input node create exists in the flow.

Here is my code :
public class BasicInputNode extends MbInputNode implements MbInputNodeInterface {

public BasicInputNode() throws MbException {
// TODO Auto-generated constructor stub
createOutputTerminal ("out");
createOutputTerminal ("failure");
createOutputTerminal ("catch");
}

@Override
public int run(MbMessageAssembly assembly) throws MbException {
// TODO Auto-generated method stub
String str = "Get the data from somewhere";
byte[] bytes = str.getBytes();
MbMessage msg = createMessage(bytes);
msg.finalizeMessage( MbMessage.FINALIZE_VALIDATE );
MbMessageAssembly newAssembly = new MbMessageAssembly(assembly, msg);
dispatchThread();
MbOutputTerminal out = getOutputTerminal("out");
out.propagate(newAssembly);
return SUCCESS_RETURN;
}

}


could you help me? Is there more to do?


thanks in advance.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Dec 29, 2017 6:22 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

Evidently your
Code:
byte[] mybytes = str.getBytes();
is all wrong.
You have no idea which CCSID the current byte array will be in and if a JVM on any different platform will ever be able to transform it back correctly into a string...
You should always use the defining methods that allow you to set the CCSID like from memory str.getBytes("UTF-8");

Hope this helps
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
MKHODER
PostPosted: Fri Dec 29, 2017 8:40 am    Post subject: Reply with quote

Newbie

Joined: 27 Dec 2017
Posts: 7

Thank you for your reply

I have a flow (BasicInoutTest) that contains the following nodes:
- BasicInputNode
- Compute
- MQOutput

When I deploy my application on the execution group, I only see the compute file .esql in the EG, my flow does not exist.

If I do a deployment only for the flow, I come across the following error:

The /BasicInoutTest.msgflow message does not contain input


My node is not known as input node by the broker

here is the code

Project UDN
Code:
public class BasicInputNodeUDN extends Node {
   private static final long serialVersionUID = 1L;
   // Node constants
   protected final static String NODE_TYPE_NAME = "BasicInputNode";
   protected final static String NODE_GRAPHIC_16 = "platform:/plugin/BasicInput/icons/full/obj16/BasicInput.gif";
   protected final static String NODE_GRAPHIC_32 = "platform:/plugin/BasicInput/icons/full/obj30/BasicInput.gif";
   public BasicInputNodeUDN() {
   }
   @Override
   public InputTerminal[] getInputTerminals() {
      return null;
   }

   public final OutputTerminal OUTPUT_TERMINAL_FAILURE = new OutputTerminal(this,"OutTerminal.failure");
   public final OutputTerminal OUTPUT_TERMINAL_CATCH = new OutputTerminal(this,"OutTerminal.catch");
   public final OutputTerminal OUTPUT_TERMINAL_OUT = new OutputTerminal(this,"OutTerminal.out");
   @Override
   public OutputTerminal[] getOutputTerminals() {
      return new OutputTerminal[] {
         OUTPUT_TERMINAL_FAILURE,
         OUTPUT_TERMINAL_CATCH,
         OUTPUT_TERMINAL_OUT
      };
   }
   @Override
   public String getTypeName() {
      return NODE_TYPE_NAME;
   }
   protected String getGraphic16() {
      return NODE_GRAPHIC_16;
   }
   protected String getGraphic32() {
      return NODE_GRAPHIC_32;
   }
   public String getNodeName() {
      String retVal = super.getNodeName();
      if ((retVal==null) || retVal.equals(""))
         retVal = "BasicInput";
      return retVal;
   };
}



Project java
Code:
public class BasicInputNode extends MbInputNode implements MbInputNodeInterface {

   public BasicInputNode() throws MbException {
      // TODO Auto-generated constructor stub
      createOutputTerminal ("out");
      createOutputTerminal ("failure");
      createOutputTerminal ("catch");
      setAttribute("firstParserClassName","NONE");
   }

   @Override
   public int run(MbMessageAssembly assembly) throws MbException {
      // TODO Auto-generated method stub
      String str = "Get the data from somewhere";
       byte[] bytes = null;
      try {
         bytes = str.getBytes("UTF-8");
      } catch (UnsupportedEncodingException e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
      }
       MbMessage msg = createMessage(bytes);
       msg.finalizeMessage( MbMessage.FINALIZE_VALIDATE );
       MbMessageAssembly newAssembly = new MbMessageAssembly(assembly, msg);
       dispatchThread();
       MbOutputTerminal out = getOutputTerminal("out");
       out.propagate(newAssembly);
       return SUCCESS_RETURN;
   }
   public static String getNodeName()
   {
      return "BasicInputNode";
   }
}


I do not think my run function contains any problems.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Dec 29, 2017 8:49 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

I would have expected the firstParserClassName to be set to MbBLOB.getClass().getName() or any other valid name (see documentation) and not NONE...

So you're setting the BLOB in UTF8, but you're not setting the OutputRoot.Properties.CodedCharSetId to 1208??? You're also not setting any transport header ...

As you are creating the message, it would behoove you to also fill in the OutputRoot.Properties and any intermediary headers as needed.
Also you need to attach a parser to the message even if it is only the BLOB parser... Remember you're not building a message on the wire, you're building a message tree... even if the message is filled with stream (one the wire) data
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Help Regarding UserDefined Nodes [Solved]
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.