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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Component definition is not added to the job's classpath in Talend 6.5.1

Hello,

 

I've faced an issue when I wanted to check my custom component in the new versions of Talend (6.5.1 & 7.0.1 M2) Actually, what I see that the component's definition part is not added to the classpath of the job thus it cannot be used. It worked well with 6.4.1.

 

It's possible to reproduce this issue if you create the sample component based on the documentation.

  1. Download and unzip: TOS_ESB-20180116_1512-V6.5.1.zip
  2. Create the a demo component from archetype by following the steps in the documentation:
    mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeGroupId=org.talend.components -DarchetypeArtifactId=input-component-archetypes -DarchetypeVersion=0.19.9 -DarchetypeRepository=https://artifacts-oss.talend.com/nexus/content/repositories/TalendOpenSourceRelease/
  3. Change directory to the generated source (cd components-file) and build the component
  4. Deploy it to TOS (https://help.talend.com/reader/AIx_MlLrdaX0O8KexaMESA/1RaDTf8tgxmJXFfUz3yqRA)
  5. Place a tLogRow and the demo FileInput custom component in a job and wire them together

0683p000009MACs.png Expected: When checking the generated code for the job you shouldn't see unresolved types for the component definition classes

 

 

Error when the code is generated for the job (run the job)

Multiple markers at this line
- org.talend.components.file cannot be resolved to a type
- org.talend.components.file cannot be resolved to a type


Workaround:
- Add both definition and runtime of the custom component to the job's classpath.

The same issue occurs in v7.0.1 M2 as well. Not to mention that the "tLogRow" is not included in TOS_ESB-20171219_1109-V7.0.1M2 bundle, was it intentionally removed?

 

Note that the custom component just works fine with Talend Studio (DI / ESB) 6.4.1 without any manual configuration on the classpath.

 

My question: Did something change in the deploy process for 6.5.1 that the documentation does not cover?

I haven't find related questions issues on the community site yet 😕

 

Environment:

  • Java: 1.8 u144 (64)
  • OS: Windows

 

Thanks,
Zoltán

Labels (2)
11 Replies
ychen
Employee
Employee

Hi Zoltán,

 

Sorry for this late reply and thank you for your Kudo.

 

What you read in the comment of the jira was actually an assumption of one of our developers and was put to start a discussion within the team. Sorry for this confusion.

 

Our developer says this issue is linked closely with the default Studio behavior, to the extent of how the Maven offline mode generally works. With the offline mode on by default, the Studio looks at the lastUpdate tag of the maven-metadata-local.xml file of your component and fetch it only when that date is earlier than what the Studio has at the lastUpdate tag in any of the maven-metadata-local.xml files of its existing components. This also explains why this issue can be resolved by clearing the Mave offline check box.

 

So if you always change the lastUpdate tag of the maven-metadata-local.xml file of your component to a date earlier than that of the Studio when you create your component, this should prevent this issue from coming back.

 

Thanks,

 

Yudong

 

Anonymous
Not applicable
Author

Hi Yudong,

 

Thanks for getting back to me.

To be honest, it doesn't explain why it worked for v6.4.1 in Maven Offline mode. The maven-metadata-local.xml is auto generated during the deploy phase to the local repository so I wouldn't alter that file manually.

Anyways, it would be great to update the documentation and add these instructions in Developing a component using Talend Component Kit as well for the version as of TOS 6.5.1.

 

Thanks for your help!

 

Best,

Zoltán