How to add third party libraries to Talend project?

纵饮孤独 提交于 2019-12-03 19:56:10

问题


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?


回答1:


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




回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/11290609/how-to-add-third-party-libraries-to-talend-project

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!