Eval Step Cannot Find the Constructor for a Custom Java Class
What does "com.capeclear.mediation.MediationException: Error eval step" mean in Workday Studio?
An Eval step is trying to construct one of your own Java classes and the expression engine cannot find a matching constructor. Either the class never made it into the deployed archive, or the constructor it does have does not match the arguments being passed to it.
Quick fix
Rebuild so the class files actually exist, redeploy, then call a no argument constructor first to prove the class resolves at all before reintroducing any arguments.
Permanent fix
Keep custom Java behind a small public class with a public no argument constructor and plain setters, and populate it with set calls rather than constructor arguments. That removes constructor matching from the runtime path and makes packaging problems fail loudly on the first call instead of intermittently.
Troubleshooting
- Check the project build output before touching the expression. If the build folder is empty the class was never compiled, and nothing you change in the expression will help.
- Confirm the class is packaged into the deployed archive, not merely present in the workspace. A class that compiles cleanly in the IDE can still be left out of what actually deploys.
- Compare the constructor signature against the call. Count the arguments and check each declared type, remembering the expression engine will not perform all the widening and boxing conversions a Java compiler would.
- Verify the class and the constructor are both declared public. A package private constructor is invisible to the expression engine even when the class name itself resolves.
- Fully qualify the class name in the expression and confirm the package declared in the source file matches the package in the name you are calling.