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 » unable to throw exception in external java method

Post new topic  Reply to topic
 unable to throw exception in external java method « View previous topic :: View next topic » 
Author Message
sai kumar adduri
PostPosted: Tue Dec 17, 2013 2:39 am    Post subject: unable to throw exception in external java method Reply with quote

Acolyte

Joined: 04 Apr 2013
Posts: 73

I am calling an external java which returns a string method from esql , When there is an exception in java , all though it comes to the catch block where I am trying to print it but it is ineffective ,and it is continuing with normal execution.
Back to top
View user's profile Send private message
hcinko5
PostPosted: Tue Dec 17, 2013 3:40 pm    Post subject: Reply with quote

Novice

Joined: 12 Apr 2010
Posts: 21

Without the intention to be offensive, could you remake your question? I don't get what are you asking. Try to give more detail of what is your scenario, your expected outcome and your real outcome.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Dec 17, 2013 10:27 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

My guess is that the OP wants to tell the calling ESQL that there was an exception in the Java code that was called.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
ajodowd
PostPosted: Wed Dec 18, 2013 1:09 am    Post subject: Reply with quote

Novice

Joined: 15 Dec 2013
Posts: 13

Yes that makes sense smdavies99.

Sai kumar, it sounds like your java exception is being thrown, and you are stepping through the ESQL in the debugger, but the HANDLER block isn't operating on the exception? Have you looked at the Exception tree, because an exception should be being generated.

Thanks, Anthony.
Back to top
View user's profile Send private message
sai kumar adduri
PostPosted: Thu Dec 19, 2013 9:11 am    Post subject: Reply with quote

Acolyte

Joined: 04 Apr 2013
Posts: 73

The exception list is not being populated and after entering into the catch block I am trying to print it .
Back to top
View user's profile Send private message
McueMart
PostPosted: Thu Dec 19, 2013 9:25 am    Post subject: Reply with quote

Chevalier

Joined: 29 Nov 2011
Posts: 490
Location: UK...somewhere

If you have a try {} catch{} block in java code and you hit an exception , you will of course move to the catch section.

I think the OP is then expecting the 'exception list' i.e. the contact admin.getExceptionList(), to be populated. This will NOT happen.

What you probably want to do is re-throw the exception e.g.

Code:


try{
...
}catch(Exception e){
MbUserException mbue = new MbUserException(this,"myMethod","","",e.toString(),null);
throw mbue;

}



This will re-throw the exception and will be caught by the input node, try-catch node (or a HANDLER if you defined one in your ESQL).
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 » unable to throw exception in external java method
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.