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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[solved] import talend Routines in jet part to use own Utils

Hello
i am trying the following:
i want to use the package routines to read metadata for GENERATING, not at runtime of the component
<%@ jet
imports="
org.talend.core.model.process.INode
org.talend.core.model.process.ElementParameterParser
org.talend.core.model.metadata.IMetadataTable
org.talend.core.model.metadata.IMetadataColumn
org.talend.core.model.process.IConnection
org.talend.core.model.process.IConnectionCategory
org.talend.core.model.process.EConnectionType
org.talend.designer.codegen.config.CodeGeneratorArgument
 org.talend.core.model.metadata.types.JavaTypesManager
org.talend.core.model.metadata.types.JavaType
java.util.List
java.util.Map
java.util.HashMap
java.util.Set
java.math.BigInteger
routines.DB
"
%>
And the result is:
Execution failed : Failed to generate code.

[----------

1. ERROR in E:\x163842\Workspace\.JETEmitters\src\org\talend\designer\codegen\translators\dataquality\TFileAidIMSQABeginJava.java (at line 18)

import routines.DB;

       ^^^^^^^^

The import routines cannot be resolved



How can i qualify the
package routines
that it will be found by the jetengine ????

Thanks for your help 0683p000009MACn.png
Labels (4)
5 Replies
Anonymous
Not applicable
Author

You will need to remove the semi colon after "routines.DB" and ensure that you have compiled your routines into a Jar and that the Jar is in the classpath of the component. 
Anonymous
Not applicable
Author

thank you for the responds, i removed the ; already.
I think the jar in the componentfolder will help only in the case that i want to use it inside the component or not ?
regards
dj
Anonymous
Not applicable
Author

i solved it by placing the routines Folder with the compiled classfiles into
C:\Program Files (x86)\Talend-Studio-V5.4.1\plugins\org.talend.designer.codegen_5.4.1.r111943\
Anonymous
Not applicable
Author

That is pretty much what I was suggesting, however you will now have two routines folders/files to update. You will have the one which is available to your Studio for development and the one that is in your components classpath. It would be more logical to create the code that you want for your component, compile as a Jar and then package it with the component. 
Anonymous
Not applicable
Author

I will try that, thank you
actually i am fighting with an
JETException: InvocationTargetException
running the code, which runs perfectly in my unittest. Might be still some config Problem 0683p000009MPcz.png