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 IndexWebSphere Message Broker SupportProblem writing XML to MQOutput in Unix env in Java CompNode

Post new topicReply to topic
Problem writing XML to MQOutput in Unix env in Java CompNode View previous topic :: View next topic
Author Message
DevNYC1
PostPosted: Mon May 21, 2018 10:31 am Post subject: Problem writing XML to MQOutput in Unix env in Java CompNode Reply with quote

Apprentice

Joined: 22 Aug 2012
Posts: 32

I have a strange problem that I cannot replicate locally on my machine, but it keeps happening in the enterprise Unix environment - every time the propagate causes this exception while trying to write the XML text onto the queue (MQOutput) node from Java Compute Node:

Code:
MbMessage altMessage = new MbMessage();
    copyMessageHeaders(inMessage, altMessage);
    MbMessageAssembly altAssembly = new MbMessageAssembly(contact admin, altMessage);                                     
                                       
    String resultXML = getXml(); // retrieve XML I need to write to the queue
    MbElement altRoot = altMessage.getRootElement();
 
    // write XML onto the MQOutput node
    XMLUtil.writeXMLtoOutputQ(altRoot, resultXML);
    altMessage.finalizeMessage(MbMessage.FINALIZE_NONE);
 
    alt.propagate(altAssembly);  // this causes an exception


writeXMLtoOutputQ method looks as follows:

Code:
try {
 
    byte []msgBytes = xml.getBytes("UTF-8");
    int ccsid = 1208; // encoding for UTF-8
    outRoot.createElementAsLastChildFromBitstream
      (msgBytes,MbXMLNSC.PARSER_NAME,"","","",0,ccsid,0);
    }
    catch(MbException mbe)
    {
    ...


Exception I get is as follows:

class:JNI method:ImbOutputTemplateNode::processMessageAssemblyToFailure source:BIPmsgs key:2230 >
<com.ibm.broker.plugin.MbRecoverableException class:JNI method:ImbOutputTemplateNode::processMessageAssemblyToFailure source:BIPmsgs key:2230 >

<com.ibm.broker.plugin.MbRecoverableException class:JNI method:MQOutputInteraction::putToQueue source:BIPmsgs key:2667 >
DEBUG: --- traceText: Failed to put message

BIP2230E: Error detected whilst processing a message in node '{0}'.

The integration node detected an error whilst processing a message in node '{0}'. An exception has been thrown to cut short the processing of the message.
Back to top
View user's profile Send private message
DevNYC1
PostPosted: Mon May 21, 2018 11:16 am Post subject: Reply with quote

Apprentice

Joined: 22 Aug 2012
Posts: 32

Just wanted to add that I also tried to wrote this XML as a blob - same issue, works fine in my local environment, but getting the same exception in the Unix server environment.

MbElement outParser = outRoot.createElementAsLastChild(MbBLOB.PARSER_NAME);
// Create the BLOB element in the Blob parser domain with the required text
outParser.createElementAsLastChild(MbElement.TYPE_NAME_VALUE,
"BLOB", xml.getBytes());
Back to top
View user's profile Send private message
abhi_thri
PostPosted: Tue May 22, 2018 12:17 am Post subject: Reply with quote

Disciple

Joined: 17 Jul 2017
Posts: 173
Location: UK

hi...there should be more details logged for the error at syslog, can you please post the full error trace from syslog.

Also worth checking whether the way the file/message is fed to the input queue is the root cause (eg:- ccsid/encoding/ windows <CR><LF> chars etc)


Last edited by abhi_thri on Tue May 22, 2018 2:17 am; edited 1 time in total
Back to top
View user's profile Send private message
timber
PostPosted: Tue May 22, 2018 2:06 am Post subject: Reply with quote

Shaman

Joined: 25 Aug 2015
Posts: 784

Unless the error is a core-dump (i.e. the process crashed) there will always be a lot more information than that. You need to learn how to get diagnostic information out of IIB - otherwise you will waste a lot of time trying to diagnose problems with only 10% of the information that's available.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportProblem writing XML to MQOutput in Unix env in Java CompNode
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.