
Creator II
2017-02-22
10:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[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
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
315 Views
1 Solution
Accepted Solutions

Creator II
2017-03-07
04:15 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Just surprised Talend didn't tell me this option
Loko
315 Views
4 Replies

Anonymous
Not applicable
2017-02-23
03:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Studio/plugins contains Plugin dependencies, not a component one. Add required jars via cConfig component
315 Views

Creator II
2017-02-23
04:03 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
315 Views

Creator II
2017-03-01
08:39 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
315 Views

Creator II
2017-03-07
04:15 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Just surprised Talend didn't tell me this option
Loko
316 Views
