Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

add jar in routines but keep getting java.lang.NoClassDefFoundError: error

I created a routine and right click on that routine then edit routine libraries then add my own jar there. The jar is a very simple one I created myself and tested ok. Then when I import this jar in routine like 

import com.company.myclass

everything looks fine no compile error. Then I use it in my javax component and still no compile error. Only at runtime it throws NoClassFound error. Is there something I missed here?

Labels (3)
4 Replies
Anonymous
Not applicable
Author

Not sure if there is an issue on your jar, can you try also with tLibararyLoad component in a job to see if it works?

Regards
Shong
Anonymous
Not applicable
Author

Hi Alex,

 

      Could you please verify whether the NoClassFound error is for your class (referred in the routine) or some other class indirectly referred by your class?

 

       You are doing the right verification steps and I would strongly suggest to try the option specified by Shong ie to try to create a job with tLibrarayLoad.

 

       I had experience a similar issue in one of my Talend routine where a class for http core was indirectly getting referred from my class. Once I added the indirectly referred class by adding http core library, things started working normally.

 

       Could you please try above step and let us know the results?

 

Warm Regards,

 

Nikhil Thampi

Anonymous
Not applicable
Author

Yes using tLoadLibrary resolves the issue. My class is simple so no indirect path yet, but it is a good point to remind myself. Thanks!

Anonymous
Not applicable
Author

Hi Alex,

 

       Good job 🙂

 

       Could you please mark Shong's reply as the solution for the topic? It will help the next member in our Talend community if they are searching for the same query.

 

Warm Regards,

 

Nikhil Thampi