Your comments / My replies
[My Comment]: For starters, really really appreciate your insight, expertise and assistance. Want to say thank you up front!
[Your Comment]: "Oi vey! It looks like your app is modifying files inside of its own bundle. This is not supported [1] and will inevitably cause problems in the long term. You need to fix this." [My Reply]: Yes our application is self contained (executables, derby database, log files, etc) with the .app bundle, which we can distribute the entire application with only dealing with a single .app bundled file. This architecture has worked prior to macOSX Catalina with no issues for nearly 10 years. The backup function stopped working in Catalina and continues with Big Sur. Are you saying with the newer macOSXs, it does not support this type of "legacy" architecture (i.e. a single bundled application with executables, database, log files, etc)? If so, can you point me to an Apple architectural best practice documentation so I have some guidance on bundling an application using a derby database and logging system?
[Your Comment]: "Hmmm, that’s strong evidence of a bug in your code. Given the context, it’s very likely that a file system operation has failed due to some MAC restriction." [My Reply]: Again, this code worked prior to macOSX Catalina, but I infer with the newer macOSX security model (e.g. MAC restriction), it has now turned what worked before into a bug which is a null pointer exception. Is there a coding technique best practice I should use to become compliant with this new MAC restriction? btw, I'll reference your supplied link - just want to know what I am looking for.
[Your Comment About run.sh]: "That is going to cause problems. I encourage you to replace this with a native executable." [My Reply]: So run.sh is another "legacy" architecture technique and should be replaced with a native executable? If so, can you point me to an Apple architectural best practice documentation so I have some guidance.
[Your Comment]: "Right. I suspect what’s happening here is as follows:"... [My Reply]: Your five steps to a failure crash definitely sounds plausible. So for an overall remedy: (1) unbundle the application executable code with the database and log files; (2) become compliant with the new macOSX MAC restrictions using On File System Permissions; and (3) replace run.sh with a native executable. Does that three part remedy sound right? I'll definitely have to nail down a road map from the current state to a future state application architecture before diving into this work effort!