|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Propagate on Java compute node (destination list) |
« View previous topic :: View next topic » |
Author |
Message
|
messg_wb |
Posted: Thu Mar 05, 2009 8:10 am Post subject: Propagate on Java compute node (destination list) |
|
|
Acolyte
Joined: 29 Sep 2005 Posts: 51
|
Hello,
I am generating output in java compute node to propagate to multiple queues but I am seeing exception, 'java.lang.NullPointerException'. Below is the code, Am I missing something here ? (I searched for any related issues in this forum but couldn't find any)
Code: |
MbMessage globalEnv = new MbMessage(assembly.getGlobalEnvironment());
MbMessage localEnv = new MbMessage(assembly.getLocalEnvironment());
MbMessageAssembly outAssembly = new MbMessageAssembly(assembly,outMessage,localEnv,globalEnv);
MbElement queueName = localEnv.getRootElement().
createElementAsLastChild(MbElement.TYPE_NAME, "Destination", null).
createElementAsLastChild(MbElement.TYPE_NAME, "MQ", null).
createElementAsLastChild(MbElement.TYPE_NAME, "DestinationData", null).
createElementAsLastChild(MbElement.TYPE_NAME_VALUE ,"queueName", "OUT1");
MbElement outRoot = outMessage.getRootElement();
MbElement outParser = outRoot.createElementAsLastChild(MbBLOB.PARSER_NAME);
MbElement outBody = outParser.createElementAsLastChild(MbElement.TYPE_NAME_VALUE, "BLOB", inDataVal);
getOutputTerminal("out").propagate(outAssembly); |
Thanks |
|
Back to top |
|
 |
chids |
Posted: Thu Mar 05, 2009 3:53 pm Post subject: Re: Propagate on Java compute node (destination list) |
|
|
 Novice
Joined: 09 Oct 2006 Posts: 22 Location: Stockholm, Sweden
|
This probably has anything to do with it but are you aware that the MbMessageAssembly constructor you're using is deprectaed? You're not to create a new GlobalEnvironment since the GlobalEnv is mutable.
It would help if you'd provide the line number that the NPE occurs at. _________________ /mårten.
-- http://marten.gustafson.pp.se/
-- marten.gustafson@gmail.com |
|
Back to top |
|
 |
rekarm01 |
Posted: Fri Mar 06, 2009 2:35 am Post subject: Re: Propagate on Java compute node (destination list) |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
messg_wb wrote: |
I am generating output in java compute node to propagate to multiple queues but I am seeing exception, 'java.lang.NullPointerException'. |
More information would help. For example, a java stack trace could narrow down where the NullPointerException occurred.
messg_wb wrote: |
Code: |
MbMessageAssembly outAssembly = new MbMessageAssembly(assembly,outMessage,localEnv,globalEnv); |
|
This constructor expects different arguments in a different order.
Consult the documentation for more details. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|