One Star

[resolved] tSendMail error generating job in TAC but successful in Studio

I'm getting an error in tSendMail when generating job in TAC Job Conductor, yet it runs successfully in local Talend Studio.
The error even happens in a simple job with one tSendMail component and nothing more.
Detail Message: javax.mail cannot be resolved to a type
There may be some other errors caused by JVM compatibility. Make sure your JVM setup is similar to the studio.
at org.talend.commandline.command.ExtensionCommandSwitch.caseExtensionServerCommand(ExtensionCommandSwitch.java:148)
at org.talend.commandline.client.command.extension.AbstractExtensionCommandSwitch.doSwitch(AbstractExtensionCommandSwitch.java:31)
at org.talend.commandline.command.CommandProcessorSwitch.caseExtensionCommand(CommandProcessorSwitch.java:161)
at org.talend.commandline.client.util.CommandAbstractSwitch.doSwitch(CommandAbstractSwitch.java:70)
at org.talend.commandline.command.CommandConsumer.executeCommand(CommandConsumer.java:57)
at org.talend.commandline.command.CommandConsumer.execute(CommandConsumer.java:35)
at org.talend.commandline.mode.ServerCommandLine$CommmandConsumerRunnable.run(ServerCommandLine.java:139)
at java.lang.Thread.run(Thread.java:745)

Somebody had the same error but their resolution wasn't posted - https://www.talendforge.org/forum/viewtopic.php?id=42168
I have tried the following but nothing has resolved the error:

Reinstall CommandLine (server).
On local Talend Studio on laptop, use the exact same JDK 1.7 release as server (/opt/jdk1.7.0_71).
Set SVN "Library location url", as per - https://www.talendforge.org/forum/viewtopic.php?pid=141270
Generate the existing job as a different user.
Create and Generate a new job as a different user.
Restart everything on our Talend server (CentOS EC2 instance).

As a workaround, I have to deactivate the tSendMail components within the job flow.
Does anybody have any suggestions for how to resolve this?  I'm using Talend version 5.6.1 and jdk1.7.0_71 on both client (Windows) and server (CentOS).
1 ACCEPTED SOLUTION

Accepted Solutions
One Star

Re: [resolved] tSendMail error generating job in TAC but successful in Studio

Hi,
Have you tried to copy external libraries (modules) installed in Talend Studio to :
1. CommandLine : <StudioPath>/lib/java to <CommandLinePath>/lib/java
2. tomcat : <StudioPath>/lib/java to <TomcatPath>/webapps/org.talend.administrator/WEB-INF/lib. to see if it is OK with you?
Best regards
Sabrina

***** Resolution:  Copy Studio downloaded jars to CommandLine (server), as per:
TalendPlatform_DataServices_IG_5.6.1_EN.pdf
  section "3.6.2.1. Configuring Talend Studio"
    page 53 - "To install modules in CommandLine"
      "If you use the Studio and CommandLine on different machines, you need to retrieve the downloaded .jar files and add them in CommandLine."
1) stopped CommandLine (server)
2) backed up and deleted *.jar in server - /home/centos/Talend-5.6.1/cmdline/studio/configuration/lib/java
3) copied *.jar from
laptop - C:\Talend\5.6.1\studio\configuration\lib\java
to
server - /home/centos/Talend-5.6.1/cmdline/studio/configuration/lib/java
4) restarted CommandLine (server)
8 REPLIES
Moderator

Re: [resolved] tSendMail error generating job in TAC but successful in Studio

Hi,
Are your studio and TAC installed at the same machine?
Have you already added all necessary libraries to a SVN repository (check this out in the TAC SVN configuration)?
Please take a look at online document: https://help.talend.com/search/all?query=Configuring+the+Studio&content-lang=en
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: [resolved] tSendMail error generating job in TAC but successful in Studio

Hi,
Are your studio and TAC installed at the same machine?
Have you already added all necessary libraries to a SVN repository (check this out in the TAC SVN configuration)?
Please take a look at online document: 
Best regards
Sabrina

