Custom Components (javajet) - Import Jar from Component Folder

Highlighted
Five Stars

Custom Components (javajet) - Import Jar from Component Folder

Hello,

i found a potential bug in Talend version 7.2.1 with the classic javajet custom components (same result with TOS-ESB-7.3.1M).

Up to and including version 7.1.1, Custom Components could include JAR files in the Component folder. These were then referenced in the XML by <Import> Tags.

 

This option does not seem to work anymore in version 7.2.1.

 

Example Configuration :

<?xml version="1.0" encoding="UTF-8"?>
<COMPONENT>
...	
	</ADVANCED_PARAMETERS>
	<CODEGENERATION>
		<IMPORTS>
            <IMPORT NAME="slf4j-api-1.7.21.jar" MODULE="slf4j-api-1.7.21.jar" REQUIRED="true"/>
            <IMPORT NAME="logback-core-1.1.7" MODULE="logback-core-1.1.7.jar" REQUIRED_IF="TYPE == 'LOGBACK'"/>
            <IMPORT NAME="logback-classic-1.1.7" MODULE="logback-classic-1.1.7.jar" REQUIRED_IF="TYPE == 'LOGBACK'"/>
            <IMPORT NAME="log4j-over-slf4j-1.7.21.jar" MODULE="log4j-over-slf4j-1.7.21.jar" REQUIRED_IF="LOG4J_OVER_SLF4J_ENABLED == 'true'"/>
            <IMPORT NAME="jul-to-slf4j-1.7.21" MODULE="jul-to-slf4j-1.7.21.jar"  REQUIRED="true" />
            <IMPORT NAME="jcl-over-slf4j-1.7.21" MODULE="jcl-over-slf4j-1.7.21.jar" REQUIRED="true" />
	    <IMPORT NAME="slf4j-simple-1.7.21" MODULE="slf4j-simple-1.7.21.jar"  REQUIRED_IF="TYPE == 'SIMPLE'" />
	</IMPORTS>
	</CODEGENERATION>
	<RETURNS>
	</RETURNS>
</COMPONENT>

 

Example TOS-ESB-7.1.1:

TOS-7.1.1.png

 

Example TOS-ESB-7.1.1:

TOS-7.2.1.png

 

Component Folder (used same folder for 7.1.1 and 7.2.1):

folder.png

 

The error can also be reproduced with common Talend Exchange Components  like tFileExcel-Components 11.0 by Jan Lolling.

 

Best Regards

Uli


Accepted Solutions
Five Stars

Re: Custom Components (javajet) - Import Jar from Component Folder

I solved the problem by checking the changes from Jan Lolling (jlolling@github) in this components.

@jlollingThank you very much.

 

The trick is to set a "pseudo" Maven attribute.

 

For example:

<!-- wrong -->
<IMPORT NAME="commons-pool2" MODULE="commons-pool2-2.4.2.jar" REQUIRED="true" />

<!-- right -->
<IMPORT NAME="commons-pool2" MODULE="commons-pool2-2.4.2.jar" MVN="mvn:org.talend.libraries/commons-pool2-2.4.2/20191127" REQUIRED="true"/>

View solution in original post


All Replies
Moderator

Re: Custom Components (javajet) - Import Jar from Component Folder

Hello,

It seems V 7.2 is not list in this exchange component compatibility table.

Compatibility
  • 7.1
  • 7.0
  • 6.5
  • 6.4
  • 6.3
  • 6.2
  • 6.1

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: Custom Components (javajet) - Import Jar from Component Folder

Hello Sabrina,

 

thanks for your reply.

Does this mean that exchange components will be not supported in Talend 7.2 and further versions?

 

Best Regards

Uli

 

Five Stars

Re: Custom Components (javajet) - Import Jar from Component Folder

Hello Sabrina,

 

I think it is interesting for all developers of custom components based on the javajet engine to see if it is still supported.

Does this mean that exchange components (javajet) will be not supported in Talend 7.2 and further versions?

 

Best Regards

Uli

Five Stars

Re: Custom Components (javajet) - Import Jar from Component Folder

Hello Sabrina,

 

you didn't answer my last question:

---

I think it is interesting for all developers of custom components based on the javajet engine to see if it is still supported.

Does this mean that exchange components (javajet) will be not supported in Talend 7.2 and further versions?

---

 

Best Regards

Uli

Five Stars

Re: Custom Components (javajet) - Import Jar from Component Folder

I solved the problem by checking the changes from Jan Lolling (jlolling@github) in this components.

@jlollingThank you very much.

 

The trick is to set a "pseudo" Maven attribute.

 

For example:

<!-- wrong -->
<IMPORT NAME="commons-pool2" MODULE="commons-pool2-2.4.2.jar" REQUIRED="true" />

<!-- right -->
<IMPORT NAME="commons-pool2" MODULE="commons-pool2-2.4.2.jar" MVN="mvn:org.talend.libraries/commons-pool2-2.4.2/20191127" REQUIRED="true"/>

View solution in original post

Seventeen Stars

Re: Custom Components (javajet) - Import Jar from Component Folder

Actually this MVN attribute is not a dummy. This is the location where the lib should be located.

My problem with it is: the studio itself put the lib at this place (without knowing this attribute) and therefor it is a bit strange the developer has to know where the lib will be copied by the studio.

I would understand if the studio would take the MVN attribute as command where to copy the lib to the maven repo or even better where to find it (with updating the maven repo with the standard maven update method).  

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 3

Read about some useful Context Variable ideas

Blog