I am looking to pass in public/private keys into an external transform. I’ve added the credentials to my repository, i’ve added the decorator that specifies i’m passing in credentials in an external transform. At runtime when I call .get() on the credentials, I’m seeing the following error in the logs. Any clue what is going on? It would appear to be an issue in an underlying library that Foundry calls
An error occurred while calling o2.loadClass.
: java.lang.ClassNotFoundException: com.palantir.foundry.credential.api.OneTimeAccessKeyServiceBlocking
Hey @kkarg,
Can you provide the code snippet where you are trying to access the credentials? Note that you e.g. cannot access the credentials in a UDF.
Also, just in case, can you please make sure that the repository is upgraded to the most recent version?
Sure thing! Here’s the code that I’m calling, you’re correct that I’m trying to access credentials in a UDF. Let me know if you think that’s still the source of the issue. and I’ll try constructing the credentials variable outside of the UDF
I am looking to pass in public/private keys into an external transform. I've added the credentials to my repository, i've added the decorator that specifies i'm passing in credentials in an external transform. At runtime when I call .get() on the credentials, I'm seeing the following error in the logs. Any clue what is going on? It would appear to be an issue in an underlying library that Foundry calls
An error occurred while calling o2.loadClass.
: java.lang.ClassNotFoundException: com.palantir.foundry.credential.api.OneTimeAccessKeyServiceBlocking
Yup, that won’t work. You need to pass the credentials as an argument to reactivate_token, e.g. by updating it to def reactivate_token(access_token_state, refresh_token, privateKey, publicKey) and pass them via F.lit(privateKey). Let me know if that resolves your issue or if it still doesn’t work.