Hi, do you still need to write the java action?
https://docs.mendix.com/howto8/logic-business-rules/extending-your-application-with-custom-java/
'In the Java code, there is a placeholder marked with //BEGIN USER CODE
and //END USER CODE
comment statements. This is where you can add your own Java code. Studio Pro will never overwrite the code between those two statements."
Did you create a new Java Action for this called "Duplicate image document"?
The error message you are seeing is the default for a new Java Action that has had no Java code added to it.
You should probably be calling the DuplicateImageDocument Java Action from the Community Commons module (available in the Marketplace).
Good luck!
Import community commons again, this should fix the issue.