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

[resolved] Talend Execution Fails to Generate Code

Hi, 
 I am new to Talend Open Studio, just I have downloaded Version: 5.6.0M1(Build id: r118307-20140604-0708), and I tried to build a simple Java custom component import with custom logic Test.jar.
 
I copied tReplace and  import Test.Jar, tried to create object  for our custom class like com.org.TestCls t=new com.org.TestCls()
 
When run job with tReplace component, getting below error
 
xecution failed : Failed to generate code.
[color=maroon][size=2][font=Courier][----------[/font][/size][/color]
1. ERROR in D:\New folder (2)\TOS_DI-r118307-V5.6.0M1\TOS_DI-r118307-V5.6.0M1\workspace\.JETEmitters\src\org\talend\designer\codegen\translators\custom_code\TJavaBeginJava.java (at line 30)
      com.org.TestCls t=new com.org.TestCls();
      ^^^^^^^
com.org cannot be resolved to a type
----------
2. ERROR in D:\New folder (2)\TOS_DI-r118307-V5.6.0M1\TOS_DI-r118307-V5.6.0M1\workspace\.JETEmitters\src\org\talend\designer\codegen\translators\custom_code\TJavaBeginJava.java (at line 30)
      com.org.TestCls t=new com.org.TestCls();
                            ^^^^^^^
com.org cannot be resolved to a type
----------
[color=maroon][size=2][font=Courier]2 problems (2 errors)][/font][/size][/color]
 
I have tried adding a tLibraryLoad node with the jar specified in the basic settings
 

Not  working  kindly help me 

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Issue was i had declared our custom class with in the block <%  %> , 

now i have changed our code in the outside block <% %> , now working fine 


Thanks a lot for your support , 

By
VinothKumar.K

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Hi,

There are two ways to import and use an external jar.
1)Using tLibraryload component to load the jar file at the begininig of job. for example:
tLibraryLoad
   |
tJava(on tJava, use the external API)

2)Creating custom routine, import the external jar file by clicking on the rouinte name and edting the routine libraries, and then call this routine in the job.


What's the custom component? Have you already checked KB article about:TalendHelpCenter:How to create a custom component?
Best regards
Sabrina
Anonymous
Not applicable
Author

Please check the code error with considering the full code that provided in online with an expert support.
Anonymous
Not applicable
Author

Issue was i had declared our custom class with in the block <%  %> , 

now i have changed our code in the outside block <% %> , now working fine 


Thanks a lot for your support , 

By
VinothKumar.K
Anonymous
Not applicable
Author

Hi VinothKumar.K,
Thanks for your feedback. Can we consider this topic as resolved?
Best regards
Sabrina