MS Access Setup with Mendix Application

0
Hi Mendix Community, I have a requirement where i have to import an ms access database into my existing Project. I have used data replication module for this, while synchronizing the database, I get an error - Access Denied. access denied ("java.io.FilePermission" "D:" "read").. D:- is my local Drive. Kindly Suggest your views on this error.
asked
2 answers
3

As per Achiel's comment make sure that cloud settings are disabled. By default Mendix cannot read the filesystem outside the deployment folder.

The access denied error is always caused by cloud security, the other option to get a similar error is if you try to read something at the root of the disk drive. In my experience accessing the file system at the root (as in C:/something, or D:/something) is causing trouble in Java. Usually those reads or writes fail in the default JVM configuration.

There is not need to have read/write access at the top level of your disk, you don't want to give those privileges to Java (as it's a security risk). Just move your access database to any sub folder.

There are several libraries that have some trouble depending on how you specify the path. When specifying a directory Windows always uses a backslash in the directory path, 'C:\MyFolder\SubFolder\database.mda'. In Java a backslash is usually interpreted as an escape character.
Try making it a habit to always use a forward slash, that way it can be cross platform compatible (linux and windows), and there is no risk for misinterpretation. 'C:/MyFolder/SubFolder/database.mda'.


Using Ms Access with Db replication isn't any different from the other databases, simply specify the correct path to the database, and specify the correct credentials. So basically the only difference is that you would specify a file location instead of a url and database name for other types of databases.

answered
0

Are you running locally or in the Mendix Cloud? You seem to be running with cloud security enabled. If you're only planning on running locally you can disable that under Settings | Configurations | Edit | Server, then set "Emulate Cloud Security" to "No"

answered