IBM Support

webMethods Knowlegebase : No exception in Java Client when user has no permissions (1791178)

Troubleshooting


Problem

Using UM 10.1 Fix 6 at server side and client using JMS standard libraries sending an event to a Queue where the user is not authorized to publish (ACL without push).

The Java client finish without showing any error or exception on the ACL, the authorization ERROR is shown in UM server side:

[Wed Jul 25 10:32:50 CEST 2018] [ReadPool:118] [com.pcbsys.nirvana.server] - SECURITY: No privilege for attempted operation:xxx@xxx Operation : Publish <Test_External_Queue>

But the client do not shows any error, and the event is not published.

The code is like:

1) MessagingClient.java

SimpleMessageProducer sender = new SimpleMessageProducer();

sender.sendToQueue(CFName, QueueName, sslEnabled, userName, password, sendData);

2) SimpleMessageProducer.java

public void sendToQueue(String CFName, String QueueName, boolean sslEnabled, String userName, String password, String data){

try{

//get connection factory

messaging = new InitialContext();

logger.trace("connected to InitialContext");

connectionFactory = (ConnectionFactory) messaging.lookup(CFName);

logger.trace("connection factory loaded");

//get a destination

queue = (Queue) messaging.lookup(QueueName);

logger.trace("destination loaded");

messaging.close();

logger.trace("connection closed");

//create connection

if (sslEnabled) {

connection = connectionFactory.createConnection(userName, password);

} else {

connection = connectionFactory.createConnection();

}

logger.trace("connection created");

//create session

session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

System.out.println("----------------This is the client ID:" + connection.getClientID());

logger.trace("session created");

//create message producer

sender = session.createProducer(queue);

logger.trace("message producer created");

//start message delivery

connection.start();

logger.trace("connection started");

//using a text message

TextMessage message = session.createTextMessage(data);

sender.send(message);

logger.info("message sent");

}

catch(Exception e){

logger.error("Could not send message to queue");

System.out.println(e);

} finally {

if (connection != null) {

try {

connection.close();

logger.trace("connection closed");

} catch (JMSException e) {

e.printStackTrace();

System.out.println(e);

}

}

}

}

Document Location

Worldwide

[{"Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSVYEV","label":"IBM webMethods Integration"},"ARM Category":[{"code":"a8mKe00000000AQIAY","label":"Software AG Universal Messaging (NUM)"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Windows Server 2012"}],"Version":"10.1"},{"Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSFIWYE","label":"IBM webMethods B2B"},"ARM Category":[{"code":"a8mKe00000000AQIAY","label":"Software AG Universal Messaging (NUM)"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Windows Server 2012"}],"Version":"10.1"}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
20 March 2025

UID

ibm17211855