Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Authentication error when using JMS service

Avatar

Level 2

I'm currently trying to send String messages from LiveCycle to Websphere MQ (Both running on the same server), but I'm having some problems...

I''m quite sure that my WAS setup is correct (or at least close to correct) because I've build some test Java classes that are able to put and get messages from MQ using JMS. However, when I'm usng the LiveCycle JMS service I get the following exception thrown:

[5/26/10 17:46:44:705 CAT] 00000027 QueueMessageS A com.adobe.livecycle.jms.QueueMessageSender sendMessageToQueueWithProperties Error occurred when creating queue connection. Reason: MQJMS2013: invalid security authentication supplied for MQQueueManager.

Since I'm not a Websphere fundi I trawled through Google and was able to figure out that the problem probably lies with the configuration of my queue connection factory. Changing the transport type from "Bindings" to "Client" didn't resolve the problem and I'm rapidly running out of good ideas. Hopefully somebody here would be able to help.

The following info might be useful:

  • OS = Windows Server 2003
  • I'm using WAS 6.1.0.29
  • Websphere MQ is running on the same machine (v6.0)
  • I've used the Websphere MQ JMS Provider that comes with WAS
  • I've configured a Queue Connection Factory and a Queue in the server scope
  • No SSL or anything like that is set up yet

I did notice that when configuring the Queue there is a section titled "WebSphere MQ Queue Connection Properties" where I am able to specify a user Id and password. However, nothing seemed to work. I tried my WAS administration user name, as well as a windows user who is indeed a member of the mqm group. Also tried it without any value, but no luck

On the MQ side I couldn't really find any settings under either the Queue Manager or the Channel that would make much of a difference. Since I was able to access the queues using a servlet deployed on the same WAS instance I'm thinking it has something to do with the way that LC call the JMS provider. But to be honest, I don't really have a clue.

Any help would be much appreciated.

Greg

3 Replies

Avatar

Level 2

Haven't solved the problem yet, but here's an update:

I created an "ExecureScript" operation that contains simple Java code to write a message to MQ using the same JMS connection factory and JMS queue. It does work correctly, so clearly my setup it correct enough to send messages from LiveCycle to MQ via JMS.

Here's the code for the ExecuteScript:

//import the classes that the script references
import java.util.List;
import java.lang.String;
import java.util.Map;
import java.util.HashMap;
import javax.jms.*;
import javax.naming.*;

//get a list of file names that are stored in the process variable named files
String strMessage = patExecContext.getProcessDataStringValue("/process_data/@strMessage");

//get connection factory
String strQcf = patExecContext.getProcessDataStringValue("/process_data/@strQcf");

//get queue
String strQ = patExecContext.getProcessDataStringValue("/process_data/@strQ");

try
{
    // Look up administered objects
    System.out.println("Looking up administered objects...");
    InitialContext initContext;
    initContext = new InitialContext();
    QueueConnectionFactory factory = (QueueConnectionFactory) initContext.lookup(strQcf);
    Queue queue = (Queue) initContext.lookup(strQ);           
    initContext.close();
           
      // Create JMS objects
      System.out.println("Creating JMS objects...");
      QueueConnection connection = factory.createQueueConnection();
      QueueSession session =    connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
    QueueSender sender = session.createSender(queue);
           
      //Send messages
      TextMessage message = session.createTextMessage(strMessage);
      sender.send(message);

       //Exit
       System.out.println("Exiting...");
       connection.close();
       System.out.println("Goodbye!");   
} catch (Exception e)
    {
        e.printStackTrace();
    }

Interestingly I don't provide any authentication information and yet LC is able to connect to MQ

Cheers

Avatar

Level 2

After a lot of wrestling forwards and backwards, the answer seems rediculously simple. Of course, in the process I had to improve my knowledge of MQ, WAS and JMS quite a bit. The short answer is as follows:

Ensure your JMS service is configured correctly in LiveCycle. Go to the components view, open the "service coniguration" for the JMS service and check that the "connection user name" and "Connection password" are correct. The correct value will depend on how you've set up MQ. In my case the solution is currently to just leave both values empty. The idea of creating an "Execute script" operation was actually the clincher because once I knew LC does indeed talk to MQ via JMS, I immediately saw where the problem lay (well, almost immediately)

Once I've played around with the various options in MQ it'll probably make sense to write up a blog posting for the next person who gets stuck.

Avatar

Level 5

Hi Greg,

Seeking for information around the forum I fell into your post which was very helpful. Please continue with the idea of posting your resolution on a blog and update this thread to help the others.

Thanks!

Diego