Menu

#115 Error at first startup: settings.xml permission denied

open
r_x
5
2012-09-18
2010-10-13
Leon
No

I installed Mobile Atlas Creator in Applications (Mac OsX) with admin rights. On first run I get an permission denied on settings.xml. I run the app as a normal, non-admin, user.

Version: Mobile Atlas Creator 1.8 alpha 14 (1227)
Platform: Mac OS X (10.6.4)
Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0_20-b02-279-10M3065)
Mapsources rev: 1226

Error hierarchy:
JAXBException: null
FileNotFoundException: /Applications/settings.xml (Permission denied)

javax.xml.bind.JAXBException

  • with linked exception:
    [java.io.FileNotFoundException: /Applications/settings.xml (Permission denied)]
    at mobac.program.model.Settings.save(Settings.java:226)
    at mobac.program.EnvironmentSetup.checkFileSetup(EnvironmentSetup.java:65)
    at mobac.Main.<init>(Main.java:32)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java:308)
    at mobac.StartMOBAC.main(StartMOBAC.java:27)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at apple.launcher.LaunchRunner.run(LaunchRunner.java:115)
    at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
    at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)
    Caused by: java.io.FileNotFoundException: /Applications/settings.xml (Permission denied)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
    at mobac.program.model.Settings.save(Settings.java:221)
    ... 16 more</init></init></init>

Discussion

  • r_x

    r_x - 2010-10-22

    Please try the latest beta and test if it also have this problem.

     
  • Kai Blankenhorn

    Kai Blankenhorn - 2010-12-08

    Same error for me, this is because Win7 write protects program files for normal users. I just unpacked the zip of 1.8 final (2010-10-31) and started the .exe file. Looking at the code, I see you initialize the directories with the program directory as default if directory.ini is not found. There is no directory.ini in the zip file, and copying the file from the eclipse project into the program directory did not work either.
    The most simple solution is to use ${home}/.mobac as a base for all other directories.
    The 'Windows' way is described here: http://stackoverflow.com/questions/1198911/how-to-get-local-application-data-folder-in-java - this is where

     
  • Kai Blankenhorn

    Kai Blankenhorn - 2010-12-08

    BTW, the stacktrace is as follows:

    Version: Mobile Atlas Creator 1.8
    Platform: Windows 7 (6.1) (windows)
    Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0_22-b04)
    Mapsources rev: 1312

    Error hierarchy:
    JAXBException: null
    FileNotFoundException: C:\Program Files (x86)\Mobile Atlas Creator\settings.xml (Zugriff verweigert)

    javax.xml.bind.JAXBException

    • with linked exception:
      [java.io.FileNotFoundException: C:\Program Files (x86)\Mobile Atlas Creator\settings.xml (Zugriff verweigert)]
      at mobac.program.model.Settings.save(Settings.java:246)
      at mobac.program.EnvironmentSetup.checkFileSetup(EnvironmentSetup.java:81)
      at mobac.Main.<init>(Main.java:48)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at java.lang.Class.newInstance0(Class.java:355)
      at java.lang.Class.newInstance(Class.java:308)
      at mobac.StartMOBAC.main(StartMOBAC.java:43)
      Caused by: java.io.FileNotFoundException: C:\Program Files (x86)\Mobile Atlas Creator\settings.xml (Zugriff verweigert)
      at java.io.FileOutputStream.open(Native Method)
      at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
      at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
      at mobac.program.model.Settings.save(Settings.java:241)
      ... 9 more</init></init></init>
     
  • r_x

    r_x - 2010-12-09

    @kai_b: The directory.ini can not work with v1.8 stable because it has been implemented yesterday (and v1.8 is ~30 days old).

    The final solution for v1.8 is not to install it! Unpack it to a user directory and run it - that's the way it should be used.

     

Log in to post a comment.

MongoDB Logo MongoDB