Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Is it possible to exclude one or more jars from a build?

Hi all. I have a question. Ik have a project containing several jobs, child jobs and custom routines and components. When I run the job in Talend (Open Studio 5.4.1), everything is working as expected: the console stays empty when no errors or warnings occur.
However, when I build the job as an autonomous job and execute the job from a shell (cmd in my case), the console contains the following lines:
--
log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient
.params.DefaultHttpParams).
log4j:WARN Please initialize the log4j system properly.
--
This seems to be caused by either the existence of log4j-1.2.15.jar or the absence of a log4j.properties file.
Without the Log4j jar, everything is working fine.
As far as I can see, there are two possible solutions:
1. Somehow mark the log4j jar for exclusion in the job build;
2. Somehow add a log4j.properties file to the job build;
Of course, both solutions can be performed manually, but I want to make sure every new build is working correctly without performing any manual steps afterwards.
As an extra question: I would like to know which component causes the log4j jar to be there. Is there any way to find out?
Any help is much appreciated!
Labels (2)
12 Replies
Anonymous
Not applicable
Author

Hi,
We will make a investigation on your first issue.
As an extra question: I would like to know which component causes the log4j jar to be there. Is there any way to find out?

Please check the online document TalendHelpCenter:Identify required external modules.
Best regards
Sabrina
Anonymous
Not applicable
Author

Thanks, Sabrina. Interestingly enough, I'm using none of the components which are listed next to log4j-*.jar in the Modules tab. Any idea why it is still there in the build?
And, is there any news on the first issue?
Anonymous
Not applicable
Author

This message occurse if a Logger will be instantiated and found no configuration. Only the presence of the log4j library does not cause an initialization process.
If you are not sure which component needs these classes:
Export your job as jobscript and remove this library. You will get some ClassNotFoundException and in its statck trace you will find the job names.
Anonymous
Not applicable
Author

Hi all!
I have the same problem after building and running my job from CMD.
I found a Jira-Ticket which tells me that log4j.xml should be included when the job is exported. But it is not included in the ZIP-File after building and exporting the job.
https://jira.talendforge.org/browse/TDI-27172
I´m using Talend Open Studio for Data Integration Version 5.4.1.
Anonymous
Not applicable
Author

So I'm still not clear whether it's possible or not to exclude jars from a build process?
I have a situation where I"m deploying a job to hdfs (cloudera cdh5) and wanted to exclude some jars since talend 5.4 uses some packages that aren't compatible with cdh5. I would like to remove those jars during build process. Is that possible?
I know when using maven you can exclude as many jars as you want but not sure whether same principles would be apply here.
Thanks.
Anonymous
Not applicable
Author

Hello,
I have a similar issue : 
I exporting a job as a web service (.war) and the libs used in the user routines are embedded whereas I'm not using any user routine in my job.
I'd like to exclude these libs from the war file.
How can I do, unless modifying the war "by hand" ?
Thank you
Anonymous
Not applicable
Author

Hello, please do not ignore these questions.  There are many of us struggling with this issue and need assistance asap.
Thank you.
Anonymous
Not applicable
Author

How do we exclude java source when exporting job as a war?
Anonymous
Not applicable
Author

Hi,
How do we exclude java source when exporting job as a war?

So far, you have to  modify the exported war file by hand.
Best regards
Sabrina