Sabrina,
Thanks for the reply.  Here are my answers to your questions...
No they are installed on different machines.  Studio is installed on laptop and TAC is installed on server.
I had already set the SVN "Library location url" in TAC as per these instructions -
  https://help.talend.com/search/all?query=Prevent+SVN+locking+and+slow+response+between+Talend+Admini...
The instructions say:
  After configuring this setting and opening any remote Talend project with the studio for the first time, the Library repository will be populated with the Talend required and optional third party libraries.  You need to accept the download and installation of the required and optional third party libraries in the studio...

In Studio, I had already done that.  The "Help -> Install Additional Packages" shows nothing left to install.
In Studio, the modules have already been installed.
   Installed   tSendMail   mail-1.4.jar   Required
   Installed   tSendMail   activation.jar   Required
On the server, the Library SVN is not empty.  It populated itself after doing the above steps.
du -sk /var/www/svn_talend_lib/
248956  /var/www/svn_talend_lib/
du -sk /var/www/svn/
175972  /var/www/svn/

How do I confirm that the jars exist in the correct location on the server?
Moderator

Re: [resolved] tSendMail error generating job in TAC but successful in Studio

Hi,
For Talend Administration Center, did you place the downloaded modules in the following folder:
<TomcatPath>/webapps/org.talend.administrator/WEB-INF/lib

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: [resolved] tSendMail error generating job in TAC but successful in Studio

Hi,
For Talend Administration Center, did you place the downloaded modules in the following folder:
<TomcatPath>/webapps/org.talend.administrator/WEB-INF/lib

Best regards
Sabrina

Sabrina,
When I installed TAC on the server, the installer automatically copied a bunch of jars to that folder.  I thought those libs were used internally by the TAC web app, not so much for the jobs that I designed.  For example, mail-1.4.6.jar is there, but it doesn't match the one in Studio that is tied to tSendMail (mail-1.4.jar).
However, since the Talend server documentation says that Command Line (server) is required to generate tasks in the TAC's Job Conductor, I had already installed Command Line (server) a while ago.  Since the tSendMail error only happens when generating the job in TAC Job Conductor,  I assumed the root cause was something related to Command Line (server) and not necessarily TAC.
Is my assumption incorrect?
Moderator

Re: [resolved] tSendMail error generating job in TAC but successful in Studio

Hi,
Have you tried to copy external libraries (modules) installed in Talend Studio to :
1. CommandLine : <StudioPath>/lib/java to <CommandLinePath>/lib/java
2. tomcat : <StudioPath>/lib/java to <TomcatPath>/webapps/org.talend.administrator/WEB-INF/lib. to see if it is OK with you?
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: [resolved] tSendMail error generating job in TAC but successful in Studio

Hi,
Have you tried to copy external libraries (modules) installed in Talend Studio to :
1. CommandLine : <StudioPath>/lib/java to <CommandLinePath>/lib/java
2. tomcat : <StudioPath>/lib/java to <TomcatPath>/webapps/org.talend.administrator/WEB-INF/lib. to see if it is OK with you?
Best regards
Sabrina

***** Resolution:  Copy Studio downloaded jars to CommandLine (server), as per:
TalendPlatform_DataServices_IG_5.6.1_EN.pdf
  section "3.6.2.1. Configuring Talend Studio"
    page 53 - "To install modules in CommandLine"
      "If you use the Studio and CommandLine on different machines, you need to retrieve the downloaded .jar files and add them in CommandLine."
1) stopped CommandLine (server)
2) backed up and deleted *.jar in server - /home/centos/Talend-5.6.1/cmdline/studio/configuration/lib/java
3) copied *.jar from
laptop - C:\Talend\5.6.1\studio\configuration\lib\java
to
server - /home/centos/Talend-5.6.1/cmdline/studio/configuration/lib/java
4) restarted CommandLine (server)
Moderator

Re: [resolved] tSendMail error generating job in TAC but successful in Studio

Hi,
Thanks for sharing your resolution here.
Can we consider this topic as resolved?
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: [resolved] tSendMail error generating job in TAC but successful in Studio

Hi,
Thanks for sharing your resolution here.
Can we consider this topic as resolved?
Best regards
Sabrina

Yes this was resolved.