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 » code that work in 5.2 but doesn't in 5.3 or 6.0

Post new topic  Reply to topic
 code that work in 5.2 but doesn't in 5.3 or 6.0 « View previous topic :: View next topic » 
Author Message
KEBlake
PostPosted: Tue Jun 20, 2006 2:39 pm    Post subject: code that work in 5.2 but doesn't in 5.3 or 6.0 Reply with quote

Newbie

Joined: 20 Jun 2006
Posts: 6

If someone can give me a clue on something to search on I will happily keep searching however I have not managed to find anything in the last 2 hours so I have resorted to actually posting my question.

We wanted to upgrade from 5.2 and had installed 5.3 to our test box. Both Prod and Test are running Win2k.
After we installed 5.3 we began getting AMQ9502 The operation requested cannot be performed on channel 'BRIDGE02.TO.HFC
I tested the configuration with the API Exerciser and it worked.

I got side tracked and just got back to this project this week. I wiped 5.3 off the Test box and loaded 6.0 and reconfigured from scratch.
Same errors.

Our code was written 4years ago by somone who didn't really understrand MQ, and I only scratch the surface of java.

Can anyone point in me in the right direction on what changed that would cause this so I can get the problem fixed?

I appreciate any help I can get!


Kevin E Blake
Highlights for Children
Applications Development

The secret to creativity is knowing how to hide your sources.
- Albert Einstein
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Jun 20, 2006 2:43 pm    Post subject: Reply with quote

Grand High Poobah

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

We need: platform /os = windows
MQ version = 6.0
CSD/RF/FP (CSD, refresh pack, fix pack) = ?
Error code and reason code?
Explain does not work.....

Thanks
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
wschutz
PostPosted: Tue Jun 20, 2006 3:55 pm    Post subject: Reply with quote

Jedi Knight

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

What type of channel is: 'BRIDGE02.TO.HFC and when / where are you seeing the AMQ9502 error?
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
KEBlake
PostPosted: Wed Jun 21, 2006 5:32 am    Post subject: Reply with quote

Newbie

Joined: 20 Jun 2006
Posts: 6

Details, Details.

BRIDGE02.TO.HFC is a sender channel.
MQ Version 6.0.0.0


From the log of the java program:
catalog main order=19369251 nbrshiptos=1
before QueueHome qh = QueueHome.Get();
before orderQueue = new RRQueue( ORDER_PROP_NAME );
ORDER_PROP_NAME = mq_order.properties
host = 192.168.1.142
channel = BRIDGE02.TO.HFC
host = 192.168.1.142
queueMgr = HFCO400 (remote queue manager)
queueName = REQUEST.STAGING02 (Remote Queue)
openForInput = false
host = 192.168.1.142
channel = BRIDGE02.TO.HFC
host = 192.168.1.142
queueMgr = BRIDGE02 ((Local Queue Manager)
queueName = RESPONSE.STAGING02 ((Local Queue)
openForInput = true
after orderQueue = new RRQueue( ORDER_PROP_NAME );
before orderQueue.connect();
Connect called on REQUEST.STAGING02
MQEnvironment.hostname = 192.168.1.142
MQEnvironment.channel = BRIDGE02.TO.HFC
MQEnvironment.port = 1414
queueMgr=HFCO400 (see below for java executing at this point)
1327250 [Thread-13] ERROR com.mmlive.custom.highlights.queues.Connector - ERROR
com.ibm.mq.MQException: MQJE001: An MQException occurred: Completion Code 2, Reason 2009
MQJE016: MQ queue manager closed channel immediately during connect
Closure reason = 2009
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:212)
at com.ibm.mq.MQClientManagedConnectionFactoryJ11._createManagedConnection(MQClientManagedConnectionFactoryJ11.java:318)
at com.ibm.mq.MQClientManagedConnectionFactoryJ11.createManagedConnection(MQClientManagedConnectionFactoryJ11.java:338)
at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.java:84)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManager.java:168)
at com.ibm.mq.MQQueueManagerFactory.obtainBaseMQQueueManager(MQQueueManagerFactory.java:772)
at com.ibm.mq.MQQueueManagerFactory.procure(MQQueueManagerFactory.java:697)
at com.ibm.mq.MQQueueManagerFactory.constructQueueManager(MQQueueManagerFactory.java:657)
at com.ibm.mq.MQQueueManagerFactory.createQueueManager(MQQueueManagerFactory.java:153)
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:451)
at com.mmlive.custom.highlights.queues.Connector.connect(Connector.java:106)
at com.mmlive.custom.highlights.queues.RRQueue.connect(RRQueue.java:200)
at com.mmlive.custom.highlights.queues.QueueHome.init(QueueHome.java:52)
at com.mmlive.custom.highlights.queues.QueueHome.<init>(QueueHome.java:31)
at com.mmlive.custom.highlights.queues.QueueHome.<clinit>(QueueHome.java:24)
at com.mmlive.orderarchive.CatalogOrderExporter.processOrder(CatalogOrderExporter.java:205)
at com.mmlive.orderarchive.CatalogOrderExporter.run(CatalogOrderExporter.java:166)



