Hi there
I am trying to get the sample java callout with properties (from the github apigee-platform-samples/doc-samples/java-properties) working in the vscode Apigee emulator.
As per the github sample, my java policy looks as follows:
Additionally the Java class is as follows:
However when I try to run a sample proxy using the above within an Emulator within VSCode, I experience the following "No appropriate constructor found in JavaCallout class com.apigeesample.JavaProperties" error when deploying the API proxy to a sample environment:
Any suggestions on how to workaround this? It would appear that the error occurs whenever I try to define a constructor with a Map parameter.
Did you manage to find a workaround? I'm experiencing the same issue.
"No Appropriate Constructor" could mean ...the emulator is looking for a default constructor, one that accepts no parameters.
I don't know why that would be. in fact it seems like a bug. (I haven't read the documentation extensively on the emulator, but it seems to me it should run valid Java callouts). Try to add the default ctor and see if you get past the error.
default constructor worked for me.
facing the same issue, any workarounds?
You need to add an empty constructor to the class. It worked for me.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |