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 » How to Connect to mq using Channel tab file in java

Post new topic  Reply to topic Goto page 1, 2, 3  Next
 How to Connect to mq using Channel tab file in java « View previous topic :: View next topic » 
Author Message
tapak
PostPosted: Fri Aug 25, 2006 9:48 am    Post subject: How to Connect to mq using Channel tab file in java Reply with quote

Centurion

Joined: 26 Oct 2005
Posts: 149
Location: Hartford,CT

The following link give an example.

http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzaw.doc/csqzaw1425.htm

But I dont have the option to pass the java.net.url object to the constructor as specified in the link. Is it only supported for Ver6 client .If yes , is there a way to do with ver5 client jars .

Here is the text from the link

Quote:

java.net.URL chanTab1 = new URL("file:///home/admdata/ccdt1.tab");
As another example, suppose the file ccdt2.tab contains a client channel definition table and is stored on a system that is different to the one on which the application is running. If the file can be accessed using the FTP protocol, the application can create a URL object in the following way:

java.net.URL chanTab2 = new URL("ftp://ftp.server/admdata/ccdt2.tab");
After the application has created a URL object, the application can create an MQQueueManager object using one of the constructors that takes a URL object as a parameter. Here is an example:

MQQueueManager mars = new MQQueueManager("MARS", chanTab2);

Back to top
View user's profile Send private message
tleichen
PostPosted: Fri Aug 25, 2006 10:08 am    Post subject: Reply with quote

Yatiri

Joined: 11 Apr 2005
Posts: 663
Location: Center of the USA

Hmmm... I just came across a similar problem with someone here on this subject. I'm not sure of the answer either, but want to take a ride on this one myself to see where it leads....
_________________
IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer
Back to top
View user's profile Send private message
tapak
PostPosted: Fri Aug 25, 2006 10:35 am    Post subject: Reply with quote

Centurion

Joined: 26 Oct 2005
Posts: 149
Location: Hartford,CT

Looks like it is only for Ver6 . I am not sure if there is an alternate way to do with Ver5.3 client jars.
Back to top
View user's profile Send private message
wschutz
PostPosted: Fri Aug 25, 2006 11:38 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

tapak wrote:
Looks like it is only for Ver6 . I am not sure if there is an alternate way to do with Ver5.3 client jars.
No, using client channel tables from Java is only supported in the V6 client.... but.... You don't need a V6 server, only the V6 client (which you can download free from the s/p site), and the V6 client will work wit the V5 server.
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
tapak
PostPosted: Fri Aug 25, 2006 12:27 pm    Post subject: Reply with quote

Centurion

Joined: 26 Oct 2005
Posts: 149
Location: Hartford,CT

Hi Wayne ,

Thanks for the info. Will there be an issue with installing a Ver6 client in a Ver53 server . I will be doing client connection from v53 machine to other v53 machines .

In case ,if it is a problem , can I just have the V6 jar files and try to use that in my classpath for the Java application in v53 machine .
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Aug 25, 2006 2:54 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

You can only use the V6 jars for client connection as you already have V5 installed. You will need to have the V6 jars installed in a different directory and have them in the right sequence on the classpath. (do not mix V5 and V6 jars on the classpath you might get into trouble).

Access in bindings will only work using your 5.3 jars.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
tapak
PostPosted: Mon Aug 28, 2006 9:11 am    Post subject: Reply with quote

Centurion

Joined: 26 Oct 2005
Posts: 149
Location: Hartford,CT

Hi fjb_saper

Thank you for the inputs .

I got the mq client6 jars .But I am getting mq error code 2278 while trying to use the channel table . Here is my code which gives error . I am trying to connect from windows to a solaris queue manager using client connection channel table.

java.net.URL chanTab1 = new URL("file:C:/deepak/chltab/AMQCLCHL.TAB");

