IBM MQ - Resolve "AMQ5540E Application did not supply a user ID and password"

Let's say the IBM MQ error log has the following. In this example, when the foo.jar application attempted to connect to the IBM MQ queue manager named MANAGER01, the foo.jar application did not provide a username and password.

01/14/2022 05:13:47 PM - Process(31843.104651) User(mqm) Program(amqzlaa0)
                    Host( Installation(Installation1)
                    VRMF( QMgr(MANAGER01)
                    CommentInsert1(foo app)

AMQ5540E: Application 'foo app' did not supply a user ID and password


As one possible example, let's say the application is a Java application that is using to make the connection to IBM MQ. Notice in this example that a username (john.doe) and password (itsasecret) is included. If the username or password are not included, this can cause "AMQ5540E Application did not supply a user ID and password" to be captured in the IBM MQ error log.

cf.setStringProperty( WMQConstants.WMQ_HOST_NAME, "");
cf.setIntProperty(    WMQConstants.WMQ_PORT, 1414);
cf.setStringProperty( WMQConstants.WMQ_CHANNEL, "channel01");
cf.setIntProperty(    WMQConstants.WMQ_CONNECTION_MODE, WMQConstants.WMQ_CM_CLIENT);
cf.setStringProperty( WMQConstants.WMQ_QUEUE_MANAGER, "MANAGER01");
cf.setBooleanProperty(WMQConstants.USER_AUTHENTICATION_MQCSP, true);
cf.setStringProperty( WMQConstants.USERID, "john.doe");
cf.setStringProperty( WMQConstants.USERID, "itsasecret");


It is noteworthy that in a Java application using, the WMQConstants.WMQ_APPLICATIONNAME property can be used to define the name of the application.

cf.setStringProperty(WMQConstants.WMQ_APPLICATIONNAME, "foo app");


Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter a50c9 in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   |