Installing SOLoist

Before you start with SOLoist framework you have to prepare your system for Java EE development. You will need: Java JDK, Eclipse IDE, Apache Tomcat, StarUML.

If you already have all these installed on your machine, you may skip the next section.

After installing the required software, it is recommended that you download the Empty Project which is prepared for SOLoist development.

System Requirements

Java

Since SOLoist is a Java-based framework you have to install Java first. SOLoist works with Java 1.6. JDK which can be downloaded from Oracle Website.

You can verify if Java is installed properly by typing java –version in your shell/command prompt. The result should similar to this this:

java version "1.6.0_18"

Java(TM) SE Runtime Environment (build 1.6.0_18-b07)

Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode, sharing)

Application Server

For executing SOLoist applications you need to have an application server. This example assumes you have installed Apache Tomcat. SOLoist works with versions 5.5, 6 and 7 which can be downloaded from Apache Tomcat Website.

Eclipse

In this tutorial (and other tutorials on this site) we use Eclipse IDE, but any other Java IDE can be used. Eclipse IDE for Java EE development can be downloaded from Eclipse Website.

Database

SOLoist framework currently officially supports the following databases: MySQL, Oracle and Sybase SQL Anywhere. Before starting with SOLoist, you should install one of the supported databases, create a new schema and a user, and give privileges for the schema to the user.

In SOLoist Tutorial, we used MySQL database which can be freely downloaded from MySQL Website.

StarUML

Being an executable UML framework, SOLoist requires a UML modeling tool. For that purpose you have to use StarUML. StarUML is an open source UML/MDA patform and can be freely downloaded form Sourceforge Website.

After installing StarUML, you have to download and install SOLoist plugin for StarUML.

If you wish to create models compatible with SOLoist, you have to include SOLoist Profile in your UML models, by going to Model -> Profiles.

Importing SOLoist Profile into StarUML model

Running Empty Project

After downloading Empty Project archive file, you should unzip it somewhere in your file system. That will create two folders: EmptyProject and model. In model folder, you will find an empty StarUML model which you can use to create your own domain models.

EmptyProject folder contains an Eclipse project which can be imported into a workspace. To import this project into Eclipse, you should select Import from the File menu and choose General->Existing Project into Workspace.

Navigate to the folder which contains EmptyProject. Check it in the list and click Finish.

You will probably see some errors in the project. That's fine, because you still need to configure the application server.

Open the Servers view, right click and select New->Server. Find Apache Server v7.0 in the list of available application servers, select it and click Next. Provide the directory where you installed Tomcat and click Next. Configure the EmptyProject on the server by selecting it and adding it to the Configured list. Click Finish.

Selecting the Application Server

While you are at it, make sure you increase Tomcat's startup time by double clicking on the Tomcat server in Server view, and entering a higher value (e.g. 360) in the Start field.

Increasing Tomcat Startup Timeout

You also need to configure targeted runtimes for your project. You can do so by going to Project's Properties (right click on the project -> Properties), Targeted Runtimes. Check Apache Tomcat v7.0.

At this point, you should have no errors in your project. The structure of the project should be as in the figure below.

Note that there are two folders for source code in this project: src and init. SOLoist configuration files are stored in the src folder. SOLoist follows the convention over configuration principle, so there is a minimum of configuration required:

  1. Enter the database name, username and password into db.properties file. For more details see SOLoist Database Configuration wiki page.
  2. Setup the file repository path in soloist-config.xml.
  3. Set the log file path in log4j.xml.

More details about configuration can be found on SOLoist Configuration wiki page.

You are now ready to start you first SOLoist application. Start the server by right clicking it and selecting Start.

Now visit: http://localhost:8080/EmptyProject in your browser to see your first SOLoist app at work!