Jun 222011

Due to a recent project I started working on a talend component. This blog post is not about how to do this from scratch, I am quite sure that Talend provides enough tutorials about it, alternatively you can do it like me and just use existing components as reference and build your own one (work environments without internet access suck!)

Prior reading this You Should Have:

  • A basic understanding of Talend Data Integration solutions. 
  • A basic understanding how to develop and deploy Talend (Java) components.
  • Knowledge about maven, maven build plugins and ant builds.

My Environment is:

  • Mac OS 10.6.6 with Java 1.6
  • Eclipse 3.5.1 Java EE editon
  • Jaspersoft ETL 4.1.2 (aka Talend Open Studio 4.1.2)


Everything I describe applies for Jaspersoft ETL, Talend Open Studio and Talend Integration suite. The <Jaspersoft ETL workspace dir> is my local Talend repository folder – the Eclipse workspace folder of Jaspersoft ETL.


At The Beginning I found a few items to struggle with:

  • Project structure: 
    • src/main/template: contains all files which are patched during the build process such as the component registration file.
    • src/main/resources: contains all resources such as jet templates, icons, message properties
    • src/test/java: reference implementation of the functionality which shall be in the component
    • for the build (see below):
      • src/assembly, pom.xml for the maven build
      • build.xml for the ant wrapper.
  • Editing Template files: By default Eclipse handles *.javajet files as text files without code completion and syntax highlighting. If you download the m2t JET from http://download.eclipse.org/modeling/m2t/updates/releases/ an editor will be installed. Now go to Preferences > General > Editors > File Associations and add “*.javajet” as extension. Select it and click on the second Add.. button and select “JET-Java Emitter Templates Editor”. Click Ok. Reopen the javajet templates. 
  • To refresh the javajet templates in Talend without restarting it just hit Control+Shift+Function+F3 to re-initialize the code generation.
  • Dealing with JETorg.eclipse.emf.codegen.jet.JETException: The generated java files are in a specific folder. These files can help to understand what the compilation error caused. I linked the folder into my project
    ln -s <Jaspersoft ETL workspace dir>/.JETEmitters/src/org/talend/designer/codegen/translators/<family> ./gen-src
    ln -s <Jaspersoft ETL workspace dir>/.metadata/.log ./log.log
    The log file i monitor with tail on command line.  

The Build And The Component File

I setup maven to maintain the dependencies for my project as I don’t want to collect everything manually, I also want to be able to easily migrate to a later version. Now, as you might now, the component descriptor file requires a list of component specific imports. For obvious reasons I did not want to create this list manually, therefore I wrote a little ant script which wraps the maven build and patches the component descriptor.

The maven build file is responsible to collect all required files and bundle it as a single zip file. I used

  • the maven dependencies plugin to download all required jars into the target folder during prepare-package phase.
  • the maven assembly plugin for collecting all resources and bundling into a zip file during package phase.

The ant build is has only a few targets

  • a prepare target which triggers mvn clean prepare-package
  • a patch method which utilizes the (evil) antcontrib library to iterate over the jars and collect their names which are written in the required structure into the component file. 
  • a package target which triggers mvn package.


Popularity: 33% [?]

Tags: , , , , , , , ,
Jan 212010

I downloaded Talend Open Studio version 3.2.0. The vanilla installation doesn’t have a mac executable – my initial try getting a modified talend executable just ended up in errors.

Today I found some further information.

1. Fixing the executable

1. add executable flag (chmod +x) on
2. edit the Info.plist file in /TOS-All-r30698-V3.2.0/TalendOpenStudio-macosx-carbon.app/Contents
=> insert tag

=> modify tag

I still get an error message Invalid Thread Access. When I ignore it and try it again Talend Open Studio starts. Unfortunately it keeps predictably crashing by doing something.

Later I found another thread that recommends setting JDK 1.6 VM parameters additionally:

If you are running Java 1.6 by default, like I am, then you need to do the following.  Otherwise, skip down to step 9.
Right click on the TalendOpenStudio-macosx-carbon file (it should have
an Eclipse icon next to it) and choose “Show Package Contents” from the
7.) Open up the Contents -> Info.plist file.
8.) Scroll
down to the bottom of the file and you will see a key called Eclipse. 
It has an <array> node and says in the comment block: “to use a
specific Java version (instead of the platform’s default) uncomment one
of the following options:”.  I uncommented out the following line:
and then saved the file and closed it.

The error message still appears, TOS still crashes.

Now I am going to try out TOS 4.0.0 M2.

Download, unzip, the mac executable is executable by default. Hurray! But, alas! Clicking on it brings this error: The TalendOpenStudio-macosx-carbon executable launcher was unable to locate its companion launcher.jar. WTF? Mac OS is not officially supported in version 4. It is quite obvious why. Digging around brought me to this forum post that recommends to set the valid launcher in the eclipse.ini:
For a successfull launch, you have to update the following old lines in this ini file


with the following new lines:

Talend Open Studio starts without the invalid thread access message. Hurray! Doing my simple test lets it crash again:

  • add a new business model, add a data item, try to enter a name – crash
  • add a new job, try to search a component – no search box available.

I think it is a complete fail and not worth investigating any more. What a pity.

Popularity: 10% [?]

Tags: , ,