Skip to main content
Announcements
A fresh, new look for the Data Integration & Quality forums and navigation! Read more about what's changed.
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III

using org.apache.commons.codec.binary.Base64

Hi there,
I am using OpenStudio 3.0.0M3 and facing a roblem with the commons codec Base64 encoder. I can't even use the encoder to be precise.
The class is part of the org.apache.commons.codec.binary inside the commons-codec-1.3.jar which is inside the ./lib/java folder. So I thought its already in the classpath and the only thing to do in my tJavaRow is to add the "import org.apache.commons.codec.binary.Base64" statement.
Sadly, this is not working. As I try to run the job I get an "java.lang.NoClassDefFoundError: org/apache/commons/codec/binary/Base64" exception.
I am accessing the class like "Base64.encodeBase64(something)" in my tJavaRow.
Could you please give me advise how to use this class?
Greetings,
Maximilian
Labels (3)
4 Replies
Anonymous
Not applicable

hi
Did you tried to add libraries thanks "preferences" !?
Anonymous
Not applicable

HI
This problem is very similar to what I faced with Apache modules.
Pls refere to this post.
https://community.talend.com/t5/Design-and-Development/org-talend-designer-components-commons-cannot...

Do let me knw if it worked for you.
Regards
Surya
bluishjoe
Contributor III

For me the solution with tLibraryLoad worked!
Thankyou very much!
Anyway maybe in the meanwhile something better has been implemented?
Thanks
Anonymous
Not applicable

For me the solution with tLibraryLoad worked!
Thankyou very much!
Anyway maybe in the meanwhile something better has been implemented?
Thanks

There are two ways to import and use a external jar.
- Use tLibraryLoad to load the jar in the job.
- Create a custom routine, import the jar in the routine and then call the routine in the job.
Best regards
Shong