IBM WebSphere MQ and JMS

rvmsengrvmseng Posts: 52
edited May 25 in Virtualize

Hi everybody,

I want to create a virtual assert for IBM MQ (JMS channel) without using "JNDI", but I have received following error.

Note: I don't have "mqcontext,jar" so I can't use "com.ibm.mq.jms.context.WMQInitialContextFactory" also my MQ version is 8 and I added "com.ibm.mq.allclient.jar" to preferences>system property

I have to fill "Initial context class" and "Connection Factory" input box, but I don't know what to fill, Please assist me.

I read this article: https://docs.parasoft.com/display/VIRT9105/JMS+Provider+Configuration#JMSProviderConfiguration-IBM_WebIBMWebSphereMQ(MQSeries)

Comments

  • rvmsengrvmseng Posts: 52
    edited May 25

    Dears,

    Also I used following information, but I have received another error.

    Note: I added "allclient-9.0.0.1.jar" and "javax.jms-api-2.0.1.jar" to preferences>parasoft>system property

    https://hursleyonwmq.wordpress.com/2007/05/29/simplest-sample-applications-using-websphere-mq-jms/

    2.PNG 45.1K
  • rvmsengrvmseng Posts: 52

    Also I tried another one, but issue exist yet. please someone assist me.

    1.PNG 47.3K
  • benken_parasoftbenken_parasoft Posts: 491 ✭✭✭
    edited May 25

    I don't have "mqcontext,jar" so I can't use

    I'm afraid you must have the required jars. IBM MQ Clients, which include the required jars, are freely available for download from IBM's website. Is there some reason why you can't get this?

  • rvmsengrvmseng Posts: 52
    edited May 25

    Dear benken
    mqcontext.jar not exit and not support
    And i don’t want use it
    Please give me a valid sample for use without jndi

  • benken_parasoftbenken_parasoft Posts: 491 ✭✭✭

    I am happy to try to help you here. The error message "Initial context class field is required" is accurate. JNDI is required for JMS message listener configuration.

    mqcontext.jar not exit and not support

    Perhaps IBM doesn't let you download the "mqcontext,jar" anymore. Recent versions of the MQ Client include a single "com.ibm.mq.allclient.jar" which has everything except doesn't include the "WMQInitialContextFactory". I see JmsJndi{Consumer|Producer} examples under the "{mqclient}/Tools/jms/samples" folder which show using "RefFSContextFactory" which is provided by the fscontext.jar which is included. I take this to mean IBM dropped "mqcontext" in favor of "fscontext". I'd try using that instead.

    And i don’t want use it

    I've used fscontext before. It requires you have a .bindings file which you reference in the Provider URL field. One may already exist on the MQ queue manager which you can copy.

    Please give me a valid sample for use without jndi

    The docs should be improved but the section you referenced is actually referring to JMS client transport configuration in a client tool, such as the Messaging Client or SOAP Client. The JMS message listener configuration (for virtual assets) requires JNDI to lookup the JMS ConnectionFactory object.

  • rvmsengrvmseng Posts: 52
    edited May 27

    Dear,

    I have received following error. please help me.
    Note: I have "C:\JNDI-Directory.bindingsa" with proper setting

  • benken_parasoftbenken_parasoft Posts: 491 ✭✭✭

    Offhand, this looks to be an IBM error message from the IBM MQ client library. I assume your host is not named "targetHost(1475)". Most likely your have the wrong host name in your .bindings file, or the host name configured in the wrong place in there.

  • juhijuhi Posts: 2

    hello...I am not able to find mqcontext.jar as its not available on IBM site.I am able to get fscontext.jar..still getting the same error-
    Could not create JMS InitialContext instance: com.ibm.mq.jms.context.WMQInitialContextFactory
    Cannot instantiate class: com.ibm.mq.jms.context.WMQInitialContextFactory

    what all jars do we need to add?

  • Hi, that error message means that you don't have the right client jar. I found this link from IBM that might help, http://www-01.ibm.com/support/docview.wss?uid=swg21683398, if it doesn't you may need to ask someone in your organization where you can get the client jars from. Often they are available as part of the web sphere mq server install.

  • benken_parasoftbenken_parasoft Posts: 491 ✭✭✭

    "com.ibm.mq.jms.context.WMQInitialContextFactory" is from the mqcontext.jar which IBM doesn't appear to provide anymore. It might be tough to find (IBM Support Pack ME01.zip). In contrast, "com.sun.jndi.fscontext.RefFSContextFactory" is from the fscontext.jar which I see used in IBM's examples. The fscontext.jar is already provided with Virtualize/SOAtest and doesn't need to be explicitly added. However, you do add the main MQ client jar (com.ibm.mq.allclient.jar).

    Please also see my earlier comment about this which has a little more detail.

  • juhijuhi Posts: 2

    Thanks William and benken,
    I am not able to find mqcontext.jar from anywhere. Is there any alternative.
    Also in JNDI settings-connection factory I tried to mention com.sun.jndi.fscontext.RefFSContextFactory,still I get the same error,seems the dependency for mqcontext.jar is hard coded.Also we have MQ explorer version 9 available,is there any difference for setting in queue browser setup for version 9 as there was difference in 7 and 8 as per parasoft documentation.
    Thanks in advance :)

  • benken_parasoftbenken_parasoft Posts: 491 ✭✭✭

    in JNDI settings-connection factory I tried to mention com.sun.jndi.fscontext.RefFSContextFactory,still I get the same error

    You shouldn't get an error about "WMQInitialContextFactory" in that case. You would probably have to provide a bit more detail for someone to help identify what specifically you might have misconfigured in your particular case. You might also consider contacting Parasoft Support for a timely resolution.

Sign In or Register to comment.