Java executimf just prior to error:
public String connect() throws QueueException {

logger.info( "Connect called on " + this.getQueueName() );
String result = null;

try {
if (isConnected()) {
throw new QueueException( "QUEUE_EXCEPTION.ALREADY_CONNECTED", "Already connected" );
}

// Set up MQ environment
MQEnvironment.hostname = host; // Could have put the hostname & channel
MQEnvironment.channel = channel; // string directly here!
MQEnvironment.port = 1414;

System.out.println("queueMgr="+queueMgr);
// Create a connection to the queue manager
qMgr = new MQQueueManager(queueMgr);

// Set up the options on the queue we wish to open...
// Note. All MQ Options are prefixed with MQC in Java.

int openOptions;
if (isOpenForInput()) {
openOptions = MQC.MQOO_INPUT_SHARED | MQC.MQOO_OUTPUT | MQC.MQOO_BROWSE;
queue =
qMgr.accessQueue( queueName,
openOptions,
null, // default q manager
null, // no dynamic q name
null); // no alternate user id
}
else {
openOptions = MQC.MQOO_OUTPUT;
queue =
qMgr.accessQueue( queueName,
openOptions,
"HFCO400", // default q manager
null, // no dynamic q name
null); // no alternate user id
}

// Now specify the queue that we wish to open, and the open options...
//System.out.println("queueName="+queueName);
//System.out.println("openOptions="+openOptions);
//queue =
// qMgr.accessQueue( queueName,
// openOptions,
// null, // default q manager
// null, // no dynamic q name
// null); // no alternate user id

connected = true;
result = "Connectd to queue: " + queueName;
}
catch (QueueException e) {
logger.error( "ERROR", e );
throw e;
}
catch (Exception e) {
logger.error( "ERROR", e );
throw new QueueException( "QUEUE_EXCEPTION", e.getMessage() );
}
return result;
}



And from the MQ err log:
AMQ9502: Type of channel not suitable for action requested.

EXPLANATION:
The operation requested cannot be performed on channel 'BRIDGE02.TO.HFC'. Some
operations are only valid for certain channel types. For example, you can only
ping a channel from the end sending the message.
ACTION:
Check whether the channel name is specified correctly. If it is check that the
channel has been defined correctly.
----- amqrmsaa.c : 1090 -------------------------------------------------------
6/20/2006 17:44:48 - Process(876.2309) User(MUSR_MQADMIN) Program(amqrmppa.exe)
AMQ9999: Channel program ended abnormally.

EXPLANATION:
Channel program 'BRIDGE02.TO.HFC' ended abnormally.
ACTION:
Look at previous error messages for channel program 'BRIDGE02.TO.HFC' in the
error files to determine the cause of the failure.


