Talend and RabbitMQ

Six Stars

Talend and RabbitMQ

Hi,

I have created a job to publish data into rabbitmq. Below is the error I am getting after running the job. Could you please help me to fix this issue.

 

Checking ports...

Sending job 'ex' to server (10.1.5.76:8001)...

File transfer completed.

Deploying job 'ex' on server (10.1.5.76:8000)...

Running job 'ex'...
Starting job ex at 21:45 26/05/2018.

 

IOException parsing XML document from class path resource [META-INF/spring/ex.xml]; nested exception is java.io.FileNotFoundException: class path resource [META-INF/spring/ex.xml] cannot be opened because it does not exist
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [META-INF/spring/ex.xml]; nested exception is java.io.FileNotFoundException: class path resource [META-INF/spring/ex.xml] cannot be opened because it does not exist
 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)
 at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
 at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
 at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
 at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:243)
 at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:127)
 at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:93)
 at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
 at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:539)
 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)
 at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
 at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
 at cdp.ex_0_1.ex$1.createContext(ex.java:81)
 at org.apache.camel.main.Main.getCamelContextMap(Main.java:149)
 at org.apache.camel.main.MainSupport.postProcessContext(MainSupport.java:433)
 at org.apache.camel.main.Main.doStart(Main.java:125)
 at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
 at org.apache.camel.main.MainSupport.run(MainSupport.java:138)
 at cdp.ex_0_1.ex.run(ex.java:130)
 at cdp.ex_0_1.ex.runJobInTOS(ex.java:197)
 at cdp.ex_0_1.ex.main(ex.java:166)
Caused by: java.io.FileNotFoundException: class path resource [META-INF/spring/ex.xml] cannot be opened because it does not exist
 at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:171)
 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:329)
 ... 21 more
Job ex ended at 21:45 26/05/2018. [exit code=1]

 

Thanks,
srenaray


Accepted Solutions
Ten Stars

Re: Talend and RabbitMQ

Make sure your java environment vars are setup properly,
CLASSPATH
JAVA_HOME
JAVA_PATH
Google it please... to see how to set it up correctly and which ones...
Also possible to set it on runtime: java.exe classpath or something.

All Replies
Ten Stars

Re: Talend and RabbitMQ

Make sure your java environment vars are setup properly,
CLASSPATH
JAVA_HOME
JAVA_PATH
Google it please... to see how to set it up correctly and which ones...
Also possible to set it on runtime: java.exe classpath or something.
Six Stars

Re: Talend and RabbitMQ

Hi,

My Talend is poined to Remote Server. Could you please help me how can i set the Java_home and the server is already being used by other projects.

Thanks,
Sreeman

Ten Stars

Re: Talend and RabbitMQ

RabbitMQ:
First check if your RabbitMQ config is properly setup and is able to find the needed jars, so test RabbitMQ from your talend server prompt to see if it works? (Im not a RabbitMQ expert)
https://www.rabbitmq.com/management-cli.html

Next, Talend job, run/schedule on server:
So your job runs on remote server, contact admin / talend admin to properly config the Java environment to run the remote job(s) with specific components which need to be configured on the server or from within your talend job.

ClassPath:
Search on the forum to set classpath from within Talend as java parameter,
Although Im not aware of changes within the talend environment on how to load external lib/jars and your specific config/setup. Maybe the server runs with multiple java versions (in example mine runs 3java versions depending on tool/platform/sysuser)

Make sure RabbitMQ works while using prompt by system(talendadmin) / same user your job runs.