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 » Custom Java Plug-in - deployement errors

Post new topic  Reply to topic
 Custom Java Plug-in - deployement errors « View previous topic :: View next topic » 
Author Message
dnaren
PostPosted: Tue Apr 02, 2002 7:05 pm    Post subject: Reply with quote

Apprentice

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

I am trying to deploy the sample java plug-in and I am getting the following errors:

BIP2246E: Request to create connection between node 'Switch1' (uuid='280ab1f9-ec00-0000-0080-92d6b78062e5') terminal 'Change', and node 'MQOutput1' (uuid='c841b1f9-ec00-0000-0080-92d6b78062e5') terminal 'in': source terminal could not be found in message flow 'CUSTOM_FLOW'.

I read through the earlier thread regarding Java Plug-in.

1. Compiled the file Switch.java (after removing the package statement).
2. Made the jar file Switch.jar
3. Copied the jar to <MQSI Install>jplugin directory
4. Added the plug-in in the control center with the label 'Switch'
5. Restarted the broker
6. Created a flow using the Switch node
7. Added the flow to the broker

When I try to deploy the broker, I get the above mentined error.



The source code for the plug-in is:
Code:

File: Switch.java

import com.ibm.broker.plugin.*;

public class Switch extends MbNode implements MbNodeInterface
{
  String _nodeTraceSetting;

  public Switch() throws MbException
  {
    createInputTerminal("in");
    createOutputTerminal("add");
    createOutputTerminal("change");
    createOutputTerminal("delete");
    createOutputTerminal("hold");
    createOutputTerminal("failure");
  }


  public static String getNodeName()
  {
    return "SwitchNode";
  }


  public void evaluate(MbMessageAssembly assembly, MbInputTerminal in)
    throws MbException
  {
    // Navigate to the relevant syntax element in the XML message
    MbElement rootElement = assembly.getMessage().getRootElement();
    MbElement switchElement = rootElement.getLastChild().getFirstChild().getFirstChild();

    if(_nodeTraceSetting.equals("debug"))
      {
        System.out.println("Element = " + switchElement.getName());
        System.out.println("Value = " + switchElement.getValue());
      }

    // Select the terminal indicated by the value of this element
    String terminalName;
    String elementValue = (String)switchElement.getValue();
    if(elementValue.equals("add"))
      terminalName = "add";
    else if(elementValue.equals("change"))
      terminalName = "change";
    else if(elementValue.equals("delete"))
      terminalName = "delete";
    else if(elementValue.equals("hold"))
      terminalName = "hold";
    else
      terminalName = "failure";
   
    MbOutputTerminal out = getOutputTerminal(terminalName);

    out.propagate(assembly);
  }

  public String getNodeTraceSetting()
  {
    return _nodeTraceSetting;
  }

  public void setNodeTraceSetting(String nodeTraceSetting)
  {
    _nodeTraceSetting = nodeTraceSetting;
  }

}





Any help would be highly appreciated...

Can somebody list out a step-by-step procedure to deploy this plug-in? The code compiles without any problems.


Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kirani
PostPosted: Tue Apr 02, 2002 8:41 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Looks like Configuration Manager does not have information about Terminals of Switch node. Have you used Control Center to create XML configuration files (XML and .WDP)? If so, make sure the terminal names you specified in Control Center matches with the names in your java source code.
Back to top
View user's profile Send private message Visit poster's website
kolban
PostPosted: Tue Apr 02, 2002 8:47 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

In your code, the terminal is named "change". In the error message, the terminal is named "Change". Notice the case difference for the letter 'C'. I think that is probably the error. Unfortunately, there is no (known) way to edit the definition so you will have to delete the node from the control center and re-enter.
Back to top
View user's profile Send private message
dnaren
PostPosted: Tue Apr 02, 2002 9:30 pm    Post subject: Reply with quote

Apprentice

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

Yes. It is working now I corrected the labels for the teminals to match the labels used in the code...i.e, corrected the label "Change" to "change"

I am able to deploy and test the plug-in.

It's been a while since I looked at this message board. I am very surprised to find that "MQMessenger" app I posted, is the most popular file here. But, I never got any feedback the people who downloaded.

Thanks for the help!
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Custom Java Plug-in - deployement errors
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.