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 » Java PCF question using the MSOB pcf files

Post new topic  Reply to topic
 Java PCF question using the MSOB pcf files « View previous topic :: View next topic » 
Author Message
ping master
PostPosted: Thu Feb 27, 2003 11:46 am    Post subject: Java PCF question using the MSOB pcf files Reply with quote

Centurion

Joined: 20 Sep 2002
Posts: 116
Location: USA

Anyone know what the error for this is I am obviously running the ListQManagerAttrs program that came with the MSOB pcf classes from IBM support pac. on mq 5.3 /XP ---I'm thinking it means codepages 437??????? what is that???

C:\javasrc>java ListQManagerAttrs
Usage:
java ListQManagerAttrs queue-manager
java ListQManagerAttrs host port channel

C:\javasrc>java ListQManagerAttrs QUEUEMGR1
Connecting to local queue manager QUEUEMGR1... Connected.
Sending PCF request... Received reply.
Queue manager attributes:
java.io.UnsupportedEncodingException: Cp437
Back to top
View user's profile Send private message
mrlinux
PostPosted: Thu Feb 27, 2003 11:59 am    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

Well MQSeries Server version 5.3 on XP, I dont believe that IBM is supporting it at this point, I could be wrong.
_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
ping master
PostPosted: Thu Feb 27, 2003 12:13 pm    Post subject: Reply with quote

Centurion

Joined: 20 Sep 2002
Posts: 116
Location: USA

Yes IBM is supporting it XP MQ 5.3 and has released the production version,
I believe this has to do with my JRE/SDK...

1.3.1_01JRE
1.4.1_01SDK(noJRE installed)

anyone..
Bueller...
anyone...
Back to top
View user's profile Send private message
mrlinux
PostPosted: Thu Feb 27, 2003 12:24 pm    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

Well then that said, the issue is codepage, it appears that one of the fields in your PCF Message field isnt encoded correctly, IE maybe a numeric field contains data or vice versa. If you post your code it might help.
_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
kolban
PostPosted: Thu Feb 27, 2003 9:38 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

See the following
http://www.mqseries.net/phpBB/viewtopic.php?topic=114&forum=12

You need to add the i18n.jar file to your CLASSPATH[/url]
Back to top
View user's profile Send private message
ping master
PostPosted: Fri Feb 28, 2003 6:52 am    Post subject: Reply with quote

Centurion

Joined: 20 Sep 2002
Posts: 116
Location: USA

Thanks guys, I added i18n.jar to my Classpath and this is now what I am getting..

C:\javasrc>java ListQueueNames QueueMgr1

Connecting to local queue manager QueueMgr1... Connected.
Sending PCF request... Received reply.
Queue names:
Exception in thread "main" java.lang.NoSuchFieldError: byteToCharTable
at sun.io.ByteToCharCp437.<init>(ByteToCharCp437.java:31)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Unknown Source)
at sun.io.Converters.newConverter(Unknown Source)
at sun.io.Converters.newConverter(Unknown Source)
at sun.io.ByteToCharConverter.getConverter(Unknown Source)
at java.io.InputStreamReader.<init>(Unknown Source)
at com.ibm.mq.MQMessage.readConvertedString(MQMessage.java:958)
at com.ibm.mq.MQMessage.readString(MQMessage.java:877)
at com.ibm.mq.pcf.MQCFSL.initialize(MQCFSL.java:222)
at com.ibm.mq.pcf.MQCFSL.<init>(MQCFSL.java:159)
at ListQueueNames.main(ListQueueNames.java:61)


Here is the code from IBM:


Code:


import java.io.*;
import com.ibm.mq.*;
import com.ibm.mq.pcf.*;

/**
 * PCF example class showing use of PCFAgent and com.ibm.mq.pcf structure types
 * to generate and parse a PCF query. Note that the list of queue names returned
 * includes the dynamic queue used by the PCFAgent; the name of this queue is
 * accessible as the replyQueueName field of the PCFAgent object.
 *
 * @author Chris Markes
 */

public class ListQueueNames
{
   final public static String copyright = "Copyright (c) IBM Corp. 1998   All rights reserved.";

   public static void main (String [] args)
   {
      PCFAgent       agent;
      PCFParameter []    parameters =
               {
                  new MQCFST (CMQC.MQCA_Q_NAME, "*"),
                  new MQCFIN (CMQC.MQIA_Q_TYPE, CMQC.MQQT_ALL)
               };
      MQMessage []       responses;
      MQCFH          cfh;
      MQCFSL          cfsl;

      try
      {
         // Connect a PCFAgent to the specified queue manager

         if (args.length == 1)
         {
            System.out.print ("Connecting to local queue manager " +
               args [0] + "... ");
            agent = new PCFAgent (args [0]);
         }
         else
         {
            System.out.print ("Connecting to queue manager at " +
               args [0] + ":" + args [1] + " over channel " + args [2] + "... ");
            agent = new PCFAgent (args [0], Integer.parseInt (args [1]), args [2]);
         }

         System.out.println ("Connected.");

         // Use the agent to send the request

         System.out.print ("Sending PCF request... ");
         responses = agent.send (CMQCFC.MQCMD_INQUIRE_Q_NAMES, parameters);
         System.out.println ("Received reply.");
         cfh = new MQCFH (responses [0]);

         // Check the PCF header (MQCFH) in the first response message

         if (cfh.reason == 0)
         {
            System.out.println ("Queue names:");
            cfsl = new MQCFSL (responses [0]);

            for (int i = 0; i < cfsl.strings.length; i++)
            {
               System.out.println ("\t" + cfsl.strings [i]);
            }
         }
         else
         {
            System.out.println (cfh);

            // Walk through the returned parameters describing the error

            for (int i = 0; i < cfh.parameterCount; i++)
            {
               System.out.println (PCFParameter.nextParameter (responses [0]));
            }
         }

         // Disconnect

         System.out.print ("Disconnecting... ");
         agent.disconnect ();
         System.out.println ("Done.");
      }

      catch (ArrayIndexOutOfBoundsException abe)
      {
         System.out.println ("Usage: \n" +
            "\tjava ListQueueNames queue-manager\n" +
            "\tjava ListQueueNames host port channel");
      }

      catch (NumberFormatException nfe)
      {
         System.out.println ("Invalid port: " + args [1]);
         System.out.println ("Usage: \n" +
            "\tjava ListQueueNames queue-manager\n" +
            "\tjava ListQueueNames host port channel");
      }

      catch (MQException mqe)
      {
         System.err.println (mqe);
      }

      catch (IOException ioe)
      {
         System.err.println (ioe);
      }
   }
}

Back to top
View user's profile Send private message
kolban
PostPosted: Fri Feb 28, 2003 9:44 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

Looking on the Usenet, it appears that this problem is most likely caused by having two sets of systems classes in your CLASSPATH, one belonging to one JVM version and the other to another. So you might be picking up i18n.jar from one implementation and other JVM classes from another JVM instance.
Back to top
View user's profile Send private message
ping master
PostPosted: Mon Mar 03, 2003 6:34 am    Post subject: Reply with quote

Centurion

Joined: 20 Sep 2002
Posts: 116
Location: USA

Kolban, you are good man.

that's what it was, thanks. Now if I can get a handle on this Administration MQ programming I'll be alright. I would like to write it in javascript from a web page, but I may have to go with Java instead as a standalone.

PM
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 » Java PCF question using the MSOB pcf files
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.