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
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