You are not logged in.

Unanswered posts



Important! This site has been replaced. All content here is read-only. Please visit our brand-new community at https://community.talend.com/. We look forward to hearing from you there!



#1 2017-02-22 16:55:26

Loko44190
Member
32 posts

Loko44190 said:

[resolved] Sending email in a java bean - not finding javax.mail

Hello

I'm writing a bean in the code/beans section, to have a function sending emails that will be called by a cProcessor in my route. (I don't waant to use cMail).

When I do "import javax.mail.*" it says it can't find it. But in the Studio/plugins directory I can see the javax.mail_1.4.0.v201005080615.jar file.

How can I import it in my java code ?

Thank you
Loko

Offline

#2 2017-02-23 09:25:38

aLeXx
Talend Team


aLeXx said:

Re: [resolved] Sending email in a java bean - not finding javax.mail

Studio/plugins contains Plugin dependencies, not a component one. Add required jars via cConfig component

Offline

#3 2017-02-23 10:03:34

Loko44190
Member
32 posts

Loko44190 said:

Re: [resolved] Sending email in a java bean - not finding javax.mail

Hello aleXx

This would work, but does not suit our needs. We're writing generic java libraries in a bean that will be used in hundreds of routes, we can't add a cConfig in all thoses routes and then modify them all at will, we need a centralized solution for easier maintainance.

For instance, in my bean, I can easily import java.util, java.security, java.text, java.time etc ... How can I know the list of all libraries available for import ? and how can I add one to be imported in a bean ?

An other strange issue : in a bean, if I write "import org.apache." the autocompletion does not suggest "org.apache.camel". If I write this it gets red underlined as faulty but it works anyway.
In my java code, same issue, "Message mymessage = .... " shows an error on "Message" not recognized as a type, but it works.

Last edited by Loko44190 (2017-02-23 17:16:25)

Offline

#4 2017-03-01 14:39:30

Loko44190
Member
32 posts

Loko44190 said:

Re: [resolved] Sending email in a java bean - not finding javax.mail

Where is the list of the included java libraries that we can import into a bean without having to use a cConfig ? (such as java.utils.* etc ..) ?
How can we add some libraries at the same level, that will always be available to all routes and all beans ?
Subsidiary question : why isn't "org.apache.camel" recognized in the java bean editor, while it do compile and work ?

Thank you.
Loko

Offline

#5 2017-03-07 10:15:16

Loko44190
Member
32 posts

Loko44190 said:

Re: [resolved] Sending email in a java bean - not finding javax.mail

I finally found by myself : right click on the bean in the Repository view and select "Edit bean libraries".
Just surprised Talend didn't tell me this option
Loko

Offline

Board footer

Talend Contributor Agreement - Talend Website Privacy Policy