Forum Discussion
Sorry that’s the error message when I had the field as an expression property. This is the actual stacktrace ( the property is defined as a String and then the .get(PROPERTY_NAME) is used in the configure() method ):
SnapCompletionService
com.snaplogic.snap.api.SnapDataException: Private key: asdasd is undefined. Perhaps you meant: task, Base64, parseFloat, parseInt
at com.snaplogic.snap.api.impl.PropertyValuesImpl$ValidatingExpressionProperty.eval(PropertyValuesImpl.java:1056)
at com.snaplogic.snap.api.impl.PropertyValuesImpl$ValidatingExpressionProperty.eval(PropertyValuesImpl.java:993)
at com.snaplogic.snap.api.impl.PropertyValuesImpl.getValueFor(PropertyValuesImpl.java:741)
at com.snaplogic.snap.api.impl.PropertyValuesImpl.getValueFor(PropertyValuesImpl.java:679)
at com.snaplogic.snap.api.impl.PropertyValuesImpl.getValueFor(PropertyValuesImpl.java:669)
at com.snaplogic.snap.api.impl.PropertyValuesImpl.get(PropertyValuesImpl.java:656)
at com.snaplogic.snap.api.impl.PropertyValuesImpl.get(PropertyValuesImpl.java:593)
at com.iwconnect.snaps.GPGAccount.configure(GPGAccount.java:100)
at com.snaplogic.cc.util.SnapUtil.configure(SnapUtil.java:374)
at com.snaplogic.cc.snap.common.SnapRunnableImpl.configureSnap(SnapRunnableImpl.java:732)
at com.snaplogic.cc.snap.common.SnapRunnableImpl.execute(SnapRunnableImpl.java:585)
at com.snaplogic.cc.snap.common.SnapRunnableImpl.doRun(SnapRunnableImpl.java:877)
at com.snaplogic.cc.snap.common.SnapRunnableImpl.call(SnapRunnableImpl.java:436)
at com.snaplogic.cc.snap.common.SnapRunnableImpl.call(SnapRunnableImpl.java:120)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Resolution: Check the spelling of the variable
Only the passphrase is used as an expression and it works fine, however, the private key and public key do not work as expected.
public String getPassphrase() {
return passphrase.eval(null).toString();
}
public String getPrivateKey() {
return privateKey;
}
public String getPublicKey() {
return publicKey;
}
I’m confused by that stack trace since the line numbers for PropertyValuesImpl.java don’t correspond to the current version of the code, which hasn’t changed in months. What version of the platform are you using?
Also, have you tried restarting your node since changing the property from an expression to not an expression? I’ve seen issues where the platform caches some metadata about property definitions and the cache won’t reset unless you restart the process.
Related Content
- 2 years ago
- 4 years ago
- 6 years ago