One Star

ClassCastException in TDQ with JMSOutput

Hi,
I am getting a ClassCastException with the JMSOutput, when I use my own specified module list.
Scenario: I am trying to create a connection to a WebSphere MQ .bindings file(stubbed out MQ, which lives locally on my machine) and send a Message to a queue (via the JVM essentially).

This is the exception:
Exception in component tJMSOutput_1
java.lang.ClassCastException: javax.naming.Reference cannot be cast to javax.jms.ConnectionFactory
at talendpoc.talend_elf_poc_0_1.Talend_ELF_POC.tWaitForFile_2Process(Talend_ELF_POC.java:911)
at talendpoc.talend_elf_poc_0_1.Talend_ELF_POC.tLibraryLoad_1Process(Talend_ELF_POC.java:321)
at talendpoc.talend_elf_poc_0_1.Talend_ELF_POC.runJobInTOS(Talend_ELF_POC.java:1352)
at talendpoc.talend_elf_poc_0_1.Talend_ELF_POC.main(Talend_ELF_POC.java:1226)
I have a tLoadLibrary which loads a list of external libraries that the JMSOutput will need indirectly by using FSContext.jar within the Module list.
Please see screenshots as these show the job and configurations.
I have a feeling it is a Classpath issue with talend.
3 REPLIES
Community Manager

Re: ClassCastException in TDQ with JMSOutput

Hello
java.lang.ClassCastException: javax.naming.Reference cannot be cast to javax.jms.ConnectionFactory

It is not a Classpath issue, please report a bug on our bugtracker, our developer will investigate the problem further.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: ClassCastException in TDQ with JMSOutput

One Star

Re: ClassCastException in TDQ with JMSOutput

it could be a classpath issue with talend because of the way the jars get loaded, if i load my jars they may be used instead of some talend jars that you expect, or vice versa.
I will add that I got this working using my own JMSRoutine, which would suggest to me it is something with the way Talend uses the jars that are loaded in tLibraryLoad or not as the case maybe. Talend should use the tLibraryLoad jars and not the default Talend JMS jars.