qMgr = new MQQueueManager("qmname, chanTab1);
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Aug 28, 2006 9:38 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

try "file://C:/deepak/chltab/AMQCLCHL.TAB".

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
tapak
PostPosted: Mon Aug 28, 2006 10:37 am    Post subject: Reply with quote

Centurion

Joined: 26 Oct 2005
Posts: 149
Location: Hartford,CT

I tried that too. It looks like it is related to my mqv6 client . I am not able to connect to v53 using amqsputc .

Here is the error in the client and server .

Client Error

8/28/2006 14:28:48 - Process(3768.1) User(username (edited) Program(amqsputc.exe)
AMQ9202: Remote host '' not available, retry later.

EXPLANATION:
The attempt to allocate a conversation using to host '' was not successful.
However the error may be a transitory one and it may be possible to
successfully allocate a conversation later.
ACTION:
Try the connection again later. If the failure persists, record the error
values and contact your systems administrator. The return code from is 0
(X'0'). The reason for the failure may be that this host cannot reach the
destination host. It may also be possible that the listening program at host ''
was not running. If this is the case, perform the relevant operations to start
the listening program, and try again.


Server Error
08/28/06 02:22:47 PM
AMQ9209: Connection to host 'hostname (apaddrr edited)' closed.

EXPLANATION:
An error occurred receiving data from 'hostname (apaddrr edited)' over TCP/IP.
The connection to the remote host has unexpectedly terminated.
ACTION:
Tell the systems administrator.
----- amqccita.c : 2736 -------------------------------------------------------
08/28/06 02:22:47 PM
AMQ9228: The TCP/IP responder program could not be started.

EXPLANATION:
An attempt was made to start an instance of the responder program, but the
program was rejected.
ACTION:
The failure could be because either the subsystem has not been started (in this
case you should start the subsystem), or there are too many programs waiting
(in this case you should try to start the responder program later). The reason
code was 0.
Back to top
View user's profile Send private message
wschutz
PostPosted: Mon Aug 28, 2006 3:49 pm    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

tapak...I'm a little confused...are you trying to connect via the java client or the "c" client (since it looks like amqsputc is involved)... can you give your exact configuration (os' versions, csd , which clients you are using and whether there is a channel table involved or your are using MQSERVER)?
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
fjb_saper
PostPosted: Mon Aug 28, 2006 3:54 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

As well I hope you did not install the full V6 client on your V5 machine. That would be seriously messed up. I had said only V6 jars
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
tapak
PostPosted: Tue Aug 29, 2006 6:04 am    Post subject: Reply with quote

Centurion

Joined: 26 Oct 2005
Posts: 149
Location: Hartford,CT

Wayne ,

Listing down my server version. I installed mq v6 client to connect to v53 server using java client .It was not working. After that I tried amqsputc using the MQSERVER variable . I reinstalled MQClientv6 2 times to make sure that there was no issue with installation . But still I was getting the same error for amqsputc listed in my earlier post.

I reinstalled MQv53 and then amqsputc was working. By the way I was using hostname instead of IPaddress. Does that cause an issue with V6 client.

I will try using v6 jars as suggested by fjb_saper.

Name: WebSphere MQ
Version: 530.11 CSD11
CMVC level: p530-11-L050802
BuildType: IKAP - (Production)
Back to top
View user's profile Send private message
tapak
PostPosted: Tue Aug 29, 2006 7:28 am    Post subject: Reply with quote

Centurion

Joined: 26 Oct 2005
Posts: 149
Location: Hartford,CT

I installed mqver6 client before I got your message. I reinstalled mqv53 and tried setting the classpath to ver6 jar files for my java application.
Still I am getting the 2278 error .

Basically I added the following codes to the PCF Sample Code.

System.out.print ("Connecting to queue manager");
java.net.URL chanTab1 = new URL("file://C:/deepak/chltab/AMQCLCHL.TAB");
qMgr = new MQQueueManager("QMMQQA1", chanTab1);
// Convert the URL to a file object
agent = new PCFMessageAgent(qMgr);

Here is the mqv6 jar files I used.Code for setting the classpath and running my java program

@ECHO OFF
set CLASSPATH=

rem set MQ_JAVA_LIB=C:\Program Files\IBM\Websphere MQ\java\lib

set MQ_JAVA_LIB=C:\deepak\mq\mqv6jars\lib

set

CLASSPATH="%CLASSPATH%;%MQ_JAVA_LIB%\com.ibm.mq.jar;%MQ_JAVA_LIB%\connector.jar;%MQ_JAVA_LIB%\fscontext.jar;%MQ_JAVA_LIB

%\providerutil.jar;c:/deepak/javawork/pcf/com.ibm.mq.pcf.jar;"


echo %CLASSPATH%

java PCFMessageListQueueDepth

channel definition is proper as I tried using amqsputc after setting chanlib and chantab mq server variables.
SET MQCHLLIB=C:\deepak\chltab

SET MQCHLTAB=AMQCLCHL.TAB
Back to top
View user's profile Send private message
tapak
PostPosted: Tue Aug 29, 2006 7:47 am    Post subject: Reply with quote

Centurion

Joined: 26 Oct 2005
Posts: 149
Location: Hartford,CT

One more additional info which might help. I am using a Server Connection Channel with Blockip security exit.

I will try using a regular channel and see if it helps.
Back to top
View user's profile Send private message
tapak
PostPosted: Tue Aug 29, 2006 8:04 am    Post subject: Reply with quote

Centurion

Joined: 26 Oct 2005
Posts: 149
Location: Hartford,CT

using a regular channel didnt helped with my java program. I didnt test mqv6 client as I am on v53 client now.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2, 3  Next Page 1 of 3

MQSeries.net Forum Index » IBM MQ Java / JMS » How to Connect to mq using Channel tab file in java
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.