tsendmail - Error Exception in thread "main" java.lang.NoClassDefFound

Six Stars

tsendmail - Error Exception in thread "main" java.lang.NoClassDefFound

Hi, 
I am using Talend DMP v6.2.1. I am trying to configure the tsendmail component and it is giving me the following error. 
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/mail/util/SharedByteArrayInputStream
at employeeintegration.mailtest_0_1.MailTest.tSendMail_1Process(MailTest.java:916)
at employeeintegration.mailtest_0_1.MailTest.tPostjob_1Process(MailTest.java:709)
at employeeintegration.mailtest_0_1.MailTest.runJobInTOS(MailTest.java:4844)
at employeeintegration.mailtest_0_1.MailTest.main(MailTest.java:4583)
Caused by: java.lang.ClassNotFoundException: com.sun.mail.util.SharedByteArrayInputStream
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
I understand that it is not able to find the java class. So i downloaded the javax.mail.jar and imported it using import external jars. I also added this jar to the jre/lib folder. Restarted the studio and ried to run it again. Still gives me the error. I am using basic gmail SMTP comfiguration.
Moderator

Re: tsendmail - Error Exception in thread "main" java.lang.NoClassDefFound

Hi,
What does your job design look like? Did you follow up document about:TalendHelpCenter:Installing external modules to install your external jar file? Does this issue repro on other build version?
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.
Six Stars

Re: tsendmail - Error Exception in thread "main" java.lang.NoClassDefFound

Hi xdshi,
I followed the steps given by talend to install the external modules. I believe the job design should not make any difference. This component should work even if this is the only component in the job. And that is how i am testing it. I have used this component in other versions of talend and it works fine. The component gives the same error for my colleague who is using the same version of Talend. Am not getting this issue with any other component i have used for my job design.
Do i just raise a ticket with Talend for quicker help?
Moderator

Re: tsendmail - Error Exception in thread "main" java.lang.NoClassDefFound

Hi,
Would you mind reporting a ticket on talend support portal so that we can give you a remote assistance on your issue to see if it is a bug on Talend DMP v6.2.1 through support cycle?
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.
Six Stars

Re: tsendmail - Error Exception in thread "main" java.lang.NoClassDefFound

Hi,
After some more troubleshooting, I found that the error only come up when my studio is connected to GIT. The same studio when i run it on a local project, the component works fine. Can you give me any suggestions on how GIT usage can effect the libraries or the components in the studio? Would switching to SVN be the solution for this? 
Thanks in advance!!