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 » IBM MQ Java / JMS » Linked Exceptions Not Generated

Post new topic  Reply to topic
 Linked Exceptions Not Generated « View previous topic :: View next topic » 
Author Message
SAFraser
PostPosted: Tue Dec 14, 2004 10:42 am    Post subject: Linked Exceptions Not Generated Reply with quote

Shaman

Joined: 22 Oct 2003
Posts: 742
Location: Austin, Texas, USA

We have an application that uses JMS to connect to our queue manager. When there is an MQJMS error, we are not getting the linked exception to an MQ reason code. The developer has assured us that the linked exception code is included in his application. Our platform is Solaris 9.

MQJMS errors are immediately followed by a catalog error. Here is an excerpt:
Quote:
2004.10.24 12.00.15.808 FATAL framework [P=96361:O=0:CT]: MQJMS2005: failed to create MQQueueManager for 'localhost:MOMPRD' javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'localhost:MOMPRD' at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:546)

Quote:
2004.10.24 12.00.15.848 DEBUG framework [P=96361:O=0:CT]: Message catalog not found com.ibm.mq.MQException: Message catalog not found

I am thinking these errors are related.... Perhaps a file is missing? Or we have a path problem? I can't see into the machine where the JMS client is installed. What should I ask the admin to look at?

I did search this site a couple of times, but did not see anything applicable (unless I don't know what I'm looking for, I'm not much of a java guru). Thanks for your help.

Shirley
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Dec 14, 2004 10:51 am    Post subject: Re: Linked Exceptions Not Generated Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

SAFraser wrote:
The developer has assured us that the linked exception code is included in his application


Ask him to show you the code, or show you where in the output that he PRINTS the result.

The missing catalog error is separate, and is either a classpath or path issue. I forget the details this very second, but this one is definitely addressed here already.

Try searching for "Message catalog not found" using all terms and limited to the Java/JMS forum.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
SAFraser
PostPosted: Wed Dec 15, 2004 6:23 am    Post subject: Reply with quote

Shaman

Joined: 22 Oct 2003
Posts: 742
Location: Austin, Texas, USA

This is the code he gave me:
Code:
} catch (JMSException je) {
         Exception e = je.getLinkedException();

         logger.log(this, ILog.DEBUG, je);
         if(e != null) logger.log(this, ILog.DEBUG, e);

         throw new FwException(this, ILog.SEVERE, je);

I don't know enough about java to know if this would print to a log. We have a log called "framework.log" that he says this will print to.

There are a lot of hits on this forum about message catalog (which I had already reviewed but tried again with your search string), but none of them are specific to linked exceptions. From reading some of the other posts, I believe I need to get the admin to check for some type mqji properties file.

The reason I think the message catalog error might be related is the specific reference in the error to "com.ibm.mq.MQException". Isn't that a java file of some sort? I am also going to poke around for that file if I can get access to one of the client machines.

Thanks so much for your help.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Dec 15, 2004 3:03 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

It will only print to the log if you start the app and log at DEBUG Level.
The developers made the error to log the overall message as SEVERE (see throwing the exception and not the linked exception) but to log the embedded linked exception at DEBUG level only.

Tell them to fix their code and log all at the same level. A SEVERE error without the corresponding embedded linked exception is of no help to you !!

What were they thinking ??
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Wed Dec 15, 2004 3:45 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

fjb_saper wrote:
What were they thinking ??


That "I don't need to know MQ, because JMS will just handle it for me".

Or, "That could never happen in production".
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
slaupster
PostPosted: Thu Dec 16, 2004 2:45 am    Post subject: Reply with quote

Apprentice

Joined: 17 Nov 2004
Posts: 41

Quote:
2004.10.24 12.00.15.848 DEBUG framework [P=96361:O=0:CT]: Message catalog not found com.ibm.mq.MQException: Message catalog not found


that looks like the debug message.

Not finding the message catalogue means that the MQException could not load the message properties file, usually found in the classpath. In this case it should print error info to syserr talking about the problem. You may not have the messages installed ??

The completion and reason code should still be in the MQException but the text cannot be displayed because of the above problem - you could just pull this info out as a temp workaround like:

Code:
} catch (JMSException je) {
         Exception e = je.getLinkedException();
         if (e instanceof MQException) // which it will be
         {
                int mqrc = ((MQException)e).reasonCode;
                int cc = ((MQException)e).completionCode ;
                // print this info
         }


hope this helps...
Back to top
View user's profile Send private message
SAFraser
PostPosted: Thu Dec 16, 2004 9:36 am    Post subject: RESOLVED: Linked Exceptions Not Generated Reply with quote

Shaman

Joined: 22 Oct 2003
Posts: 742
Location: Austin, Texas, USA

SUMMARY: mqji.properties file was not present on the system; after placing a copy in a directory with proper path references, linked exceptions are now generated.

DETAILS:
First, let me say THANK YOU for your comments. The developer was starting to make me feel stupid! I thought the logging level might be wrong but was so discouraged over the linked exceptions issue that I didn't bring it up to him. I will now.

I was a little thrown off by the error in the custom log to which I had access. It kept telling me "message catalog not found". All the posts I found talked about "message catalog not found -mqji". When I finally found a copy of mqji.properties, I was still not certain (given its contents) that it was the fix. Turns out that "message catalog not found -mqji" was being printed to stderr but I couldn't see it.

The app server admin (good guy) confirmed that the mqji.properties file was not present. Found it, copied it, and voila - linked exceptions.

Here's the best part of the story. I wrote to the developer (bad guy) & told him the fix. He should be happy since we cleared a pending defect from his worklist. He wrote back and said whatever we did couldn't have fixed it, that a "configuration change" could not impact the behavior of JMS. <sigh> I'll send him before-and-after logs.

And then, after a pitcher of margaritas and a good night's sleep, I will tackle the log level with him.

Thanks again,
Shirley
Back to top
View user's profile Send private message
EddieA
PostPosted: Thu Dec 16, 2004 10:11 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
mqji.properties file was not present on the system; after placing a copy in a directory with proper path references, linked exceptions are now generated

Which is why IBM sure did the right thing when they moved these Property files into com.ibm.mq.jar with 5.3. No chance of "losing" them again.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
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 » IBM MQ Java / JMS » Linked Exceptions Not Generated
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.