You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by nicinch <nm...@yahoo.com> on 2012/08/21 17:46:28 UTC

Derby in Read Only


Hello to all

I'm having a weird experience i can't seem to fix.
I have an apache derby database on my windows system that works fine with a
war.
I have copied the apache derby database folder to a debian system and given
the war.
When the tomcat boots up I can access the war's webapp just fine.
Furthermore the webapp finds the derby database and reads it however it has
access in a read only manner.
I have tried to change the rights on the folder but that doesn't do the
trick.
I can't find the derby.log however the Catalina.out does warn that the derby
datasource is opened in a readonly way but does not explain why.

Has anybody had this behaviour and a way to fix?

Thanks for your help.
-- 
View this message in context: http://old.nabble.com/Derby-in-Read-Only-tp34329906p34329906.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Re: Derby in Read Only

Posted by nicinch <nm...@yahoo.com>.
Thanks for your help.

Yep in the end it has nothing to do with the derby database.
I had copied the derby db as my normal user in my home directory.
However tomcat starts with his own tomcat user. In the end I chowned the
derby database in order for databse to be able to fully access it.


nicinch wrote:
> 
> 
> Hello to all
> 
> I'm having a weird experience i can't seem to fix.
> I have an apache derby database on my windows system that works fine with
> a war.
> I have copied the apache derby database folder to a debian system and
> given the war.
> When the tomcat boots up I can access the war's webapp just fine.
> Furthermore the webapp finds the derby database and reads it however it
> has access in a read only manner.
> I have tried to change the rights on the folder but that doesn't do the
> trick.
> I can't find the derby.log however the Catalina.out does warn that the
> derby datasource is opened in a readonly way but does not explain why.
> 
> Has anybody had this behaviour and a way to fix?
> 
> Thanks for your help.
> 

-- 
View this message in context: http://old.nabble.com/Derby-in-Read-Only-tp34329906p34344695.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Re: Derby in Read Only

Posted by "Dag H. Wanvik" <da...@oracle.com>.
nicinch <nm...@yahoo.com> writes:

>
> Has anybody had this behaviour and a way to fix?

Try to open the database in ij and see it it is read-only at the Derby
level. If you can make modifications using ij, the error lies outside
Derby.

e.g. something like

$ java -jar <DERBYROOT>/derbyrun.jar ij
> connect 'jdbc:derby:<mydb>';
> create table foo(i int);
> drop table foo;
> exit;


Thanks,
Dag

>
> Thanks for your help.