The error means that there is no Java code in the Java action. When creating a Java action Mendix makes a template for you where you need to inject your own code. See also the documentation here: https://docs.mendix.com/howto/extensibility/howto-connector-kit/ and here: https://docs.mendix.com/refguide/extending-your-application-with-custom-java/
Regards,
Ronald
Your Java action is throwing a com.mendix.systemwideinterfaces.MendixRuntimeException in the custom code. You need to remove this line to get rid of the error.
Your Java action is also expected to return a String, so make sure you return one.
You will also want to remove the System.out.println. I suggest you log this instead. This link will help.
https://www.robertprice.co.uk/robblog/logging-from-a-mendix-java-action/
Good luck!
package visitor_pass_management.actions;
import com.mendix.systemwideinterfaces.core.IContext;
import com.mendix.webui.CustomJavaAction;
import com.mendix.systemwideinterfaces.core.IMendixObject;
import java.io.File;
import java.io.FileOutputStream;
import org.apache.poi.xslf.usermodel.XMLSlideShow;
public class Java_action extends CustomJavaAction<java.lang.String>
{
private IMendixObject __output;
private visitor_pass_management.proxies.File_output output;
private java.lang.String input;
public Java_action(IContext context, IMendixObject output, java.lang.String input)
{
super(context);
this.__output = output;
this.input = input;
}
@java.lang.Override
public java.lang.String executeAction() throws Exception
{
this.output = this.__output == null ? null : visitor_pass_management.proxies.File_output.initialize(getContext(), __output);
// BEGIN USER CODE
//creating a new empty slide show
XMLSlideShow ppt = new XMLSlideShow();
//creating an FileOutputStream object
File file = new File("example1.pptx");
FileOutputStream out = new FileOutputStream(file);
//saving the changes to a file
ppt.write(out);
System.out.println("Presentation created successfully");
out.close();
throw new com.mendix.systemwideinterfaces.MendixRuntimeException("Java action was not implemented");
// END USER CODE
}
/**
* Returns a string representation of this action
* @return a string representation of this action
*/
@java.lang.Override
public java.lang.String toString()
{
return "Java_action";
}
// BEGIN EXTRA CODE
// END EXTRA CODE
}