I recently published a module with a single java action that gets the file type based on the extension and file contents. Might be useful for other people who need this:
Link: File Type Checker
I recently published a module with a Java action that gets the file type based on the extension and content.
Might be useful for others reading this question.
Link: File Type Checker
"isn't allowed to run"... Could you be more specific?
Do you get an AccessControlException?
That part of the error merely indicates that something went wrong during the commit. The actual cause is usually a little further down in the stack trace.
Could you post the entire stack trace?
Ah... that doesn't give us much more to go on.
Probably a redundant question, but is there anything in your BCO microflow that could cause the 'return false' ?
Any error in the java-action itself (Except for IO, which you catch) should be thrown and result in a standard Mendix log error. I have seen situations in the past where this didn't happen properly however.
Could you change your 'catch' from IOException to Exception? That should catch any and all exceptions and result in a logline right away.
If I recall correctly, a java.security exception refers to an error with the java.policy security settings (as opposed to a permission issue with the file or folder you're trying to access).
However, in all cases that I've encountered a similar error, it would also occur locally when EmulateCloudSecurity was enabled (as you stated it is, for you).
That would mean that either the java.policy settings as emulated by your local deployment are different from those in the MxCloud, or I'm overlooking something.
[Edited: Removed double post]