db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: Hanging around derby.log, how to center it?
Date Mon, 29 Mar 2010 09:09:31 GMT
On 03/26/10 11:33 PM, Gabriele Kahlout wrote:
> Okay, so this (uncommented or commented lines):
>
>  final Properties prop = new java.util.Properties();
>             prop.setProperty("derby.locks.deadlockTrace", "true");
>             prop.setProperty("derby.stream.error.logSeverityLevel",
> Integer.toString(20000));
>             prop.setProperty("derby.language.logStatementText", "true");
>             //final File log = new File(dir.getAbsolutePath() +
> File.pathSeparator + "derby.log");
>             //prop.setProperty("derby.stream.error.file",
> log.getAbsolutePath());
>             prop.store(new FileOutputStream(new File(dir,
> "derby.properties")), "derby.properties");
>
> The log keeps getting created in the working directory, and also
> nothing is written into it although I get:
>   

Does the variable dir point to the current working directory? That's
where Derby will look for derby.properties (unless the derby.system.home
system property has been set, that is), so if it points to some other
directory, Derby won't be able to find the derby.properties file created
by this code.

-- 
Knut Anders

Mime
View raw message