MySQL configuration ignored

Maciej Sawicki, modified 13 Years ago.

MySQL configuration ignored

Youngling Posts: 5 Join Date: 1/27/11 Recent Posts
Hi,
I tested Klaros on my desktop. It looks very promising. Now I'm trying to install it on our development server. I'm trying to configure it for using mysql db. But it seems like configuration is ignored.

More details:
System: Ubuntu Server 10.04 64 bit
Installation: Using wizard via Free NX
DB: mysql, db and user klaros created
I edited: /opt/klaros-testmanagement/webapps/klaros-web/WEB-INF/classes/hibernate.properties (uncommented mysql related lines, changed user name and password).
I invoked shutdown.sh and startups.sh scripts.

Problem is that in klaros i have steel old data mysql db is empty.

I will appreciate any advice.

regards,
Maciej Sawicki
thumbnail
Tobias Schmitt, modified 13 Years ago.

RE: MySQL configuration ignored

Padawan Posts: 71 Join Date: 2/12/09 Recent Posts
Hello Maciej,

first of all welcome to our community and thank you for your kind words. You have to edit the "hibernate.properties" in the klaros home directory. The file in the installation directory is used to bootstrap the application.

You will find the klaros home directory most likely under "/home/<USER_YOU_STARTED_KLAROS_WITH>/.klaros". If you edit the "hibernate.properties" file there, the changes will be visible after a restart of Klaros-Testmanagement.

If you use windows you will find the klaros home directory most likely under "C:\Documents and Settings\USER_YOU_STARTED_KLAROS_WITH\.klaros>".

You should revert the changes you made in "/opt/klaros-testmanagement/webapps/klaros-web/WEB-INF/classes/hibernate.properties" to avoid any problems


Regards,

Tobias Schmitt
Maciej Sawicki, modified 13 Years ago.

RE: MySQL configuration ignored

Youngling Posts: 5 Join Date: 1/27/11 Recent Posts
Hello Tobias,
Thank you for quick answer. I still have some problems/questions:

1. there is no ~/.klaros directory. I always use the same account, but I check all /home/* dirs, so I'm sure there is no any local .klaros dir in my system. I used Ubuntu 10.04 64 bit and klaros 3.2.3 - Build 826. Can I just create it, or this situation indicates some error?
2. I want to run Klaros as service but i would like to not crate shell user for it. Is it possible? Where in such case should i put config files?

regards,
Maciej Sawicki
thumbnail
Torsten Stolpmann, modified 13 Years ago.

RE: MySQL configuration ignored (Answer)

Jedi Council Member Posts: 755 Join Date: 2/12/09 Recent Posts
Hi Maciej,

1. The .klaros directory is created automatically when klaros is launched for the first time, so you do not have to create it beforehand. Are yo sure you installed it under your account and not under e.g. root? What does echo $HOME give under your account?

If you create the directory before the first start and it already contains a valid hibernate.configuration file the database will be created with the settings given within.

So if your installation is working there has to be .klaros directory somewhere. Something seems to be strange with your setup.

2. You can run this under your account, but I would definitly not recommend this for a production environment. In this case the configuration file would reside in $HOME/.klaros.

Hope this helps.

Regards,

Torsten
Maciej Sawicki, modified 13 Years ago.

RE: MySQL configuration ignored

Youngling Posts: 5 Join Date: 1/27/11 Recent Posts
Hi Torsten,
Thank you for help. I found it emoticon It's in /root/.klaros. it's probably because I installed it with using sudo.

The problem is that I can't install it with out using sudo because it needs permission to write in /opt.

Would prefer holding configuration in /etc. I would like to have separate user for klaros, how ever i would prefer not crating home dir for it. Is it possible?

regards,
Maciej Sawicki
thumbnail
Torsten Stolpmann, modified 13 Years ago.

RE: MySQL configuration ignored

Jedi Council Member Posts: 755 Join Date: 2/12/09 Recent Posts
The recommended way would be to create a user klaros with a user home directory set to /opt/klaros-testmanagement and use this as the installation directory.

Using /etc is not recommended since binary attachments will also go into the .klaros/repository directory. If you insist on keeping hibernate.properties in /etc I recommend creating a symlink from /opt/klaros-testmanagement/.klaros/hibernate.properties to a location of your choice under /etc.

Hope this helps,

Torsten
thumbnail
Heiner Westphal, modified 13 Years ago.

RE: MySQL configuration ignored

Youngling Posts: 13 Join Date: 3/2/09 Recent Posts
Hello Maciej Sawicki,

to install klaros to /opt using a non-root user, you can create
/opt/klaros-testmanagement as root and give your klaros-user
write access to it, or change ownership by running the command
chown klaros.klaros /opt/klaros-testmanagement

(if your klaros account is named klaros and got its own group
named klaros).

After that the user klaros can run the installer and choose
/opt/klaros-testmanagement for target folder.
The installer accepts to install into an existing directory.

It is advised not to use the root account for any service that works
without root permissions.

Hope this helps,

Heiner