One Star

Deploying Talend job from Open Studio for big data 5.6.1

Folks,
  I have heard conflicting accounts of Talend's jobs supporting Tomcat (and later Wildfly). I have built a Talend job (using sub-jobs) that once started, listens to an MQ queue for messages, performs validations on the messages, transforms them and then passes them through to a remote REST service.
Out of curiosity, I built the job as a WAR file and deployed to Wildfly. The application started up properly and began to listen and consume messages as expected (all logs outputting to Wildfly console) - yay. However, upon deploying an update, the WAR successfully deploys and starts, but I have never since actually gotten the job to start up.
Is this supposed to be able to work? Was it just a complete fluke that things worked the first time? Would welcome any advice people could offer here...
5 REPLIES
Moderator

Re: Deploying Talend job from Open Studio for big data 5.6.1

Hi,
Your job works well in studio but not Wildfly? Can your run your job .war file on Tomcat successfully without error?

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.
One Star

Re: Deploying Talend job from Open Studio for big data 5.6.1

Correct. My job starts with a tMomInput component so once it begins it keeps polling and pulling messages off an MQ - works fine in designer.
On Wildfly it deploys without any errors but sits there and does nothing
On Tomcat 8 (just installed it) it complained at first about log4j, I had to edit the war and create a log4j.properties file with default root entries. Once done, it again, deployed just fine but does nothing.
Moderator

Re: Deploying Talend job from Open Studio for big data 5.6.1

Hi,
The job should be OK if it works in studio. Would you mind uploading your job setting screenshots into forum? 

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.
One Star

Re: Deploying Talend job from Open Studio for big data 5.6.1

Hi,
Even i am facing the same issue.
My job starts with tMomInput which pulls messages from Apache AQ. I have built the job as Axis Webservice and deployed the .war file on Tomcat 7. Tomcat starts fine without any errors, also i can see that the war file has been deployed successfully and its exploded folder is also created in the webapps folder. But the job doesn't start on receiving message on the queue to which its listening.
The same job working fine from studio and also from Talend Runtime container (OSGI)
Can someone please help?
One Star

Re: Deploying Talend job from Open Studio for big data 5.6.1

xdshi/Anant,
    I resolved my issue - it turns out to be a combination of two things:
1) I can deploy the WAR just fine but it will not automatically start without first invoking it as if it was a web service - I.e. once the WAR is successfully deployed, I needed to go to a browser and execute the URL:
You would obviously adjust this URL to suit the name/port of your server and the name of your job (mine being ProcessTXLifeFromMQ). This I learned from the link xdshi had sent (thanks for that!) 
Question for you xdshi - is there any way to automate this? I'd like the job to start without having to do anything with the browser (not a good production scenario where servers get restarted). I've read a little on creating a java wrapper that when started would call runJob but I'm hoping there is something more graceful?
2) Logging wasn't working. I use the tLogCatcher to log throughout the job and event though I got the job to trigger (using the URL post), there were no logs being produced. I only happened to notice my MQ length going down that helped me realize the job was running. I had to create a log4j.xml file and place it in my WAR uner WEB-INF/classes with an appender configured to console - for example:
<log4j:configuration debug="true"
xmlns:log4j=''>


<appender name="fileAppender" class="org.apache.log4j.RollingFileAppender">
<param name="append" value="false" />
<param name="file" value="log4j.log" />

<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p %m%n" />
</layout>
</appender>

<appender name="console" class="org.apache.log4j.ConsoleAppender">
<param name="Target" value="System.out"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p %m%n" />
</layout>
</appender>

<root>
<level value="ALL" />
<appender-ref ref="console" />
</root>

</log4j:configuration>

Again, question for xdshi - Any way to configure Talend so that file is placed in the WAR automatically for me?
Anyway - I thought you might find what I had learned so far to be useful....