WAR deployment problems

Questions and Answers on installation, deployment, management, locking, tranasactions of Servoy Application Server

Re: WAR deployment problems

Postby jcompagner » Thu Aug 11, 2016 3:41 pm

maybe have a look at this:


then mounting a piece of the host as a dir that is then used inside the docket as the "home" dir

the log file should be filled when there is really some logging..

the servoy properties file is i think only really filled when you press "save settings" on the admin page. Then the current settings are stored.
If you don't do that, you really use the shipped servoy settings as is, then that is even better for a docker (then the settings are fixed when deployed)

for servoy 8 we stored a bit more and that is related to the active solution that you export. That file is a test for us if you just redeploy or restart tomcat that we don't do the 'import' (nothing is changed)
We just start right away and read in the serialized solution
Only when you drop a new war with a new serialized soluiton, we see that the timestamps are newer inside the war and we will do a real import (of database metadata ,i18n data and so on) and overwrite the files in the home dir.
Johan Compagner
User avatar
Posts: 8084
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: WAR deployment problems

Postby Gordon McLean » Thu Aug 11, 2016 3:47 pm

Thanks Johan I will study this further ...

Gordon McLean
Gordon McLean
Posts: 218
Joined: Wed Aug 03, 2005 12:24 pm
Location: UK

Re: WAR deployment problems

Postby Gordon McLean » Fri Aug 12, 2016 11:47 am

For the benefit of others and me when I forget:

Servoy 8:
- Export War file
- Check Automatically upgrade repository if needed - (Tomcat fails to load if there are any issues with the repository with lots of non related issues (not Servoy's fault!))
- Add in the plugins your solution uses - I also included things like default_validators.jar, converters.jar etc just in case
- I am not using Smart client so removed the beans - add these if you are
- same with lafs
- add the database drivers you are using in my case MySQL
- NG add components that your using
- NG add services
- add a default admin username and password - this needs to be reset when you first load servoy-admin
- add your own properties file or let Servoy generate it for you - this is a tricky one both worked for me but the default was simpler and less problematic
- Check rim only if your using smart client if not, don't, as this presented lots of warnings about memory leaks
- check the databases your using - these must be fully qualified - (you can't employ a war to a remote tomcat server referencing a db on localhost obviously)
- Provide the database connection information for each used database. This is critical in the case of repository and I found starting from scratch to be the best solution i.e. let Servoy rebuild the repository

Copy the war file you have created to the tomcat server. IF your using docker as I am you use:

docker cp ~/Desktop/test.war tomcat:/usr/local/tomcat/webapps/test.war

This copies the war from my desktop to the locally installed docker container.

Once copied tomcat will install the Servoy solution and you can access i.e. with a URL such as


For those wishing to try this it is a great way to install tomcat on your local machine and deploy completed tested solutions to the cloud. The quick instructions are

Install docker by following the instructions on docker.com. This provides you with virtual light weight host machine (linux) and a gui (kitematic). Open Kinematic, select new and search for Tomcat. I used the official version first option which was quick to install, up to date and consistent.

Once installed you can access the container via Kitematic using the Exec button. This takes you direct to Tomcat home in the container so to get to webapps where wars are installed type 'cd webapps' followed by 'ls' you will recognise the folder structure from the Servoy Server folder in developer.

Tomcat within the container is installed in /usr/local/tomcat
Tomcat home in the default install is /root/.servoy/server/[yoursolution]

To copy your war from your desktop:
- first check the name with 'docker images' this shows you a list of installed containers.
- then use the console copy process 'docker cp ~/Desktop/test.war tomcat:/usr/local/tomcat/webapps/test.war'

to get the servoy log file back from docker to your desktop
docker cp tomcat:/root/.servoy/server/[yoursolution]/servoy_log.txt ~/Desktop/

other files in the same directory include

IF you want to try again/reset your container you can either delete it:
Hit X next to container in Kitematic
type 'docker rmi tomcat [or your container ID both of which are got from 'docker images']

The other option is to retain the container and remove the servoy files using the DOCKER terminal window (Exec in Kitematic)
cd /usr/local/tomcat/webapps/
rm [yoursolution].war
rm -R [yoursolution]

cd /root/.servoy/server/
rm [yoursolution]

I cd into the folder to make sure I know where I am you can do this direct with rm -R /root/.servoy/server/[yoursolution] if your brave

The crucial thing about docker as opposed to using a service OR installing Tomcat on your local machine is if you mess up you can start again with no impact on your local machine and no security risk its all local. The second key thing is if you get this working and your happy with it you can deploy to Amazon AWS, Google etc all of whom offer container services many of which are free at the lower use tiers.

I hope this helps someone and more than likely I will need to notes again at some point soon ;)


.....thanks again to Steve and Johan for this input it was a great help. Do bear in mind two things that the guys suggested all of the above works in root it is better if you can get tomcat to work in its own user space. Secondly install a storage volume in docker which I am working at understanding. I will write up a detailed how to if anyone is interested contact me direct
Gordon McLean
Gordon McLean
Posts: 218
Joined: Wed Aug 03, 2005 12:24 pm
Location: UK


Return to Servoy Server

Who is online

Users browsing this forum: No registered users and 1 guest