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 » Propagate on Java compute node (destination list)

Post new topic  Reply to topic
 Propagate on Java compute node (destination list) « View previous topic :: View next topic » 
Author Message
messg_wb
PostPosted: Thu Mar 05, 2009 8:10 am    Post subject: Propagate on Java compute node (destination list) Reply with quote

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
View user's profile Send private message
chids
PostPosted: Thu Mar 05, 2009 3:53 pm    Post subject: Re: Propagate on Java compute node (destination list) Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
rekarm01
PostPosted: Fri Mar 06, 2009 2:35 am    Post subject: Re: Propagate on Java compute node (destination list) Reply with quote

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
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 » Propagate on Java compute node (destination list)
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.