CopyFilePathToFileDocument permissions error

1
I am using the Java action CopyFilePathToFileDocument to detach a file from a document and save it to the local drive. This was working when I initially set it up, but seems to have stopped working and I am now getting the error below. The only thing I can think of that's changed on my end is I shared my Desktop folder so that I could access it on my Mac (I'm running Windows XP on VMWare Fusion). Anyone have ideas on what the issue is? An error has occurred while handling the request. [User 'tadmin' with session id '6132a2a1-2b48-4e07-800e-8f672dc6a85a' and roles 'Sales, Approver, Administrator'] com.mendix.modules.microflowengine.MicroflowException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\BarterAttachments\ArtsBoston Barter Entry November-December Mayor's Holiday Special 2015.xlsx" "read") at Barters.ParseAttachments.nested.e69e9cf6-7633-4893-9df0-c4a1f49c1c41 [0 of 1] (JavaAction : 'CopyFilePathToFileDocument') at Barters.ParseAttachments (NestedLoopedMicroflow : '') at Barters.IVK_CreateImportedBarter (SubMicroflow : 'ParseAttachments') Advanced stacktrace: at com.mendix.modules.microflowengine.MicroflowUtil.processException(MicroflowUtil.java:158) Caused by: com.mendix.core.CoreException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\BarterAttachments\ArtsBoston Barter Entry November-December Mayor's Holiday Special 2015.xlsx" "read") at com.mendix.core.component.InternalCore.execute(InternalCore.java:276) Caused by: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\BarterAttachments\ArtsBoston Barter Entry November-December Mayor's Holiday Special 2015.xlsx" "read") at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:217) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\BarterAttachments\ArtsBoston Barter Entry November-December Mayor's Holiday Special 2015.xlsx" "read") at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:43) Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\BarterAttachments\ArtsBoston Barter Entry November-December Mayor's Holiday Special 2015.xlsx" "read") at java.security.AccessControlContext.checkPermission(AccessControlContext.java:372) at java.security.AccessController.checkPermission(AccessController.java:559) at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) at java.lang.SecurityManager.checkRead(SecurityManager.java:888) at java.io.File.exists(File.java:808) at barters.actions.CopyFilePathToFileDocument.storeFileInMendixObject(CopyFilePathToFileDocument.java:90) at barters.actions.CopyFilePathToFileDocument.executeAction(CopyFilePathToFileDocument.java:46) at barters.actions.CopyFilePathToFileDocument.executeAction(CopyFilePathToFileDocument.java:28) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:53) at com.mendix.core.actionmanagement.CoreAction.doCall(CoreAction.java:291) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:276) at com.mendix.core.actionmanagement.ActionManager$1.execute(ActionManager.java:204) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:37) at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:199) at com.mendix.core.component.InternalCore.execute(InternalCore.java:264) at com.mendix.modules.microflowengine.actions.actioncall.JavaAction.execute(JavaAction.scala:46) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:49) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:196) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:151) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:53) at com.mendix.core.actionmanagement.CoreAction.doCall(CoreAction.java:291) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:276) at com.mendix.core.actionmanagement.ActionManager$1.execute(ActionManager.java:204) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:37) at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:199) at com.mendix.core.component.InternalCore.executeSync(InternalCore.java:236) at com.mendix.modules.microflowengine.actions.other.NestedLoopedMicroflowAction$$anonfun$executeLoop$2.apply(NestedLoopMicroflowAction.scala:66) at com.mendix.modules.microflowengine.actions.other.NestedLoopedMicroflowAction$$anonfun$executeLoop$2.apply(NestedLoopMicroflowAction.scala:56) at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:778) at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59) at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48) at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:777) at com.mendix.modules.microflowengine.actions.other.NestedLoopedMicroflowAction.executeLoop(NestedLoopMicroflowAction.scala:56) at com.mendix.modules.microflowengine.actions.other.NestedLoopedMicroflowAction.execute(NestedLoopMicroflowAction.scala:37) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:49) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:196) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:151) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:53) at com.mendix.core.actionmanagement.CoreAction.doCall(CoreAction.java:291) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:276) at com.mendix.core.actionmanagement.ActionManager$1.execute(ActionManager.java:204) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:37) at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:199) at com.mendix.core.component.InternalCore.executeSync(InternalCore.java:236) at com.mendix.modules.microflowengine.actions.SubMicroflowAction.execute(SubMicroflowAction.scala:33) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:49) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:196) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:151) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:53) at com.mendix.core.actionmanagement.CoreAction.doCall(CoreAction.java:291) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:276) at com.mendix.core.actionmanagement.ActionManager$1.execute(ActionManager.java:204) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:37) at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:199) at com.mendix.core.component.InternalCore.execute(InternalCore.java:264) at com.mendix.webui.actions.client.ExecuteAction.execute(ExecuteAction.java:135) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply$mcV$sp(ClientRequestHandler.scala:299) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:292) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:292) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2$$anon$1.execute(ActionDispatching.scala:151) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:37) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2.apply(ActionDispatching.scala:153) at scala.util.Try$.apply(Try.scala:191) at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(ActionDispatching.scala:147) at akka.actor.Actor$class.aroundReceive(Actor.scala:465) at com.mendix.core.session.Worker.aroundReceive(ActionDispatching.scala:140) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) at akka.actor.ActorCell.invoke(ActorCell.scala:487) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238) at akka.dispatch.Mailbox.run(Mailbox.scala:220) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
asked
1 answers
3

Tracy,

The error states that the java security policy is preventing access to the specific location on the C-drive. This would be normal behavior if you have the model running inside the modeler and have the emulate cloud security settings turned on. Could it be that you changed the settings for the emulation in addition to changing the security for the desktop?

In a cloud environment access to directories other than the tmp dir in the data/files dir is restricted for security reasons. If you need to pickup files make sure that they are stored in that directory or a sub directory thereof. When running the app on premise you could consider changing the security policy for the model to allow access to a different directory. I'm not sure if this security change would be an option in a cloud environment, maybe you could ask Mendix support for a statement on this.

Hopes this clarifies the issue you are experiencing.

answered