[ 
https://issues.apache.org/jira/browse/DERBY-7141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17555100#comment-17555100
 ] 

Richard N. Hillegas commented on DERBY-7141:
--------------------------------------------

The simplest thing to do would be to point derby.system.home into the directory 
tree which macOS has assigned to your application. Set the following system 
property BEFORE you boot any databases:

  System.setSystemProperty("derby.system.home", 
"/Users/myUserName/Library/Application Support/myDir");

That will cause Derby to write derby.log to 
/Users/myUserName/Library/Application Support/myDir. It will also cause Derby 
to create databases under that directory too--provided that you use relative 
file names in your connection URL. That is, if your connection URL looks like 
this:

  jdbc:derby:myDatabaseName;create=true

then Derby will write the database files into the directory subtree rooted at

  /Users/myUserName/Library/Application Support/myDir/myDatabaseName

For more information, please consult the "Derby embedded basics" section of the 
Derby Developer's Guide. The following topics are especially useful:

  https://db.apache.org/derby/docs/10.16/devguide/cdevdvlp17453.html

  https://db.apache.org/derby/docs/10.16/devguide/cdevdvlp13018.html

  https://db.apache.org/derby/docs/10.16/devguide/cdevdvlp25889.html

  https://db.apache.org/derby/docs/10.16/devguide/cdevdvlp846369.html

Hope this helps,
-Rick


> Unable to deploy RCP with sandbox entitlement true
> --------------------------------------------------
>
>                 Key: DERBY-7141
>                 URL: https://issues.apache.org/jira/browse/DERBY-7141
>             Project: Derby
>          Issue Type: Bug
>          Components: Eclipse Plug-in
>    Affects Versions: 10.14.2.0
>         Environment: MacOS 12.4. M1(2020)
>            Reporter: Ralph Bosson
>            Priority: Major
>              Labels: OS-X, derby, embeded, entitlement, sandbox
>
> First - just thank you - !
> The issue I'm reporting pertains to the Derby embedded database within an 
> Eclipse RCP.3/Hibernate/Spring/Derby application in an OS X environment.  
> Signing and notarizing the application without the entitlement 
> "com.apple.security.app-sandbox"<true> allows the app to download and run as 
> expected.  It may be downloaded at 
> https://www.corgroup.com/free/freeSignup.html. When functioning as designed 
> an embedded Derby database is created the first time the application is 
> launched. A welcome screen is then displayed and the user is able to complete 
> the setup.
>  
> The problem occurs when the entitlement 
> "com.apple.security.app-sandbox"<true> is added during the app signing 
> process. With the sandbox enttitlement set to true the database is not 
> created. Apparently with the sandbox entitlement I am unable lauch the app 
> through the terminal so no useable error is available. Without the sandbox 
> entitlement the application may not be deployed to Apples App Store. 
> Any guidance will be greatly appreciated.
>  
> List of all entitlements:
>     <key>com.apple.security.app-sandbox</key>
>     <true/>
>     <key>com.apple.security.assets.pictures.read-only</key>
>     <true/>
>     <key>com.apple.security.cs.allow-dyld-environment-variables</key>
>     <true/>
>     <key>com.apple.security.cs.allow-jit</key>
>     <true/>
>     <key>com.apple.security.cs.disable-library-validation</key>
>     <true/>
>     <key>com.apple.security.files.downloads.read-write</key>
>     <true/>
>     <key>com.apple.security.files.user-selected.read-write</key>
>     <true/>
>     <key>com.apple.security.network.client</key>
>     <true/>
>     <key>com.apple.security.print</key>
>     <true/>
>     <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
>     <true/>
>     <key>com.apple.security.cs.disable-executable-page-protection</key>
>     <false/>
>     <key>com.apple.security.cs.debugger</key>
>     <false/>
>  
> Be well
> Ralph Bosson



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to