db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "adam jvok" <ajv...@gmail.com>
Subject Re: Cannot get derby.language.logQueryPlan to work
Date Tue, 13 May 2008 11:30:44 GMT
I am indeed using the same working directory for the network server & ij.
Changing that also avoids the problem.

I am not using the embedded driver. (I connect with
jdbc:derby://192.168.1.50:1527/TEST1).

The only processes involved are ij (with the connect URL just stated)
and the network server.

So it seems that starting ij in the same directory as the network
server will cause ij & the server to share the same derby.log. Once
aware of this, I'm not bothered by it, but I still think its a bit odd
for a client and server to share a log file. I appreciate that if you
are using ij with an embedded db, it makes sense to call the log the
'derby.log', but when ij connects to a network server, IMHO, it should
log to an 'ij.log'. But no big deal. Thanks.



On 5/13/08, John Embretsen <John.Embretsen@sun.com> wrote:
> adam jvok wrote:
> > Mamta-
> > Thanks, yes, that does fix the problem.
> > I had already discovered that setting
> > derby.stream.error.file=anywhere_other_than_derby.log
> > also fixed it, which suggests that both ij and the network server are
> > writing to the same derby.log.
> > I don't have a problem anymore, but I do think its a bit odd for a
> > client and server to share the same log file (if that is what is
> > really happening). Perhaps the default log file for ij should be
> > something other than derby.log?
> > Thanks.
>
> The default log file, derby.log, is created and used by Derby's Network
> Server
> as well as the embedded driver (the Network server uses the embedded driver
> to
> connect to databases). If you run the Network Server in one process and an
> IJ
> session using the embedded driver in another process but from the same
> working
> directory, there will most likely be conflicts similar to what you are
> seeing.
> Similarly, this may happen if you are running two server instances from the
> same
> directory.
>
> You should not need to specify derby.infolog.append=true if you are sure you
> have no such conflicts. Simply using the client driver from IJ (URL of the
> form
> 'jdbc:derby://host:port/database') should not delete anything from
> derby.log.
>
> Are you sure you are not using the embedded driver (URL of the form
> 'jdbc:derby:database') from your IJ session or some process other than one
> specific Network Server instance when this happens?
>
> I am not saying there could not be a bug in this area, but I am just not
> able to
> reproduce it at this time.
>
> --
> John
>
>
> > On 5/13/08, Mamta Satoor <msatoor@gmail.com> wrote:
> >> Adam, I haven't looked at this issue enough but I am wondering if you
> >> need to use the property derby.infolog.append=true in order to avoid
> >> the log getting emptied after the session.
> >>
> >> Mamta
> >>
> >> On 5/9/08, adam jvok <ajvok1@gmail.com> wrote:
> >>> Thanks to John for his reply.
> >>>
> >>> I seem to have found the source of my problem, but it seems to point
> >>> to another issue.
> >>>
> >>> Previously I had been working in a single terminal window and only
> >>> checking the derby.log after running the query in ij.
> >>> By keeping an eye on the derby.log (in another terminal) while I'm
> >>> using ij, I see what's going on: The derby.log is being written to as
> >>> expected, but when I terminate ij, the derby.log is emptied (zero
> >>> bytes).
> >>> I have tried terminating ij with 'quit;', 'exit;', 'disconnect;
> >>> quit;', 'disconnect; exit;', all with the same result (empty log
> >>> file).
> >>> However, if I terminate ij with ctrl-C or ctrl-D, the log file remains
> >> intact.
> >>> Why is this?
>
>
>

Mime
View raw message