4

I've been encountering this issue that I find has no information on the web and would like some help as I've been working on this for the last few days with no leads.

Why does my java app suddenly stop working for APFS? It works if I move the app to a non-APFS USB, but when I move the App to the SSD which is formatted to APFS, it stops working.

When I checked the app logs, it turns out that for some reason, certain libraries are not being properly imported/recognized by the app when it is run from the SSD formatted to APFS. Why would it behave differently in an APFS SSD vs an HFS+ usb/hard drive?

I've already isolated the case and found that only the APFS is the common factor. I've tested it in other devices, those that run High Sierra without an APFS drive, and those that run Sierra with an SSD that has not yet been converted to an APFS drive, and only those devices which utilize APFS filesystem formatting are encountering the issue.

Additional Information:

  • Java App has been properly signed, it is distributed personally but not via the App Store.
  • App is bundled using AppBundler not JavaPackager.
  • App runs on previous versions of OSX, and has been distributed and tested working on hundreds of Mac Devices with OSX varying between 10.8 - 10.12
  • Libraries that somehow don’t get recognize are the apache libraries, like commons-lang-2.6 (We haven’t upgraded to 3 yet), commons-logging (had to output the logs manually onto desktop to see what was happening). Strangely, app was able to import sqlite library properly.

Thanks for looking, and would appreciate any advice!

Andre Ty
  • 111
  • 6
  • Could you give us a bit more info about the libraries not being properly recognized? – Aleksandr Oct 04 '17 at 10:03
  • @AleksandrMukhalov I’ve added some of the libraries in the original question. Thanks for looking! – Andre Ty Oct 04 '17 at 10:32
  • is APFS configured to be case sensitive (there used to be this only variant available) ? What about your HFS+ USB drive (usually isn't) ? Class Loaders and bundles rely on file names – Bruno Grieder Oct 12 '17 at 07:22
  • @BrunoGrieder I would think that the variant Apple would release officially would be case sensitive? I think I found the solution though, so I’ll post it. – Andre Ty Oct 12 '17 at 09:56

1 Answers1

2

I’ve managed to fix the above issue, but I’m unsure as to why.

Solution: Update commons.lang.2.6 to commons.lang.3.6

Currently, I’m hoping that it will not encounter any other issue aside from that, but I can only guess as to what was happening.

I think APFS cached a copy of commons.lang.3.6 and used that library instead of my own, so there was an issue with class loaders trying to find the 2.6 version. Since only APFS would have a cached copy, it would allow my app to run on a USB.


I don’t actually know the correct etiquette for finding out the answer to your own question, so please feel free to correct my post if there’s anything I need to change.

Andre Ty
  • 111
  • 6