please let me know if you need to know anything else.
Everything has been pretty stable for the last few years so my MQ skills have gotten out of date.


Kevin E Blake
Highlights for Children
Applications Development

The secret to creativity is knowing how to hide your sources.
- Albert Einstein
Back to top
View user's profile Send private message
wschutz
PostPosted: Wed Jun 21, 2006 5:42 am    Post subject: Reply with quote

Jedi Knight

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

Sender channel? as in chltype(sdr) ? If you're using it this way, it MUST be a SVRCONN channel... that was true back in v5.2 also.
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
KEBlake
PostPosted: Wed Jun 21, 2006 9:26 am    Post subject: Reply with quote

Newbie

Joined: 20 Jun 2006
Posts: 6

Thats odd. We are running this exact same code in production which is running 5.2
the only differences are the names of the channels and queues.

oh well I will recreate this as SVRCONN channel and let you know what happens.

thanks!
Back to top
View user's profile Send private message
KEBlake
PostPosted: Fri Jun 23, 2006 11:06 am    Post subject: Reply with quote

Newbie

Joined: 20 Jun 2006
Posts: 6

I deleted BRIDGE02.TO.HFC and recreated as a SVRCONN channel.
When I ran the java program I received:
MQJE001: An MQException occurred: Completion Code 2, Reason 2058
MQJE036: Queue manager rejected connection attempt

So I don't think this is the answer.

I want to describe a little more detail how we are using MQ:
On the Windows machine:
BRIDGE02.TO.HFC is a sender channel whose connection is an IP address of our AS.400 server
HFC.TO.BRIDGE02 is a receiver channel from our AS/400

On our AS/400
We have the exact opposite:
Bridge02.TO.HFC is the receiver channel
HFC.TO.BRIDGE02 is the sender channel with a local DNS pointing to the windows machine.

We have a remote queue on the windows machine that is local to the AS/400(RESPONE.STAGING02)

We also have a remote queue on the AS/400 that is local to the windows box.(REQUEST.STAGING02)

The windows machine drops a message into the remote queue(REQUEST.STAGING02)

After the AS/400 processes the message it respondes by droping a message in its remote queue(RESPONE.STAGING02)

We purchased MQ has part of the Web integration or our online store to our fulfillment system.
So the website drops an order to the AS/400 and after loading that order and verifying inventory it responds back to the website.
If it is a valid response the website then sends the payment information
after loading this information the AS/400 sends a final all processed message.

I hope this helps me find a solution.
I am currently trying to find an old install disk for 5.2 to put the staging machine back to that level to verify that it is still working as it does in Production.

Thanks for any additional help!
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Jun 23, 2006 1:59 pm    Post subject: Reply with quote

Grand High Poobah

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

OK this is what looks wrong with your code.
a) you need to connect to the Windows QMGR
b) the sdr channel to the AS400 is NOT the one to use. Create your own SVRCONN channel on the windows qmgr
c) hostname/IP, channel(svrconn), port# and qmgrname should be that on the windows machine.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
KEBlake
PostPosted: Mon Jun 26, 2006 4:43 am    Post subject: Reply with quote

Newbie

Joined: 20 Jun 2006
Posts: 6

Please forgive me if this an ignorant question, but if I have to change these basic settings, why is that when I use the API execiser I connect to the windows qmgr, open the request.staging02 queue and drop in a message and it goes to the AS/400 as I would expect?

Sorry to be a PITA I am just trying to figure this all out.

thanks,
Kevin Blake
Back to top
View user's profile Send private message
KEBlake
PostPosted: Mon Jun 26, 2006 4:48 am    Post subject: Reply with quote

Newbie

Joined: 20 Jun 2006
Posts: 6

Not sure if it matters but I do have a svrconn channel named BRIDGE02.TCP


(should probably have mentioned this easlier. )
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 » code that work in 5.2 but doesn't in 5.3 or 6.0
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.