JMS Client Cannot Create
Connection
The user reports that a JMS client cannot create a connection to the JMS provider. The exception that the createConnection() method call throws is as follows:
javax.jms.JMSSecurityException: Cannot create connection with user X.
com.sap.jms.protocol.notification.ServerExceptionResponse.getException(ServerExceptionResponse.java:231)
com.sap.jms.client.connection.ConnectionFactory.checkForException(ConnectionFactory.java:405)
com.sap.jms.client.connection.ConnectionFactory.sendConnectionCreateRequest(ConnectionFactory.java:386)
com.sap.jms.client.connection.ConnectionFactory.createConnection(ConnectionFactory.java:319)
|
Scenario Type: |
Error analysis |
|
NetWeaver Component: |
J2EE Engine |
|
Validity: |
J2EE 6.30 and higher |
● User password for the JMS provider is not valid
● User X does not exist
● User X is locked
The JMS client uses method createQueue(Topic)Connection(username, password) to establish a connection to the JMS provider.
Solution:
● If user X exists, change the user’s password in the JMS client method call createConnection(username, password)
● If user X does not exist, then replace both the user name and password in the above call with an existing one.
The JMS client uses createQueue(Topic)Connection() (that is, without specifying a user name/password combination) to establish a connection to the JMS provider.
Solution:
Update the user in the definition of the corresponding connection factory (via VisualAdministrator → server_Z_T → Services → JMS Provider → INSTANCE_NAME → Connection Factories tab).

The client will get the following exception:
javax.jms.JMSSecurityException: Cannot create connection. The user X is locked.
com.sap.jms.protocol.notification.ServerExceptionResponse.getExceptio
n(ServerExceptionResponse.java:231)
com.sap.jms.client.connection.ConnectionFactory.checkForException(Con
nectionFactory.java:405)
com.sap.jms.client.connection.ConnectionFactory.sendConnectionCreateR
equest(ConnectionFactory.java:386)
Solution:
If user X is locked, then ask the J2EE Engine administrator to unlock it (see also User Account Is Locked).