|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
WMQInitialContextFactory problem with CCSID |
« View previous topic :: View next topic » |
Author |
Message
|
thomasxuz |
Posted: Sat Jul 12, 2008 11:29 pm Post subject: WMQInitialContextFactory problem with CCSID |
|
|
Newbie
Joined: 12 Jul 2008 Posts: 1
|
Hi,
the CCSID problem of WMQInitialContextFactory has confused me for quite a while :
=============
String jndiURL = "localhost:1414/SYSTEM.DEF.SVRCONN";
String jndiFactory= "com.ibm.mq.jms.context.WMQInitialContextFactory";
java.util.Hashtable properties = new java.util.Hashtable();
properties.put(Context.PROVIDER_URL, jndiURL);
properties.put(Context.INITIAL_CONTEXT_FACTORY, jndiFactory);
Context initContext = new InitialContext(properties);
=============
As my MQM has CCSID of 1381, I keep getting exceptions while trying to establish the InitialContext :
javax.naming.ServiceUnavailableException: Unable to connect to the target queue manager ... [Root exception is com.ibm.mq.MQException: MQJE001: MQJE020: code 2195 ... unsupported CCSID...
I'm running the simple program as pure standalone java application, WMQ6.0.
Can anybody advise me how to get pass this problem?
Thanks,
Thomas |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Jul 13, 2008 6:17 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
This is another reason you're better off using filesystem initial context because the scenarios I'm going to describe are much easier to set up that way.
As default you are passing the CCSID of the system you're running on.
There might not exist a conversion table to that CCSID from the qmgr's CCSID. You can look up in the manuals on how to create one....
The other possibility you have is to set the CCSID (1208 = UTF-8 ) on the connection factory. As you are using java, requesting your information in UTF-8 should not pose a problem. If not using JMS set the CCSID on the MQMD passed into the MQGet call. Most systems have a conversion table to UTF-8. You may have to ask your OS maintenance team to add the language tables for UTF-8 to the system.
A third possibility, if the sender application is JMS, is to set the CCSID in JNDI on the Destination. The qmgr will then translate from native to requested CCSID before putting the TextMessage to the Destination.
Enjoy  _________________ MQ & Broker admin |
|
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
|
|
|
|