ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Triggered Java program hanging on AIX

Post new topic  Reply to topic
 Triggered Java program hanging on AIX « View previous topic :: View next topic » 
Author Message
seanb
PostPosted: Wed Jan 21, 2004 6:36 am    Post subject: Triggered Java program hanging on AIX Reply with quote

Apprentice

Joined: 02 Aug 2003
Posts: 39

Help!!

We are experiencing a problem whereby a Java program triggered by MQ is hanging when creating a MQ queue manager object. The offending line of code is:

qMgr = new MQQueueManager(qManager, MQC.MQCNO_STANDARD_BINDING);

I have verified the variable qManager contains the correct value.


The java program is run via a script file which contains the following:

#!/bin/sh
java -Djava.library.path=/usr/mqm/java/lib -classpath .:/usr/mqm/java/lib/com.ibm.mq.jar:/usr/mqm/java/lib/com.ibm.mqbind.jar:/usr/mqm/java/lib/connector.jar Test2 OURQUEUE BLAH OURQM

Test2 is the java program.


We are using MQ 5.3 CSD05 on AIX version 5.2 using Java version 1.3.1.

When we run the script from the command line, it works ok.
When we trigger the script on a Sun Solaris server using MQ 5.3 CSD05 using Java version 1.4 it works ok.
It currently works ok in production although on a different AIX server using MQ 5.1
When we trigger the script on the above AIX server the Java program hangs on the line mentioned above.


I have seen a similar post on this newsgroup where the java program hanged when the CLASSPATH pointed to an older com.ibm.mq.jar and the LD_LIBRARY_PATH pointed to the newer version. While our environment variables point to different locations, we don't think this a problem for a couple reasons:

- we specify the class path and library path on the java command in the script
- all the jar files and .so files are in the same directory as part of the standard MQ installation
- we'd expect to experience the same problem when running the script from the command line



We have run a java trace as follows:

03:05:49 [1074719149521] Thread: main, Object: com.ibm.mq.MQQueueManager@3ffb206e ==> MQManagedObject constructor() entry
03:05:49 [1074719149541] Thread: main, Object: com.ibm.mq.MQQueueManager@3ffb206e @(#) javabase/com/ibm/mq/MQManagedObject.java, java, j5304, j5304-L030506.2 03/05/02 15:09:29
03:05:49 [1074719149545] Thread: main, Object: com.ibm.mq.MQQueueManager@3ffb206e <== MQManagedObject constructor() exit
03:05:49 [1074719149545] Thread: main, Object: com.ibm.mq.MQQueueManager@3ffb206e ==> MQQueueManager constructor (MQCONNX)() entry
03:05:49 [1074719149545] Thread: main, Object: com.ibm.mq.MQQueueManager@3ffb206e javabase/com/ibm/mq/MQQueueManager.java, java, j5304, j5304-L030506.2 03/05/02 15:10:37 @(#) 1.61.2.1
03:05:49 [1074719149548] Thread: main Class: *** BuildInfo *** WebSphere MQ classes for Java (5.304)
03:05:49 [1074719149548] Thread: main Class: *** BuildInfo *** j5304-05-030915 (Production)
03:05:49 [1074719149548] Thread: main, Object: com.ibm.mq.MQQueueManager@3ffb206e ==> construct() entry
03:05:49 [1074719149548] Thread: main ==> MQQueueManager::obtainBaseMQQueueManager (Java 1.1 version() entry
03:05:49 [1074719149549] Thread: main ==> MQEnvironment::getDefaultProperty - transport() entry
03:05:49 [1074719149549] Thread: main <== MQEnvironment::getDefaultProperty - transport() exit
03:05:49 [1074719149549] Thread: main ==> MQEnvironment::getDefaultProperty - hostname() entry
03:05:49 [1074719149549] Thread: main <== MQEnvironment::getDefaultProperty - hostname() exit
03:05:49 [1074719149550] Thread: main ==> MQEnvironment::getDefaultProperty - SSL Cipher Suite() entry
03:05:49 [1074719149550] Thread: main <== MQEnvironment::getDefaultProperty - SSL Cipher Suite() exit
03:05:49 [1074719149554] Thread: main, Object: com.ibm.mq.MQBindingsManagedConnectionFactoryJ11@2e48a06e ==> MQBindingsManagedConnectionFactoryJ11 constructor() entry
03:05:49 [1074719149554] Thread: main, Object: com.ibm.mq.MQBindingsManagedConnectionFactoryJ11@2e48a06e <== MQBindingsManagedConnectionFactoryJ11 constructor() exit
03:05:49 [1074719149555] Thread: main ==> Uninitialized object::BindingsConnectionRequestInfo constructor() entry
03:05:49 [1074719149575] Thread: main ==> MQEnvironment::getDefaultProperty - Thread access() entry
03:05:49 [1074719149575] Thread: main <== MQEnvironment::getDefaultProperty - Thread access() exit
03:05:49 [1074719149575] Thread: main ==> MQEnvironment::getDefaultProperty - Group() entry
03:05:49 [1074719149576] Thread: main <== MQEnvironment::getDefaultProperty - Group() exit
03:05:49 [1074719149576] Thread: main ==> MQEnvironment::getDefaultProperty - Thread affinity() entry
03:05:49 [1074719149576] Thread: main <== MQEnvironment::getDefaultProperty - Thread affinity() exit
03:05:49 [1074719149576] Thread: main ==> MQEnvironment::getDefaultProperty - userID() entry
03:05:49 [1074719149576] Thread: main <== MQEnvironment::getDefaultProperty - userID() exit
03:05:49 [1074719149576] Thread: main ==> MQEnvironment::getDefaultProperty - password() entry
03:05:49 [1074719149576] Thread: main <== MQEnvironment::getDefaultProperty - password() exit
03:05:49 [1074719149577] Thread: main ==> MQEnvironment::getDefaultProperty - SPI() entry
03:05:49 [1074719149577] Thread: main <== MQEnvironment::getDefaultProperty - SPI() exit
03:05:49 [1074719149577] Thread: main ==> MQEnvironment::getDefaultProperty - Bindings Authentication() entry
03:05:49 [1074719149588] Thread: main <== MQEnvironment::getDefaultProperty - Bindings Authentication() exit
03:05:49 [1074719149589] Thread: main, Object: com.ibm.mq.BindingsConnectionRequestInfo@0 <== BindingsConnectionRequestInfo constructor() exit
03:05:49 [1074719149589] Thread: main, Object: com.ibm.mq.MQSimpleConnectionManager@415ba06e ==> allocateConnection() entry
03:05:49 [1074719149589] Thread: main, Object: com.ibm.mq.ManagedConnectionStore@5f32a06e ==> chooseOne() entry
03:05:49 [1074719149590] Thread: main, Object: com.ibm.mq.ManagedConnectionStore@5f32a06e <== chooseOne() exit
03:05:49 [1074719149591] Thread: main, Object: com.ibm.mq.StoredManagedConnection@19a9206e ==> StoredManagedConnection constructor() entry
03:05:49 [1074719149594] Thread: main, Object: com.ibm.mq.MQBindingsManagedConnectionFactoryJ11@2e48a06e ==> _createManagedConnection() entry
03:05:49 [1074719149597] Thread: main, Object: com.ibm.mq.MQManagedConnectionJ11@52ca06e ==> MQManagedConnection constructor() entry
03:05:49 [1074719149601] Thread: main Class: MQSESSIONServer getMQSESSION() - retrieving MQSESSION...
03:05:49 [1074719149605] Thread: main Class: MQSESSION javabase/com/ibm/mq/server/MQSESSION.java, java, j5304, j5304-05-030903 03/07/03 14:26:00 @(#) 1.64.1.3
03:05:49 [1074719149605] Thread: main ==> MQSESSION::getLibraryPath() entry
03:05:49 [1074719149606] Thread: main Class: MQSESSION path ''
03:05:49 [1074719149606] Thread: main <== MQSESSION::getLibraryPath() exit
03:05:49 [1074719149606] Thread: main ==> MQSESSION::getLibraryName() entry
03:05:49 [1074719149606] Thread: main <== MQSESSION::getLibraryName() exit
03:05:49 [1074719149606] Thread: main ==> MQSESSION::loadLib() entry
03:05:49 [1074719149606] Thread: main Class: MQSESSION Load this library: 'mqjbnd05'

As you can see it all appears ok until trying to load mqjbnd05. This sounds suspiciously similar to the other problem mentioned in the newsgroup but it doesn't explain why it works using the command line but not via triggering.

We are also considering moving to java 1.4 instead of 1.3.1 but don't expect this will solve our problem.


Has anyone experienced similar problems or does anyone have some ideas/suggestions. We have run out.

Thanks,
Sean
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Jan 21, 2004 6:44 am    Post subject: Re: Triggered Java program hanging on AIX Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

kazak wrote:
As you can see it all appears ok until trying to load mqjbnd05. This sounds suspiciously similar to the other problem mentioned in the newsgroup but it doesn't explain why it works using the command line but not via triggering.


And the other problem mentioned in this forum was likely a PATH or CLASSPATH error.

Which does explain why it works via command line but not via triggering.

The PATH and CLASSPATH that are in effect in a triggering situation are the PATH and CLASSPATH that are effective for the trigger monitor, which are likely very different than those that are effective when you personally log in and run something from the command line.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
JasonE
PostPosted: Wed Jan 21, 2004 7:18 am    Post subject: Reply with quote

Grand Master

Joined: 03 Nov 2003
Posts: 1220
Location: Hursley

Apparently this is an issue with 5.3 on AIX and a fix went in (IY43961 - http://www-1.ibm.com/support/search.wss?apar=include&q=IY43961) in csd04 but you need to set an environment variable in the shell where you start the trigger monitor from -
Quote:
export AMQ_NO_SIGWAIT_SIGTRAP=1
Back to top
View user's profile Send private message
seanb
PostPosted: Fri Jan 23, 2004 10:17 pm    Post subject: Reply with quote

Apprentice

Joined: 02 Aug 2003
Posts: 39

Exporting the variable has solved our problem. Thanks heaps.

(We have also cleaned up our PATH variables to ensure we don't have any other unexpected problems).
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Triggered Java program hanging on AIX
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.