Issues connecting to IBM MQ using tJMSInput component

Highlighted
Eight Stars

Issues connecting to IBM MQ using tJMSInput component

Hello All,

My requirement is to connect to an IBM WebSphere MQ and be able to extract/read the incoming messages(XML formats) and process them further.I am unable to connect to queue using tJMSInput inspite of the guidance i got from the discussion post https://community.talend.com/t5/Migration-Configuration-and/Connect-to-IBM-WebSphere-MQ-server-using.... I am certainly not new to fetching messages from Queue's and I did this seamlessly in Informatica but unable to succeed using Talend components. If i am able to achieve tJMSInput --> tlogrow then i think i can easily cruse through the rest of the job design.

 

The biggest hurdle i am facing all the time is: "Cannot instantiate class: com.sun.jndi.fscontext.RefFSContextFactory" I did ensure that the class path entries are all correct and pointing to the right folders.

 

Can some one please help me connect to the queue using tJMSInput or guide me if there is some other way/component which can do the job. 

 

 


Accepted Solutions
Eight Stars

Re: Issues connecting to IBM MQ using tJMSInput component

Thank You Rhall, Nikhil, 

Finallyyyyyyyy....I am able to connect to the Queue and fetch messages from Queue. Will post in greater detail the issue and the resolution which is nothing more than an extension/ minor modifications to the thread to https://community.talend.com/t5/Migration-Configuration-and/Connect-to-IBM-WebSphere-MQ-server-using...

View solution in original post


All Replies
Highlighted
Eight Stars

Re: Issues connecting to IBM MQ using tJMSInput component

Hello,

 

Any help, comments on this request, please

Highlighted
Community Manager

Re: Issues connecting to IBM MQ using tJMSInput component

I am not an expert on IBM MQ, so cannot offer any advice here. However, have you looked at these answered posts regarding it?
https://community.talend.com/t5/forums/searchpage/tab/message?advanced=false&allow_punctuation=false...

If none of those posts help you out, get back to me here. I will see if I can get someone who has some expertise to look at this.

Highlighted
Eight Stars

Re: Issues connecting to IBM MQ using tJMSInput component

Thanks Rhall...want to do a through homework before reverting back to you. 

Unfortunately none of these posts are helping...i have tried all possible ways but none seems to be going through. I even deleted the jms.jar files, reimported but in vain. Interestingly my MQ server is also on the same machine where i have my Talend installed, so there is no ambiguity in terms of any network rejections. I was desperate to see if i can find a small example over the whole of Google that is something similar to my situation but there are none out there.

 

Any small help in this regard will bring in a big leap to what we are doing...thanks in advance

Highlighted
Community Manager

Re: Issues connecting to IBM MQ using tJMSInput component

Hi @nikhilthampi, do you know of anyone with any experience of doing this? I've never used IBM MQ and don't really have the capacity to install it and figure it out at the moment. If you know of anyone who can give a few pointers on this, I'd massively appreciate it.

Highlighted
Employee

Re: Issues connecting to IBM MQ using tJMSInput component

@rhall_2_0 , @rchinta_talend 

 

Hi Richard,

 

    I also have not used MQ till now. Ram might be able to help all of us.

 

Hi Ram,

 

       Have you encountered this issue?

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

 

     

Highlighted
Eight Stars

Re: Issues connecting to IBM MQ using tJMSInput component

Thank You all for your help thus far. I jumped over to a new system away from the network i am in currently, installed TOS7.x and IBM Websphere MQ and faced the same problem even there, I doubt if the MQ connectivity was ever established through tJMS or tMOM components...

 

On these lines, can you please suggest if there is some other component that can be used... i am re-iterating my requirement below:

 

The transactional system places a message (in xml format) in an IBM Websphere MQ, i am supposed to extract that message and parse it. Not knowing the complexity of connecting to a queue, i assumed it will be seamless and did the needed development to parse the incoming xml file, populate DB tables and the rest of the process. Now i am badly struck with my design as i can not even go back to mgmt. to say that I am unable to connect to MQ, owing to all the time spent.

 

With this background, can you please suggest if there is any other way to meet the requirement? From my self assessment, I guess tJMSInput and tMOMinputloop are the two components that can help connect to MQ, are you aware of any other components in Talend that can serve the need.

Eight Stars

Re: Issues connecting to IBM MQ using tJMSInput component

Thank You Rhall, Nikhil, 

Finallyyyyyyyy....I am able to connect to the Queue and fetch messages from Queue. Will post in greater detail the issue and the resolution which is nothing more than an extension/ minor modifications to the thread to https://community.talend.com/t5/Migration-Configuration-and/Connect-to-IBM-WebSphere-MQ-server-using...

View solution in original post

Highlighted
Community Manager

Re: Issues connecting to IBM MQ using tJMSInput component

That is great news! Thanks so much with persevering with this. It is relatively unusual for one of us to have not come across a scenario or for one of us not to be able to try it out ourselves. It seems this was one of those unusual situations. 

Highlighted
Eight Stars

Re: Issues connecting to IBM MQ using tJMSInput component

As promised, want to share some additional information on steps connecting to an IBM Websphere MQ from Talend...Please note that i am neither an expert on Websphere MQ or on Talend, nor do i represent any company here, these are just my personal experiences shared only to help people and can not be considered as authenticated in any means. This documentation is an extension of one of the earlier posts https://community.talend.com/t5/Migration-Configuration-and/Connect-to-IBM-WebSphere-MQ-server-using... written by some one that i am completely unaware of..tried reusing some verbage from the previous post.

==============================================================================================================================================================================================

Question

How do you configure the tJMSInput component to connect to an IBM WebSphere MQ?

 Solution

