Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

file_open_dialog rise an error while opening a CSV-file on a Mac - no problems on a PC

Vlad_Ghitulescu
Participant
0 Kudos
947

Hey,

a problem somehow similar to one I had before with XLSX-files: Trying to open a file - this time a CSV-file - works as expected on a PC but leads to an error on a Mac.

Details:

I'm using a report that use cl_gui_frontend_services=>file_open_dialog

in order to read a CSV-file.

I do this in the SAP GUI and / or in Eclipse IDE

  • on a PC (HP Zbook running Windows 11 Enterprise Version 21H2 - SAP GUI 7.70 - Eclipse 2022-03 (4.23.0) and
  • on a Mac (MacBook Pro 13" M2 2022 running macOS Ventura 13.1 - SAP GUI 7.80 - Eclipse 2022-12 (4.26.0)

using the same CSV-file.

On the PC there are no issues.

On the Mac I get this error message

---

=============================================================
Request environment
=============================================================
SU: YG4:SE80:ZPM_MIG_ADR_CLEANSING_GIS_KORR:19c32740
TL: Level3: Intern
CS: /Applications/SAPGUI%207.80rev1/SAPGUI%207.80rev1.app/Contents/Resources/Java/platinr3S.jar
PL: com.sap.platin.base.security.SAPGUIPolicy
PR: permission java.io.FilePermission "/USERS/VLAD/KORREKTUR.CSV", "read";
PR: canonical file name: /Users/Vlad/korrektur.csv

=============================================================
Trustlevel grant block
=============================================================
grant  principal com.sap.platin.base.security.GuiSessionPrincipal "#Level3" {
    permission java.lang.RuntimePermission "getenv.*";
    permission com.sap.platin.base.security.ApplicationPermission "<<ALL FILES>>", "openDocument";
    permission com.sap.platin.base.security.ApplicationPermission "*", "openURL";
}

=============================================================
Temporary permissions
=============================================================
Key: FileChooser
 {
    permission java.io.FilePermission "/Users/Vlad/OneDrive - E.ON/EGS/Migration BayernWerke/AdressBereinigung/korrektur.csv", "read";
    permission java.io.FilePermission "/Users/Vlad/korrektur.csv", "read";
}

Key: WebView JavaFX permissions
 {
    permission javafx.util.FXPermission "createTransparentWindow";
    permission javafx.util.FXPermission "loadFont";
}

Key: 19c32740
 principal com.sap.platin.base.security.GuiSessionPrincipal "YG4:*:*:19c32740" {
    permission java.io.FilePermission "/private/var/folders/k5/njrhvddj3yv2mzx687s_3mb80000gp/T/Vlad/SAPGUI/YG4.19c32740/tmp", "read,write,delete";
    permission java.io.FilePermission "/private/var/folders/k5/njrhvddj3yv2mzx687s_3mb80000gp/T/Vlad/SAPGUI/YG4.19c32740/work/*", "read,write,delete";
    permission java.io.FilePermission "/private/var/folders/k5/njrhvddj3yv2mzx687s_3mb80000gp/T/Vlad/SAPGUI/YG4.19c32740/tmp/*", "read,write,delete";
    permission java.io.FilePermission "/private/var/folders/k5/njrhvddj3yv2mzx687s_3mb80000gp/T/Vlad/SAPGUI/YG4.19c32740/tmp/-", "read,write,delete";
    permission java.io.FilePermission "/var/folders/k5/njrhvddj3yv2mzx687s_3mb80000gp/T/Vlad/SAPGUI/YG4.19c32740/work/*", "read,write,delete";
    permission java.io.FilePermission "/var/folders/k5/njrhvddj3yv2mzx687s_3mb80000gp/T/Vlad/SAPGUI/YG4.19c32740/tmp/*", "read,write,delete";
    permission java.io.FilePermission "/var/folders/k5/njrhvddj3yv2mzx687s_3mb80000gp/T/Vlad/SAPGUI/YG4.19c32740/work", "read,write,delete";
    permission java.io.FilePermission "/var/folders/k5/njrhvddj3yv2mzx687s_3mb80000gp/T/Vlad/SAPGUI/YG4.19c32740/tmp/-", "read,write,delete";
    permission java.io.FilePermission "/var/folders/k5/njrhvddj3yv2mzx687s_3mb80000gp/T/Vlad/SAPGUI/YG4.19c32740/work/-", "read,write,delete";
    permission java.io.FilePermission "/private/var/folders/k5/njrhvddj3yv2mzx687s_3mb80000gp/T/Vlad/SAPGUI/YG4.19c32740/work", "read,write,delete";
    permission java.io.FilePermission "/private/var/folders/k5/njrhvddj3yv2mzx687s_3mb80000gp/T/Vlad/SAPGUI/YG4.19c32740/work/-", "read,write,delete";
    permission java.io.FilePermission "/var/folders/k5/njrhvddj3yv2mzx687s_3mb80000gp/T/Vlad/SAPGUI/YG4.19c32740/tmp", "read,write,delete";
    permission com.sap.platin.base.security.ApplicationPermission "/var/folders/k5/njrhvddj3yv2mzx687s_3mb80000gp/T/Vlad/SAPGUI/YG4.19c32740/tmp/-", "openDocument";
    permission com.sap.platin.base.security.ApplicationPermission "/Users/Vlad/Downloads/-", "openDocument";
    permission com.sap.platin.base.security.ApplicationPermission "/var/folders/k5/njrhvddj3yv2mzx687s_3mb80000gp/T/Vlad/SAPGUI/YG4.19c32740/work/*", "openDocument";
    permission com.sap.platin.base.security.ApplicationPermission "/var/folders/k5/njrhvddj3yv2mzx687s_3mb80000gp/T/Vlad/SAPGUI/YG4.19c32740/work/-", "openDocument";
    permission com.sap.platin.base.security.ApplicationPermission "/var/folders/k5/njrhvddj3yv2mzx687s_3mb80000gp/T/Vlad/SAPGUI/YG4.19c32740/tmp/*", "openDocument";
    permission com.sap.platin.base.security.ApplicationPermission "/Users/Vlad/Downloads/*", "openDocument";
    permission java.io.FilePermission "/Users/Vlad/OneDrive - E.ON/EGS/Migration BayernWerke/AdressBereinigung/korrektur.csv", "read,write,delete";
    permission java.io.FilePermission "/Users/Vlad/korrektur.csv", "read,write,delete";
}

Key: 19c32740:listFiles
 principal com.sap.platin.base.security.GuiSessionPrincipal "YG4:SE80:ZPM_MIG_ADR_CLEANSING_GIS_KORR:19c32740" {
    permission java.io.FilePermission "/Users/Vlad/Downloads/-", "read";
    permission java.io.FilePermission "/Users/Vlad/Downloads", "read";
    permission java.io.FilePermission "/Users/Vlad/Downloads/*", "read";
}

Key: 4eb575c:listFiles
 principal com.sap.platin.base.security.GuiSessionPrincipal "YG4:SE80:ZPM_MIG_ADR_CLEANSING_GIS_KORR:4eb575c" {
    permission java.io.FilePermission "/Users/Vlad/Downloads/-", "read";
    permission java.io.FilePermission "/Users/Vlad/Downloads", "read";
    permission java.io.FilePermission "/Users/Vlad/Downloads/*", "read";
}


java.security.AccessControlException: access denied ("java.io.FilePermission" "/USERS/VLAD/KORREKTUR.CSV" "read")
at: java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:485)
at: java.base/java.security.AccessController.checkPermission(AccessController.java:1068)
at: com.sap.platin.r3.control.GuiSapInfo$10.run(GuiSapInfo.java:2116)
at: com.sap.platin.r3.control.GuiSapInfo$10.run(GuiSapInfo.java:2070)
at: java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at: java.base/javax.security.auth.Subject.doAsPrivileged(Subject.java:509)
at: com.sap.platin.r3.control.GuiSapInfo.listFiles(GuiSapInfo.java:2069)
at: java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at: java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at: java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at: java.base/java.lang.reflect.Method.invoke(Method.java:568)
at: com.sap.platin.base.automation.GuiClassDescriptor.invoke(GuiClassDescriptor.java:152)
at: com.sap.platin.base.automation.GuiAutomationDispatcher.invoke(GuiAutomationDispatcher.java:573)
at: com.sap.platin.base.automation.GuiAutomationCall.invoke(GuiAutomationCall.java:212)
at: com.sap.platin.base.automation.GuiAutomationProcessor.processAutomationCallList(GuiAutomationProcessor.java:210)
at: com.sap.platin.base.automation.GuiAutomationProcessor.processDataFromServer(GuiAutomationProcessor.java:159)
at: com.sap.platin.base.automation.GuiAutomationProcessor.handleDataFromServer(GuiAutomationProcessor.java:74)
at: com.sap.platin.base.protocol.GuiMultiplexer.processDataFromServer(GuiMultiplexer.java:206)
at: com.sap.platin.base.protocol.GuiMultiplexer.run(GuiMultiplexer.java:59)
at: java.base/java.lang.Thread.run(Thread.java:833)<br>

---

I've already changed the permissions of the CSV-file to unixy 777

Vlad@Vlads-MBP ~ % ls -lisa *.csv

6670724 6512 -rwxrwxrwx@ 1 Vlad  staff  3333913  7 Mai 18:31 korrektur.csv

This happens regardless of the place of the file (in the root directory, in Downloads / on the Desktop, in OneDrive) and regardless of the file-name (with or without spaces in the name etc.).

I get the same error in Eclipse IDE and in the SAP GUI.

The file is also NOT in quarantine:

Vlad@Vlads-MBP ~ % xattr korrektur.csv
com.apple.lastuseddate#PS
com.apple.macl
com.apple.metadata:_kMDItemUserTags
com.apple.provenance

Do you have any idea?

Thanks in advance!

Regards,

Vlad

1 ACCEPTED SOLUTION

junwu
Active Contributor
0 Kudos
801

https://me.sap.com/notes/0002646928

check if changing the trust level makes any difference.

5 REPLIES 5

junwu
Active Contributor
0 Kudos
802

https://me.sap.com/notes/0002646928

check if changing the trust level makes any difference.

0 Kudos
801

hmmm… all I've got is a blank page

Could you give me a hint where / how I could change the trust level?

I suppose here somewhere

What exactly should be changed?

junwu
Active Contributor
0 Kudos
801

File---->edit trust level

0 Kudos
801

I see it now! I have this here:

Which would you suggest, the "Produktiv" one?

0 Kudos
801

It works with "Produktiv" - thank you very much Jun Wu!