db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanczak Group <jus...@stanczakgroup.com>
Subject Re: Embedded in Servlet on Tomcat? Possible Toplink Issue
Date Sun, 23 Jul 2006 01:44:50 GMT
Trying it with the -Dderby.system.home option causes the derby.log to 
show in that spot, but the error still comes up. This has got to be a 
Toplink issue. I'll go that direction now. Thanks.

Stanczak Group wrote:
> I'm still toying with this trying to figure out what's wrong. I may 
> have found something. Seems when I setup HSQL I get the same error. So 
> it looks like this is possibly a Toplink issue and not Derby. I'm 
> going to attempt the system property part and see if that fixes it. 
> I've not used Derby with Hibernate Entity manager, but I have used it 
> on my other apps and it doesn't do it under Hibernate.
> Stanczak Group wrote:
>> I guess what I was thinking is when one says embed, and supplies an 
>> embed driver that means it's embedded and doesn't write to places 
>> other then where you tell it. If I where to set that variable then 
>> all my other apps would also start using it too. With small apps it's 
>> easiest to just have it write to a place in the web application 
>> structure.
>> Paul J DeCoursey wrote:
>>> 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

Justin Stanczak
Stanczak Group

"All that is necessary for the triumph of evil is that good men do nothing."
Edmund Burke

./  _____/..____..._____/..|_..____...____....

View raw message