Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

What is the correct structure of the MANIFEST.MF in the classpath.jar?

Hi
We have implemented many Talend Jobs in TIS (4.2) using a common project for sub jobs that are used by all or most of the main jobs. The jar of the common jobs is included in the built zip file but this presents issues when we want to change the common jobs code as we need to rebuild all the jobs to pick up the changes.
We now want to move to a position of holding the common jobs jar files in a separate directory and referencing them from each job so we can make changing common code easier.
I have managed to do this manually by moving the jars from the extracted zipped job then adding the relative paths to the MANIFEST.MF in the included classpath.jar file. This works fine.
I have tried to automate this with a Talend job but I get errors due to the structure of the MANIFEST.MF file.
The structure of the working file with ../../../COMMON_JARS/ prefixed to each moved jar is shown below:
Manifest-Version: 1.0
Implementation-Vendor: Talend Open Studio
Class-Path: ../../../COMMON_JARS/close_control_5_0.jar extract_charge_info_hist
_4_1.jar ../../../COMMON_JARS/open_control_5_1.jar ../../../COMMON_JARS/set_edw_status_0_1.jar ../lib/a-j-interop.jar ../li
b/activemq-all-5.1.0.jar ../lib/advancedPersistentLookupLib-1.0.jar .
./lib/commons-collections-3.2.jar ../lib/db2jcc.jar ../lib/db2jcc_lic
ense_cisuz.jar ../lib/db2jcc_license_cu.jar ../lib/dom4j-1.6.1.jar ..
/lib/external_sort.jar ../lib/javacsv.jar ../lib/jaxen-1.1.1.jar ../l
ib/jboss-serialization.jar ../lib/log4j-1.2.15.jar ../lib/ojdbc6-11g.
jar ../lib/TalendSAX.jar ../lib/talend_file_enhanced_20070724.jar ../
lib/tns.jar ../lib/trove.jar ../lib/xdb.jar ../lib/xercesImpl.jar ../
lib/xmlparserv2.jar ../lib/systemRoutines.jar ../lib/userRoutines.jar
../Rules/
I have tried a number of formatting approached for the MANIFEST.MF but non work. I get the error
java.lang.ClassNotFoundException: dfreg.extract_charge_info_hist_4_1.EXTRACT_CHARGE_INFO_HIST
I have made sure the fields Manifest-Version: 1.0, Implementation-Vendor: Talend Open Studio and Class-Path: have a CR and LF after each section.

Does anyone know what the correct structure of the MANIFEST.MF is?
Thanks in advance Dave
Labels (5)
3 Replies
alevy
Specialist
Specialist

I've done this in the past for a project. I think the issue is there's a maximum width of the MANIFEST.MF file. You need to ensure that any changes you make stay within the width of the file Talend's generates.
Also, be careful with this approach if you start sharing the lib folder in particular: I found that, later, when I wanted to update one of the jobs using the shared jars, but using a later version of the studio than I'd originally used, the new job would not play nicely with the shared jars because some of those had been updated (new/changed/removed methods).
Anonymous
Not applicable
Author

Thanks alevy
I have changed the Talend job to line break at 70 charcters as per an unchanged MANIFEST.MF (below)
Manifest-Version: 1.0
Implementation-Vendor: Talend Open Studio
Class-Path: extract_estate_intrst_3_0.jar ../../../COMMON_JARS/close_c
ontrol_5_0.jar ../../../COMMON_JARS/open_control_5_1.jar set_status_3
_0.jar ../lib/a-j-interop.jar ../lib/activemq-all-5.1.0.jar ../lib/adv
ancedPersistentLookupLib-1.0.jar ../lib/commons-collections-3.2.jar ..
/lib/db2jcc.jar ../lib/db2jcc_license_cisuz.jar ../lib/db2jcc_license_
cu.jar ../lib/dom4j-1.6.1.jar ../lib/external_sort.jar ../lib/javacsv.
jar ../lib/jaxen-1.1.1.jar ../lib/jboss-serialization.jar ../lib/log4j
-1.2.15.jar ../lib/ojdbc6-11g.jar ../lib/TalendSAX.jar ../lib/talend_f
ile_enhanced_20070724.jar ../lib/tns.jar ../lib/trove.jar ../lib/xdb.j
ar ../lib/xercesImpl.jar ../lib/xmlparserv2.jar ../lib/systemRoutines.
jar ../lib/userRoutines.jar ../Rules/
But the error still occurs. Any ideas?
Cheers Dave
alevy
Specialist
Specialist

If the original export from Talend worked and all you did was move some jars and update the MANIFEST.MF accordingly, then no. Sorry.