简体   繁体   中英

How to add third party libraries to Talend project?

How to add third party libraries (jar files) to a Talend project ?

One more question is, Each Talend component uses LogFactory , but in my case it is throwing

java.lang.NoClassDefFoundError: org.apache.commons.logging.LogFactory
    at ...

with tSetGlobalVar component, how can I make use of existing logging library to get rid of this exception?

Just to benefit others, with recent release of Talend, they have removed the User libraries.

We need to use the Modules to see, download or install new libraries. We can add Modules view by going to Window -> Show view -> Talend -> Modules . From the Modules section we can manage all the external libraries.

安装或下载外部库

There are two ways to add additional libraries.

  1. Window -> Preferences -> Java -> Build Path -> User Libraries This will include jar files for all the project jobs.

  2. Use the tLibraryLoad component to load a lib file in a job.

As for your second question, this should work out of the box, but it's possible you somehow have a file missing. In your Talend install path, check the plugins directory. The apache logging jar file should be there. In my case: org.apache.commons.logging_1.1.1.v201005080502.jar

If it's missing, then I'd suggest reinstalling Talend (it shouldn't be missing). If it's there, but you're still getting the error, try including it explicitly in the user libraries as described above.

You can import the external jars using tLibraryLoad component or Editing Routine Libraries .

For more information visit

http://vikramtakkar.blogspot.in/2013/03/importing-external-jar-or-library-files.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM