Troubleshoot Java JMS Clients
This topic contains descriptions of common errors that can occur when using the Java client and provides steps on how to prevent these errors.
Before You Begin
This procedure is part of Checklist: How to Build Java JMS Clients.
Note: Learn about supported browsers, operating systems, and platform versions in the Release Notes.
What Problem Are You Having?
- Kerberos challenge handler not working
- Expected messages are not being received for a queue or durable subscriber
Kerberos challenge handler not working
Cause: Kerberos challenge handlers might not work for one or more of the following reasons:
The client cannot connect to the Kerberos Domain Controller (KDC).
Solution: Ping the KDC from the computer running the client and the server hosting the Gateway. Also, ensure that you can Telnet to Kerberos port number 88 from both computers (telnet> open KDC-server-name 88).
The client cannot obtain a Kerberos ticket.
Solution: Test ticket acquisition by executing the following commands to ensure that the KDC is accessible and able to issue service tickets:
For Linux:
$ kinit -t /etc/keytab-name.keytab -S service-instance-name username@KDC-server-name
For Windows:
$ kinit username@KDC-server-name
The output will be:
Please enter the password for username@KDC-server-name:
Enter the password, and then enter:
$ klist
The ticket cache is displayed along with each ticket's expiration date.
Service name is in the incorrect format in the Kerberos challenge handler code.
Solution: The service name should be in the format: HTTP/servergw.hostname.com. See Creating Kerberos Challenge Handlers for examples.
The pop-up dialog in the client used to obtain user credentials does not ensure that the username format is correct.
Solution: Ensure that the result of the pop-up dialog used to obtain user credentials is formatted as
username@KDC-server-name.
Expected messages are not being received for a queue or durable subscriber
Cause: If expected messages are not being received for a queue or durable subscriber, then it could be because the application has received messages without acknowledging them. The Gateway will send a maximum of maximum.pending.acknowledgments messages until the client acknowledges. The maximum.pending.acknowledgments
property is set to 1 for JMS providers that do not support individual message acknowledgement.
Solution: If you are using a JMS provider other than Apache ActiveMQ or TIBCO Enterprise Message Service (TIBCO EMS), you must ensure your client applications acknowledge each message received from a queue or durable subscriber.