This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
First of all, why does your MDB extend RuntimeException? That doesn't make sense to me and is a poor programming practice.
As far as this exception goes, it says that the particular queue is not present. If you look at the end of the trace, you can find a compcode and reasonCode - which will explain more about the issue. In this case, it also says "MQRC_UNKNOWN_OBJECT_NAME". You are trying to connect to a WebSphere MQ and it says this queue is not found.
Also, in the code you have queue name as "ORANGE.QUEUE", but your exception trace shows "Failed to open MQ queue 'OORANGE.QUEUE'.** ". Are you sure you have given the correct queue name in the code? Can you check if there is a typo?
SCJP 1.4, OCMJEA/SCEA 5.0.
Joined: Sep 11, 2012
Thanks for your reply and you valuable suggetions.
Well my class is extending RuntimeException , it's my problem i was posted wrongly.(it should not happen again)
And In my MDB program my Queue name(also same as my target Queue name) is : ORANGE.QUEUE .
If i intentionally give wrong Queue name in my MDB like :
And if i deploy above application in my Jobss it is showing Exceptions immediately on server console (like i posted above) and failed to deploy the application.
but My Intention is to deploy the ejb mdb eventhough when i give wrong Queue name (or) Queue server is not available.