Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » After deploying - where to put the database?(The scout server is now on another machine in the network - also the database)
After deploying - where to put the database? [message #1783129] Thu, 08 March 2018 09:26 Go to next message
Sven Powalla is currently offline Sven PowallaFriend
Messages: 7
Registered: January 2016
Junior Member
Hi there,
I hope somebody can give me some hints.
I deployed my scout application with tomcat. The tomcat server is on my linux server machine in the local network. Also I put the derby database on that machine and I had a lot of trouble getting it work. At the moment everything works fine but I had to change the rights of the directory where the database is located to 777.
My question is: What would be the best location to put the database directory in and what should I do with the rights?
I know it's not primarily a scout question but it's strongly related.

thank you for your answers,
Sven
Re: After deploying - where to put the database? [message #1783131 is a reply to message #1783129] Thu, 08 March 2018 09:47 Go to previous messageGo to next message
Patrick Baenziger is currently offline Patrick BaenzigerFriend
Messages: 96
Registered: September 2011
Member
Hello Sven

Am I correct in assuming that you are using Derby as an embedded database in your Scout application (meaning: No distinct Derby executable that is running, but it started and stopped by your Scout app)?
If so, the directory into which you write your database files needs to be writeable by the user Tomcat runs as (this depends on your setup).

Example: You have installed Tomcat from your package manager. Typically it then runs as the "tomcat" user. You can easily determine this by using htop/top or a bit of shell magic when tomcat is running:
ps -eouser,cmd | grep catalina| grep -v grep | tr -s " " | cut -d " " -f1 | uniq


For the best location of your database files, this depends a bit on your preference and exact OS: Usually /opt/<yourAppName> is a safe guess. (See Linux Filesystem_Hierarchy_Standard)
Re: After deploying - where to put the database? [message #1783166 is a reply to message #1783131] Thu, 08 March 2018 16:28 Go to previous messageGo to next message
Sven Powalla is currently offline Sven PowallaFriend
Messages: 7
Registered: January 2016
Junior Member
Sorry, I forgot to mention that Derby is running in server mode.
I first had the database in a directory where it was writeable by the group. When I connected the database via ij it work perfectly, even from a client machine.
But when I started my scout application I always got the "could not find the database" error. In the end I changed the directory to 777 and it worked.
Re: After deploying - where to put the database? [message #1783293 is a reply to message #1783166] Sun, 11 March 2018 06:08 Go to previous message
Sven Powalla is currently offline Sven PowallaFriend
Messages: 7
Registered: January 2016
Junior Member
Hello Patrick,
the hint with the "console magic" was very useful. So I found out that the user who started the Derby server is the user who needs to have write access to the database.
So I created a directory in /opt/myDatabase and changed the owner to the Derby-User. Now it works as I expected.
Thanks!
Previous Topic:Group-wise filter rows in table
Next Topic:How to handle a TableField efficiently?
Goto Forum:
  


Current Time: Thu Mar 28 20:32:58 GMT 2024

Powered by FUDForum. Page generated in 0.03062 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top