Four Stars

tmomInput to Connect to IBM MQ 7.5

Hi,

 

I am new to talend, I was wanting to connect to IBM MQ 7.5 using tmomInput. I have seen most of the users are able to connect to IBM MQ without issues using tmomInput.

 

But I am not able to connect with tmomInput with these jar files (com.ibm.mq.jar, com.ibm.mqjms.jar, connector.jar, jms.jar) Since the class definition changed with MQ 7, the code was throwing an error saying certain exception class jars missing. I then used a tLibraryLoad to add the com.ibm.mq.jmqi.jar . The code compiled well without errors, but I get an error during runtime as below. I tried to add other mq jars like com.ibm.mq.commonservices.jar, fxcontext.jar using tLibraryLoad but the same error persists. Any pointers  ?

 

Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/mq/commonservices/internal/utils/CommonServices
    at com.ibm.mq.MQEnvironment.<clinit>(MQEnvironment.java:582)
    at com.ibm.mq.MQQueueManagerFactory.procure(MQQueueManagerFactory.java:783)
    at com.ibm.mq.MQQueueManagerFactory.constructQueueManager(MQQueueManagerFactory.java:750)
    at com.ibm.mq.MQQueueManagerFactory.createQueueManager(MQQueueManagerFactory.java:157)
    at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:757)
    at lpp.newmq_0_1.newMQ.tMomConnection_1Process(newMQ.java:344)
    at lpp.newmq_0_1.newMQ.runJobInTOS(newMQ.java:1255)
    at lpp.newmq_0_1.newMQ.main(newMQ.java:1112)
Caused by: java.lang.ClassNotFoundException: com.ibm.mq.commonservices.internal.utils.CommonServices
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
[statistics] disconnected
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

2 REPLIES
Four Stars

Re: tmomInput to Connect to IBM MQ 7.5

I was able to resolve the problem by putting mutiple tLibrary components. I had to put 3 library componentns to load (jmqi, commonservices and mqheader.jar). It worked, I was able to create a file from a mq message.

 

But Now i face another problem, I put a desgin with tmomInput->txmlMap->toracleOutput and it fails. I get a error saying unable to generate code.

 

But tmomInput->tFileOutputdelimited works fine.

 

Is there something i need to take care of the message schema that goes out of tmomInput ?

Moderator

Re: tmomInput to Connect to IBM MQ 7.5


sensiva wrote:

I was able to resolve the problem by putting mutiple tLibrary components. I had to put 3 library componentns to load (jmqi, commonservices and mqheader.jar). It worked, I was able to create a file from a mq message.

 

But Now i face another problem, I put a desgin with tmomInput->txmlMap->toracleOutput and it fails. I get a error saying unable to generate code.

 

But tmomInput->tFileOutputdelimited works fine.

 

Is there something i need to take care of the message schema that goes out of tmomInput ?


On which talend build version you got this issue? Please show us the full stack trace about this unable to generate code exception.

Screenshots of your job setting will be helpful for us to address your issue quickly.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.