Thank you.
We reinstalled the module and now it is working.
The documentation mentions the following:
Local Service Errors
If you encounter the message "Local service exited with error" in your runtime logs, for example:
com.mendix.modules.microflowengine.MicroflowException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.RuntimeException: Local service exited with error at DocumentGenerationTest.ACT_TestDocument_WrongLayout (JavaAction : 'Generate PDF from page')
We recommend that you temporarily set the log level of the DocumentGeneration log node to trace. This should give more insight at what stage the action fails.
Edit: The OP Florian mentioned that reinstalling the module fixed the issue.