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 » WSAD MQ error

Post new topic  Reply to topic Goto page 1, 2  Next
 WSAD MQ error « View previous topic :: View next topic » 
Author Message
googledev
PostPosted: Wed Jul 07, 2004 6:30 pm    Post subject: WSAD MQ error Reply with quote

Novice

Joined: 02 Jul 2004
Posts: 14

I've a simple java program which connects to MQ Server and puts a message in the queue. When i run the program outside WSAD(in command prompt) program runs fine and connects to MQ Server without any error. When i run the same program using WSAD(this program is a part of my application) an error occurs[reason code 2009] when i try to create the QueueManager. Am i missing any setting in WSAD?

I;m using WSAD 5.1 and MQ 5.3

I do not have access to my code and error message right now, i'll post it when i've it.

Thanks in advance
Back to top
View user's profile Send private message
amittalekar
PostPosted: Thu Jul 08, 2004 4:52 am    Post subject: Reply with quote

Disciple

Joined: 03 Apr 2002
Posts: 166
Location: VA, USA

U have to define JMS provider options (ie QueueConnectionFactory & Queue) in WSAD.

Are u creating Qmanager using your application?
Back to top
View user's profile Send private message Yahoo Messenger
googledev
PostPosted: Thu Jul 08, 2004 5:33 am    Post subject: Reply with quote

Novice

Joined: 02 Jul 2004
Posts: 14

Can you please let me know how to do these setting for MQ in WSAD?

Thanks in advance!


Here is the code and error

CODE:

String nodeID = "tsys.gcb-us-hosts.domain.com";
String channelName = "FILENET.CLIENT";
int portNumber = 1414;
String qmgrName = "CSQ1";
String fromFileNetQueue = "GCIF.REQ.FROM.FILENET";
MQQueueManager mQueueManager;

Hashtable mqProps = new Hashtable();
mqProps.put( MQC.CHANNEL_PROPERTY, channelName );
mqProps.put( MQC.HOST_NAME_PROPERTY, nodeID );
mqProps.put( MQC.PORT_PROPERTY, new Integer ( portNumber ) );

log.debug( "Server Node ID = " + nodeID );
log.debug( "Channel Name to Server = " + channelName );
log.debug( "Server Port Number = " + portNumber );
Integer intCorrelationId = new Integer(random.nextInt());
String correlationId = intCorrelationId.toString();
System.out.println("correlationId : "+ correlationId + "correlationId.getBytes() : " + correlationId.getBytes());

mQueueManager = new MQQueueManager( qmgrName, mqProps );

System.out.println("Connected to QMGR " + mQueueManager);


ERROR:
[7/8/04 9:29:50:234 EDT] 33b14d4e SystemOut O Server Node ID = tsys.gcb-us-hosts.domain.com
[7/8/04 9:29:50:234 EDT] 33b14d4e SystemOut O Channel Name to Server = FILENET.CLIENT
[7/8/04 9:29:50:234 EDT] 33b14d4e SystemOut O Server Port Number = 1414
[7/8/04 9:29:50:234 EDT] 33b14d4e SystemOut O correlationId : 1036177865correlationId.getBytes() : [B@75274d4f
[7/8/04 9:29:51:476 EDT] 33b14d4e SystemOut O MQ Error - Reason code :2009
[7/8/04 9:29:51:476 EDT] 33b14d4e SystemErr R MQJE001: An MQException occurred: Completion Code 2, Reason 2009
MQJE025: Channel closed after two initial changes. Closure reason {0}
MQJE001: Completion Code 2, Reason 2009


Last edited by googledev on Thu Jul 08, 2004 5:42 am; edited 1 time in total
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Jul 08, 2004 5:36 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Are you running something within the WebSphere Test Environment, or as a standalone application from within WSAD?

That is, are you using the "Run as Application" menu option , or "Run on Server" menu option?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
googledev
PostPosted: Thu Jul 08, 2004 5:39 am    Post subject: Reply with quote

Novice

Joined: 02 Jul 2004
Posts: 14

I'm using "Run on Server" option. Does it make a difference????
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Jul 08, 2004 5:59 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

googledev wrote:
I'm using "Run on Server" option. Does it make a difference????


How are you then managing to run it outside WSAD? What, exactly, is your program - a stand alone application, an applet, a servlet, a bean...?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
googledev
PostPosted: Thu Jul 08, 2004 6:03 am    Post subject: Reply with quote

Novice

Joined: 02 Jul 2004
Posts: 14

I just made a sample java program using this code and ran it in command prompt, it connected to MQ. My program is a bean which is trying to connect to MQ and put a message in the queue.
Back to top
View user's profile Send private message
googledev
PostPosted: Thu Jul 08, 2004 6:27 am    Post subject: Reply with quote

Novice

Joined: 02 Jul 2004
Posts: 14

I got it working !!! All i did was set the varaible MQ_INSTALL_ROOT to nothing in my server settings. Thanks all for your help and time.
Back to top
View user's profile Send private message
bower5932
PostPosted: Thu Jul 08, 2004 1:34 pm    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

My guess would be that you have multiple copies of the mq jar files on your system and you were getting a mismatch. I've seen different versions cause 2009s among themselves.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
kirani
PostPosted: Thu Jul 08, 2004 10:37 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

praveenraju wrote:

I also want to write a pura java program (without using JMS and all that). to put one message in another machine which has the MQseries..

See this thread,
http://www.mqseries.net/phpBB2/viewtopic.php?t=16352
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
googledev
PostPosted: Fri Jul 09, 2004 5:35 am    Post subject: Reply with quote

Novice

Joined: 02 Jul 2004
Posts: 14

To set the MQ_INSTALL_PATH in WSAD 5,

click on "Web Prespective"
go to "Server Configuration" tab
Double click on your server name - this opens server properties
Click on "Variables" tab
Browse for MQ_INSTALL_PATH variable and edit it to appropriate path. I set it to nothing it worked for me!
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Jul 09, 2004 10:18 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

This really probably isn't what you want to do.

If you are having a classpath problem, which this would indicate, then you should adjust the classloader settings for your particular, INDIVIDUAL application, rather than hosing up the entire server to fit one application's needs.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Jul 09, 2004 2:52 pm    Post subject: Reply with quote

Grand High Poobah

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

Send us both the classpath you are using and the former content of MQ_INSTALL_ROOT as you had it defined on WAS before blanking it out...

Something is decidedly wrong with your setup. You should not have to define this outside of WAS.

Before you go a different way, I'd say try and fix what was wrong instead of doing a workaround.

I totally agree with Jeff. This should be resolved within WAS if possible.
I suspect that you did have something wrong in your MQ_INSTALL_ROOT.

F.J.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » IBM MQ Java / JMS » WSAD MQ error
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.