JMS: javax.naming.AuthenticationException
An error occurs when testing connectivity to a QueueConnectionFactory or Queue:
‘The QueueConnectionFactory ‘myQcf’ cannot be found. javax.naming.AuthenticationException: Failed to connect to the management broker due to authentication failure: connection state=1’
To rectify this the
java.naming.security.principal and
java.naming.security.credentials JNDI Properties must be set to the username and password required for JNDI access. There are two ways of achieving this:
-
If the JNDI username/password are the same as those used to access a JMS resource such as a Queue/QueueConnectionFactory then click on the ‘Use Connection Username and Password for the JNDI Security Principal and Credentials’ option in the JMS Configuration Dialog. The Connection Username and Password will then be transparently set for JNDI authentication using the JNDI properties above.
-
If the JNDI username and password are different to those for JMS Connection then add both java.naming.security.principal and java.naming.security.credentials using the JNDI Properties and specify the JNDI username and password respectively.
NOTE: Any principal or credentials entries in the JNDI Properties table will take precedence over those set as a result of the
‘Use Connection Username and Password…’ option.