Steps:

  • Create a .bindings file (if you have one, skip to point 2 below)

creating .bindings file

  • Launch your MQ Explorer
  • Create a Queue Manager
    1. Right Click on Queue Mgr and proceed with all defaults
    2. Upon confirming that the Queue mgr. is created, you will find that couple of other folders under the Queue Manager would surface, of which Channels and Listener are of consideration to us in this context
  • Create a Queue
    1. Under the Queue Manager you created in Step 2 above, you will find Queues folder, right click it to create a Queue
    2. Create 2 queues if you wish, one for reading and one for writing.
  • Create a channel
    1. Right click the Channels and choose the channel type.
    2. In my view Server-connection channel is ideal, if you think otherwise you can explore further
  • Go to JMS Administered Objects, Create a InitialContext
    1. Here it is important to choose File System as the JNDI Namespace locator so that you can use that path as your Server URL when configuring tJMSINPUT component.
    2. Go to the path mentioned and ensure that the ‘.bindings’ file is created before proceeding to configure the tJMSINPUT component
  • Add three tLibraryLoad components to your Talend Job for the following JARs:
  • jar (located in your WMQ installation under IBM\WebSphere MQ\java\lib)
  • jar (located in your WMQ installation under IBM\WebSphere MQ\java\lib)
  • jms-api-2.0.1.jar (you can download this from the Maven Repository, at http://central.maven.org/maven2/javax/jms/javax.jms-api/2.0.1/javax.jms-api-2.0.1.jar)

Though not necessarily an issue, when I downloaded the jar it comes as javax.jms-api-2.0.1.jar and I had hard time making Talend recognize this jar, so I have to manually take away the javax. and have the jar name as jms-api-2.0.1.jar. I am not from Java background, so this is just my observation.

 

One more important point to remember here is, every job where you are trying to connect to a MQ using tJMSINPUT component should have these tLibraryLoad components, just because you find these libraries in the list of installed libraries you can not assume that these components are not needed for the next MQ connectivity job.

  • tJMSINPUT component configuration - This is where I spent a whole lot of time and looks like there is a small bug/overlook here at Talend…so pay close attention to this point:

 

Module List : select ‘com.ibm.mq.allclient-8.0.0.4.jar’ library from the list. If the list has 8.0.0.9 or something higher than ‘8.0.0.4’, it is quite ok, no issues. If you don’t find this in your list of installed components then follow this steps:

1.

                Pick the .jar (if you don’t have download) and then click on ‘Detect the module install status’ to ensure that the .jar is already installed.

 

Here is the trick, when you click on ‘Detect the module install status’ Talend will say that this Maven object is already installed, but when you run the job, it will not be able to instantiate the jar. What I did is, I went to find by name and then tried to search by name, when it shows not found, so then if you go to install a new module, it installs and will start showing up in your list of modules available from the list button under platform.

 

  • Context Provider: enter "com.sun.jndi.fscontext.RefFSContextFactory" this is what Talend suggests as of this writing. In fact this value would come from IBM Websphere MQ tool itself. You can check this value when you try creating an initial context on your MQ Client or explorer
  • Server URL: This is where your ‘.bindings’ file should reside for the tJMSINPUT to be able to perform correctly. It is not necessary that you should have created ‘.bindings’ file at this location, if it created else where, you can copy that ‘.bindings’ file to this location. Your file path should reflect like this "file:/C:/abcd/xyz/" note that the word ‘file’ should also be part of the value, ‘abc’ and ‘xyz’ are directories/subdirectories to reflect your path
  • Connection Factory JNDI Name: You would typically get this value from your MQ admin, if not this is the value that you have given at the time of creating the ‘.bindings’ file
  • Message Type: select Queue from the pull-down menu.
  • Message From: enter the name of the Queue from where you intend to read your messages or if you have added a destination JNDI object while creating the ‘.bindings’ file, you can specify a JNDI destination name instead of the real queue name.
Highlighted
Eight Stars

Re: Issues connecting to IBM MQ using tJMSInput component

@rhall_2_0 

I drafted a document that details out the issues and mitigations around tJMSInput component and have uploaded it to the same thread...however it got deleted in no time, may be because of the size of the post or because of the images it had in it. I even tried attaching the doc, but even that post got deleted. Do you think there is any other way where we can upload? All i am trying to do here is to share my little experiences with the component so that it helps some one in need. On the other hand if i can send it to you/some one directly for review, i can do that as well, please let me know

Highlighted
Community Manager

Re: Issues connecting to IBM MQ using tJMSInput component

Let me check what happened. The tool we use to host this community can be a little overzealous when trapping what it thinks is spam. If I can find it, I will push it back to here.

Highlighted
Community Manager

Re: Issues connecting to IBM MQ using tJMSInput component

Hi @tnewbie,

 

I couldn't find the post anywhere in the rejected posts section. This could have been some sort of network issue when you tried. Could you try again? I assume the file you were trying to upload was something like a Word file? This should be absolutely fine. If you still cannot add it, maybe try sending it to me via email. You can find my email address on my profile. I'd post it here but these posts are indexed by search engines and I'd rather not increase the risk of my work email address getting spammed :-)

Highlighted
Eight Stars

Re: Issues connecting to IBM MQ using tJMSInput component

Thanks @rhall_2_0 

 

Find the document attached...please review and upload

Highlighted
Community Manager

Re: Issues connecting to IBM MQ using tJMSInput component

This is absolutely fine as an attachment. I think I misunderstood your question. If you couldn't paste the contents in to a single post it might have been because it was too long. The Word doc is absolutely fine. Thanks for doing this.

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 3

Read about some useful Context Variable ideas

Blog