Stanczak Group wrote:
When I say absolute I mean in the connection parameters. That's the
only thing that Derby specific. I'm using Toplink with JPA.
Stanley Bradbury wrote:
Hi Paul -
Sounds like you have a lot of experience in the area. Your
architecture seems beyond my experience but I did notice something I
missed in my first read that might be of help. You wrote:
"..I have an absolute path set, but it still does it. Shouldn't it
write everything to that path and not just start writing to where
ever it decides home is? .."
Derby writes the logfile to derby.system.home (this also serves as
the ROOT directory for any relative path references). If this is not
explicitly set prior to loading the Derby driver the value defaults
to the default directory for the JVM. Derby's view of the world is
from the JVM perspective, not the server or application that starts
it. I assume the 'absolute path' you set is an application or server
property?
Anyway, a possible solution for you might be to set derby.system.home
to an appropriate location (the absolute path?) prior to loading the
Derby driver.
HTH
I'm not really familiar with Toplink with JPA, but I'm thinking that
Stanley Bradbury is correct. You need to get derby.system.home set to a
writable directory. If possible you can try to set it using the
-Dderby.system.home=<path to a writable directory> option in your
startup script (HINT: environment variable TOMCAT_OPTS). I'm not sure of
any other way to ensure that that gets set prior to Derby loading.
In searching I found this... something I have not tried, but worth a look...
http://www.velocityreviews.com/forums/t144344-tomcat-50-setting-system-properties-for-an-application.html
Good luck,
Paul