Error Mq 2051
Contents |
RSS Feed - WebSphere MQ Support RSS Feed - Message mq error 2538 Broker Support
MQSeries.net Forum Index » IBM MQ API Support » Issue while publishing in MQ V7 Issue while publishing in MQ V7 « View previous topic :: ViewMq Error Code 2085
next topic » Author Message rakent Posted: Tue Jul 14, 2009 12:26 pm Post subject: Issue while publishing in MQ V7 NewbieJoined: 28 Sep 2005Posts: 7 I wrote a Java code to publish the message to the MQ V7.0. I am getting the error while executiong. Error: ######################################################################### Is connected true ***Publishing *** mq reason code 2033 MQJE001: Completion Code '2', Reason '2051'. MQ Exception in the publish :com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason '2051'. ######################################################################### Script ended : Tue Jul 14 15:21:49 CDT 2009. Can anyone help me on this. Code is copied below. I am exporting /usr/mqm/java/lib/com.ibm.mq.jmqi.jar:/usr/mqm/java/lib/com.ibm.mq.jar: import com.ibm.mq.*; import com.ibm.mq.constants.CMQC; import com.ibm.mq.jmqi.*; import java.util.*; import java.io.*; public class pub { private Properties prop; private String sHostName; private String sSvrConName; private String sPort; private String sQueueManagerName; private String sourceQueueName; private int sourceQOpenOptions; private FileInputStream fis; private String topicObject; private MQQueueManager sQmgr; private MQQueue sourceQ; private MQMessage mesg; private MQPutMessageOptions pmo; private MQGetMessageOptions gmo; private void readConfigFile() { try{ prop = new Properties(); fis = new FileInputStream(new File( "/home/mqm/pubTest/PubSubConfig.txt")); prop.load(fis); sHostName = prop.getProperty("S_HOSTNAME"); sSvrConName = prop.getProperty("S_SERV_CHANNEL"); sPort = prop.getProperty("S_PORT"); sQueueManagerName = prop.getProperty("S_QUEUE_MANAGER_NAME"); sourceQueueName = prop.getProperty("S_QNAME"); topicObject = "MONEY"; }catch(IOException IOE){ System.out.println(" Exception Occured in the readConfigFile Function : " + IOE); } } private void publish(){ MQEnvironment.hostname = sHostName; MQ
InnerException is beyond me. This page can be used to http://www.mqseries.net/phpBB2/viewtopic.php?t=49966 look up "ReasonCodes" (which is all the LinkedException provides in XMS.NET). The links in this page all lead to the specific help-page. CodeCode http://blog.robiii.nl/2012/01/websphere-mq-reason-codes.html (hex)ReasonCodeDescription 00000RC0MQRC_NONE 9000384RC900MQRC_APPL_FIRST 99903E7RC999MQRC_APPL_LAST 200107D1RC2001MQRC_ALIAS_BASE_Q_TYPE_ERROR 200207D2RC2002MQRC_ALREADY_CONNECTED 200307D3RC2003MQRC_BACKED_OUT 200407D4RC2004MQRC_BUFFER_ERROR 200507D5RC2005MQRC_BUFFER_LENGTH_ERROR 200607D6RC2006MQRC_CHAR_ATTR_LENGTH_ERROR 200707D7RC2007MQRC_CHAR_ATTRS_ERROR 200807D8RC2008MQRC_CHAR_ATTRS_TOO_SHORT 200907D9RC2009MQRC_CONNECTION_BROKEN 201007DARC2010MQRC_DATA_LENGTH_ERROR 201107DBRC2011MQRC_DYNAMIC_Q_NAME_ERROR 201207DCRC2012MQRC_ENVIRONMENT_ERROR 201307DDRC2013MQRC_EXPIRY_ERROR 201407DERC2014MQRC_FEEDBACK_ERROR 201607E0RC2016MQRC_GET_INHIBITED 201707E1RC2017MQRC_HANDLE_NOT_AVAILABLE 201807E2RC2018MQRC_HCONN_ERROR 201907E3RC2019MQRC_HOBJ_ERROR 202007E4RC2020MQRC_INHIBIT_VALUE_ERROR 202107E5RC2021MQRC_INT_ATTR_COUNT_ERROR 202207E6RC2022MQRC_INT_ATTR_COUNT_TOO_SMALL 202307E7RC2023MQRC_INT_ATTRS_ARRAY_ERROR 202407E8RC2024MQRC_SYNCPOINT_LIMIT_REACHED 202507E9RC2025MQRC_MAX_CONNS_LIMIT_REACHED 202607EARC2026MQRC_MD_ERROR 202707EBRC2027MQRC_MISSING_REPLY_TO_Q 202907EDRC2029MQRC_MSG_TYPE_ERROR 203007EERC2030MQRC_MSG_TOO_BIG_FOR_Q 203107EFRC2031MQRC_MSG_TOO_BIG_FOR_Q_MGR 203307F1RC2033MQRC_NO_MSG_AVAILABLE 203407F2RC2034MQRC_NO_MSG_UNDER_CURSOR 203507F3RC2035MQRC_NOT_AUTHORIZED 203607F4RC2036MQRC_NOT_OPEN_FOR_BROWSE 203707F5RC2037MQRC_NOT_OPEN_FOR_INPUT 203807F6RC2038MQRC_NOT_OPEN_FOR_INQUIRE 203907F7RC2039MQRC_NOT_OPEN_FOR_OUTPUT 204007F8RC2040MQRC_NOT_OPEN_FOR_SET 204107F9RC2041MQRC_OBJECT_CHANGED 204207FARC2042MQRC_OBJECT_IN_USE 204307FBRC2043MQRC_OBJECT_TYPE_ERROR 204407FCRC2044MQRC_OD_ERROR 204507FDRC2045MQRC_OPTION_NOT_VALID_FOR_TYPE 204607FERC2046MQRC_OPTIONS_ERROR 204707FFRC2047MQRC_PERSISTENCE_ERROR 20480800RC2048MQRC_PERSISTENT_NOT_ALLOWED 20490801RC2049MQRC_PRIORITY_EXCEEDS_MAXIMUM 20500802RC2050MQRC_PRIORITY_ERROR 20510803RC2051MQRC_PUT_INHIBITED 20520804RC2052MQRC_Q_DELETED 20530805RC2053MQRC_Q_FULL 20550807RC2055MQRC_Q_NOT_EMPTY 20560808RC2056MQRC_Q_SPACE_NOT_AVAILABLE 20570809RC2057MQRC_Q_TYPE_ERROR 2058080ARC2058MQRC_Q_MGR_NAME_ERROR 2059080BRC2059MQRC_Q_MGR_NOT_AVAILABLE 2061080DRC2061MQRC_REPORT_OPTIONS_ERROR 2062080ERC2062MQRC_SECOND_MARK_NOT_ALLOWED 2063080FRC2063MQRC_SECURITY_ERROR 20650811RC2065MQRC_SELECTOR_COUNT_ERROR 20660812RC2066MQRC_SELECTOR_LIMIT_EXCEEDED 2067
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the http://stackoverflow.com/questions/11237425/always-receive-mqje001-completion-code-2-reason-2059-error workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join code 2 them; it only takes a minute: Sign up Always receive MQJE001: Completion Code '2', Reason '2059'. ERROR up vote 3 down vote favorite 1 I am new to Web Sphere MQ. I created a Queue Manager, Channel and Listener in AIX as follows: crtmqm MY_Q_MGR strmqm MY_Q_MGR runmqsc DEFINE LISTENER(MY_QM_LISTENER) TRPTYPE(TCP) PORT(5030) DEFINE CHANNEL(MY_QM_CHANNEL) CHLTYPE(SDR) CONNAME('10.128.1.51(5030)') XMITQ('MY_Q_MGR') DISCINT(0) Then mq reason code I checked that QMGR is running. I saw listener in proc. Then, I tried to create MQQueueManager from java as follows and I got MQJE001: Completion Code '2', Reason '2059'. import com.ibm.mq.MQException; import com.ibm.mq.MQGetMessageOptions; import com.ibm.mq.MQMessage; import com.ibm.mq.MQPutMessageOptions; import com.ibm.mq.MQQueue; import com.ibm.mq.MQQueueManager; import com.ibm.mq.constants.MQConstants; import com.ibm.mq.MQEnvironment; public class MQSample { // code identifier static final String sccsid = "@(#) samples/wmqjava/MQSample.java, jmscc.samples, k700, k700-L080529 1.4.1.1 08/06/01 09:37:53"; // define the name of the QueueManager private static final String qManager = "MY_Q_MGR"; // and define the name of the Queue private static final String qName = "SYSTEM.DEFAULT.LOCAL.QUEUE"; /** * Main entry point * * @param args - command line arguments (ignored) */ public static void main(String args[]) { try { MQEnvironment.hostname = "MY IP ADDRESS"; MQEnvironment.channel = "MY_QM_CHANNEL"; MQEnvironment.port = 5030; // Create a connection to the QueueManager System.out.println("Connecting to queue manager: " + qManager); System.out.println("Connecting to queue manager is finished: " + qManager); // Set up the options on the queue we wish to open int openOptions = MQConstants.MQOO_INPUT_AS_Q_DEF | MQConstants.MQOO_OUTPUT; // Now specify the queue tha