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 » Inquire Namelist Names with PCF ClassCastException

Post new topic  Reply to topic
 Inquire Namelist Names with PCF ClassCastException « View previous topic :: View next topic » 
Author Message
WannaBeInAParker
PostPosted: Tue Dec 07, 2004 11:19 am    Post subject: Inquire Namelist Names with PCF ClassCastException Reply with quote

Voyager

Joined: 09 Dec 2003
Posts: 81

All,

I am inquiring the names in a namelist using Java PCF Support Pac. I am getting a ClassCastException when trying to getStringParameter( CMQC.MQCA_NAMES) as demonstrated below:

if ( nNameCount > 0 )
{
//Get Namelist Names
try
{
strNames = pcfResponses[i].getStringParameterValue(
CMQC.MQCA_NAMES );
}
catch ( Exception e )
{
strResults = createErrorXML( strURL, "PCF Agent ERROR",
"Obtaining Namelist Names",
e.getMessage(), e.toString() );
e.printStackTrace();
}
} //if nNameCount > 0

The PCF Request is as follows:

pcfRequest = new PCFMessage( CMQCFC.MQCMD_INQUIRE_NAMELIST );
pcfRequest.addParameter( CMQC.MQCA_NAMELIST_NAME,
instrNamelist );
pcfRequest.addParameter( CMQCFC.MQIACF_NAMELIST_ATTRS,
new int [] { CMQCFC.MQIACF_ALL } );

try
{
pcfResponses = pcfAgent.send( pcfRequest );
}
catch ( Exception e )
{
strResults = createErrorXML( strURL, "PCF Agent ERROR",
"Sending Inquire Namelist",
e.getMessage(), e.toString() );
}

The StackTrace is:

java.lang.ClassCastException
at com.ibm.mq.pcf.PCFMessage.getStringParameterValue(PCFMessage.java:368)
at com.hicus.wassupmq.WorkCompleter.getNamelistN(WorkCompleter.java:7980)
at com.hicus.wassupmq.WorkCompleter.processCommand(WorkCompleter.java:13950)
at com.hicus.wassupmq.WorkProcessor.run(WorkProcessor.java:168)
at java.lang.Thread.run(Unknown Source)

I have searched the site and elsewhere and there were a lot of references to an incorrect CLASSPATH. I am able to inquire all other attributes of all other objects (qmgr, queues, channels, etc.) using the PCF Support Pac with the same CLASSPATH, so I do not believe that it is a classpath issue.

Any help is appreciated.
_________________
-WannaBe-
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Dec 07, 2004 2:33 pm    Post subject: Reply with quote

Grand High Poobah

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

Are you sure the return is of the right type and is not an array ??
Back to top
View user's profile Send private message Send e-mail
WannaBeInAParker
PostPosted: Tue Dec 07, 2004 4:16 pm    Post subject: Reply with quote

Voyager

Joined: 09 Dec 2003
Posts: 81

fjb_saper,

I think you got it. I overlooked the getStringListParameter method. I will try this and let you know the results.

Thanks
_________________
-WannaBe-
Back to top
View user's profile Send private message
WannaBeInAParker
PostPosted: Tue Dec 07, 2004 4:25 pm    Post subject: Reply with quote

Voyager

Joined: 09 Dec 2003
Posts: 81

fjb_saper,

Yes, that is it. Thanks for the help.
_________________
-WannaBe-
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 » Inquire Namelist Names with PCF ClassCastException
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.