db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Re: [Fwd: Re: derbynet/getCurrentProperties.java fails]
Date Mon, 17 Oct 2005 20:48:03 GMT
Deepa Remesh wrote:

>>Deepa Remesh wrote:
>>
>>
>>>Thanks Ole for posting the files.
>>>
>>>I did not catch this problem when I ran tests because I was using
>>>trunk/classes to run tests. When I tried with jars, the tests failed
>>>on my machine too. On looking at  derby_tests.policy, the policy for
>>>running with classes covered writes to derby.system.home directory.
>>>But for derbynet.jar, permission to write to derby.system.home was not
>>>in the policy. I have added that and now the test
>>>derbynet/getCurrentProperties.java passes with jars. I am attaching
>>>the patch for policy file with this mail. If there are any comments,
>>>please let me know. I will upload it to JIRA once tests finish.
>>
>>Why does derbynet.jar need to write to ${derby.system.home}?
> 
> 
> With patch for DERBY-375, the default value for
> derby.drda.traceDirectory is "If the derby.system.home property has
> been set, it is the default. Otherwise, the default is the current
> directory." With this change network server may have to write to trace
> files to ${derby.system.home}.

OK, I see now that this is because you fixed DERBY-613 as part of
DERBY-375 (see Kathey's comment in DERBY-375).

This means you need to modify the permissions already granted to
derbynet.jar, not add new ones. Here's the extract from the policy file
for the network server tracing.

  // tracing files - BUG DERBY-613 default location for tracing
  // file is meant to be ${derby.system.home} but instead is ${user.dir}
  // Changes DERBY-613 may require modifying this permission.
  permission java.io.FilePermission "${user.dir}${/}*", "write";

I think you need to change that to something like

  // tracing files, default to derby.system.home
  permission java.io.FilePermission "${derby.system.home}${/}*", "write";

Dan.



Mime
View raw message