db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Waagan <Kristian.Waa...@Sun.COM>
Subject Re: Hanging around derby.log, how to center it?
Date Tue, 16 Mar 2010 14:29:06 GMT
On 16.03.10 14:01, Gabriele Kahlout wrote:
> and then, are these property settings permanent (stored by derby in
> some way), or do I need to set them at each app execution?
>    

The two properties mentioned must be set each time Derby is booted. More 
about properties in the Reference Manual [1].

As a side note, you can also control the value of derby.system.home by 
changing the current working directory before starting the VM (this is 
probably not a feasible solution in most cases).


-- 
Kristian

[1] http://db.apache.org/derby/docs/dev/ref/ref-single.html#rrefproper32213

> 2010/3/16, Kristian Waagan<Kristian.Waagan@sun.com>:
>    
>> On 14.03.10 16:46, Gabriele Kahlout wrote:
>>      
>>> I've added the following lines of code in my db init, but they still
>>> didn't make a difference:
>>>
>>> System.setProperty("derby.stream.error.filederby.stream.error.file",
>>> dir.getPath() + File.separator + "derby.log");
>>> System.setProperty("derby.system.home", dir.getPath() );
>>>
>>>        
>> Hi,
>>
>> If the above is verbatim from your app, 'derby.stream.error.file' is
>> written twice, making the property name invalid.
>>
>> Note that some properties must be set before the Derby driver is loaded,
>> or alternatively be included in the 'derby.properties' file.
>> Further, note that 'derby.system.home' cannot be set by specifying it in
>> the Derby property file. You must either set it on the command line, or
>> with System.setProperty before the driver is loaded (watch out for the
>> JDBC driver auto-loading feature here).
>>
>>
>> Hope this helps,
>> --
>> Kristian
>>
>>      
>>> 2010/3/13, Bernt M. Johnsen<Bernt.Johnsen@sun.com>:
>>>
>>>        
>>>> Hi again,
>>>>
>>>> FYYI: The logDevice is not the derby.log file, but the database log
>>>> where the database transactions are logged wrt e.g. database recovery
>>>> (which is something completely different than the textual derby.log)
>>>>
>>>>
>>>>          
>>>>>>>>>>>>>>>> Gabriele Kahlout wrote (2010-03-13
12:23:37):
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>                         
        
>>>>> Hello,
>>>>>
>>>>> I've developed an application with Java DB, and in the setup i let the
>>>>> user choose where to save the db folder. However i've noticed that the
>>>>> derby.log will hang around, at the user desktop.
>>>>>
>>>>> I've came across this: logDevice=logDirectoryPath
>>>>> So I thought of editing the creating string to:
>>>>>
>>>>> DriverManager.getConnection("jdbc:derby:"+parentPath + File.separator
>>>>> +"db.sqlwrapper;create="+ create + ";logDevice="+parentPath);
>>>>> However, this only made things worse. The derby.log file still hanged
>>>>> around, and now an extra log folder is added outside db.sqlwrapper.
>>>>> So how can I get rid of this derby.log being created, or at most (and
>>>>> perhaps at best) be located in the same directory as db.sqlwrapper is?
>>>>>
>>>>>
>>>>> --
>>>>> Regards,
>>>>> K. Gabriele
>>>>>
>>>>> --- unchanged since 25/1/10 ---
>>>>> P.S. Unless a notification (LON), please reply either with an answer
>>>>> OR with " ACK" appended to this subject within 48 hours. Otherwise, I
>>>>> might resend.
>>>>> In(LON, this) ∨ In(48h, TimeNow) ∨ ∃x. In(x, MyInbox) ∧ IsAnswerTo(x,
>>>>> this) ∨ (In(subject(this), subject(x)) ∧ In(ACK, subject(x)) ∧
>>>>> ¬IsAnswerTo(x,this)) ⇒ ¬IResend(this).
>>>>>
>>>>> Also note that correspondence may be received only from specified a
>>>>> priori senders, or if the subject of this email ends with a code, eg.
>>>>> -LICHT01X, then also from senders whose reply contains it.
>>>>> ∀x. In(x, MyInbox) ⇒ In(senderAddress(x), MySafeSenderList) ∨ (∃y.
>>>>> In(y, subject(this) ) ∧ In(y,x) ∧ isCodeLike(y, -LICHT01X) ).
>>>>>
>>>>>            
>>>>          
>>>
>>>        
>>
>>      
>
>    


Mime
View raw message