|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Inquire Namelist Names with PCF ClassCastException |
« View previous topic :: View next topic » |
Author |
Message
|
WannaBeInAParker |
Posted: Tue Dec 07, 2004 11:19 am Post subject: Inquire Namelist Names with PCF ClassCastException |
|
|
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 |
|
 |
fjb_saper |
Posted: Tue Dec 07, 2004 2:33 pm Post subject: |
|
|
 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 |
|
 |
WannaBeInAParker |
Posted: Tue Dec 07, 2004 4:16 pm Post subject: |
|
|
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 |
|
 |
WannaBeInAParker |
Posted: Tue Dec 07, 2004 4:25 pm Post subject: |
|
|
Voyager
Joined: 09 Dec 2003 Posts: 81
|
fjb_saper,
Yes, that is it. Thanks for the help. _________________ -WannaBe- |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|