Getting started with myWMS LOS
Release: 1.8
This is a description how to set up myWMS LOS. For the other releases have a look to the installation instructions of that release.
Programing Environment
Requirements
- Download and unpack myWMS LOS 1.8 Source (myWMS-1.8.x-source.zip).
You will find it on sourceforge.net/projects/mywmslos/files/. - Copy the content of this archive to any preferred directory.
Beware that there are no spaces within the directory/file name. This could lead to errors. Below we will call it$media.
- Download and install the Java SDK. The recommended version is 'Oracle JAVA SDK version 1.8'.
Beware that we need the SDK, not the JRE. - Download and unpack the WildFly application server.
You will find it on www.wildfly.org/. The recommended version is 8.2.0. Copy the content of the WildFly archive to the directory
$media/wildfly8.2.0.Final
Below we will call it $wildfly. It is necessary to use that path, because it is referenced by the build-scripts.Download and install the Eclipse programming IDE.
You will find it on www.eclipse.org.
The checked version is Eclipse Luna Service Release 1 'Eclipse IDE for Java EE Developers'It is important that eclipse uses jdk-1.8 as default jdk. You can check this in eclipse by opening the preferences (Window->Preferences), then navigating to 'Java - Installed JREs'. If jdk1.8 is not listed here click Add, select Standard VM and click next. Now click directory, navigate to your jdk1.8 installation directory (default: C:\Program Files\Java\jdk1.8) and press 'Ok'. Now just check the box next to jdk-1.8 in 'Installed JREs'.
Download and install the Netbeans programming IDE.
You will find it on www.netbeans.org
The recommended version is Netbeans 8.0.2. The Java SE Version is sufficient.Again it is important that netbeans uses jdk-1.8 as default jdk. Enter this in installation process. If this is not done on installation, you can change it later on. To change the netbeans default jdk open 'netbeans installation directory/etc/netbeans.conf' and change 'netbeans_jdkhome' to point to your java jdk1.8 installation directory. You may not be able to save the changes made in 'netbeans.conf', in that case just copy 'netbeans.conf' to your desktop, make the needed changes and copy it back to 'netbeans installation directory/etc'.
- Download and Install the PostgreSQL database.
You will find it on www.postgres.org.
Recommended versions are 9.0, 9.1, 9.2, 9.3
Setup Server
Configure database.
- Create a new role named 'jboss' with password 'jboss'
- Create a new database named 'los.reference' with owner 'jboss'
- These names and passwords are used in some scripts. If you use different names, you have to adapt the login and data-source scripts.
Configure WildFly
We have a set of configuration files to set up WildFly to handle myWMS.
- Copy
$media/config/wildfly82/standalone/configuration/standalone.xml
to$wildfly/standalone/configuration
- Copy the content of
$media/config/wildfly82/ standalone/deployments
to$wildfly/standalone/deployments
Maybe it is necessary to use a different appropriate driver for your version of the databaseserver. - Create a folder workspace for an Eclipse and Netbeans workspace in
$media
. - Start Eclipse and select created folder workspace as Eclipse Workspace. (If 'Selecting workspace dialog' is not shown on startup choose switch workspace command in 'File' Menu.)
- If you do not have JBoss Tools installed in eclipse, open the Eclipse Marketplace from the Help menu, search for the latest JBoss Tools (for Eclipse Luna) and install them.
- Open 'Servers' view with 'Window - Show View' or 'Window - Show View - Others'.
Create a new server runtime.
- Open context menu in 'Server'-view, choose 'New'. Choose 'JBoss Community – WildFly 8.x', browse to your WildFly directory within the project
($wildfly
). Use the default settings, but make sure that the JDK 1.8 Runtime JRE is selected for the execution runtime environment. - Right click on the WildFly server and choose open.
- Open 'Timeouts' and set 'Start'-parameter to 500.
- Open 'Open launch configuration'. In the 'Arguments'-Tab and add or change the following VM arguments entries: '
-Xms128m -Xmx1024m -XX:PermSize=256m
'. - Close the tab and confirm to save the changes.
Setting up Sources
Setup mywms.as module in Eclipse.
- Create a new Project (Menu 'File - New - Project') and select 'Java Project'. Click 'Next' and disable 'Use default location'. Browse to
$media/server.app/mywms.as
. It is important to choose 'Next', not 'Finish'. - Assign a new folder as the 'Default output folder' of the Eclipse project. To do so click 'Browse', then check the root of the directory-tree and select 'Create New Folder ...' and name it
eclipse-out
. Press 'OK'. - After clicking 'Finish' a dialog appears asking you to remove the old location mywms.as/bin. It is important to choose 'No'. Otherwise you will lose content of the 'bin'-folder.
- You may be asked to change to a certain view. You can check the 'remember my decision'-box and press OK.
- Open the context menu on 'mywms.as' project and choose 'Build Path / Add Libraries'. Choose 'Server Runtime' and select 'WildFly 8.x' and press 'Finish'.
- Choose 'Add External JARs...' Browse to
$media/server.app/mywms.as/lib
/. Choose all available jar files and press 'OK'. - Choose 'Add External JARs...' Browse to
$media/server.app/mywms.as/cactus/WEBINF/ lib
and add all the jar files there.
Now the project should be shown without any errors. Any warnings can be ignored.
Project setup for 'los.common-ejb'.
- Repeat the steps a-e from 'Setup mywms.as module in Eclipse' but choose 'los.common-ejb' instead of 'mywms.as'.
- To configure the build path open the context menu on 'los.common-ejb'-project and choose 'Build Path - Configure Build Path'. Choose 'Add' in 'Projects'-tab and click 'select all'. Press 'OK'.
- Switch to the 'Libraries'-tab and choose 'Add Library' and add 'WildFly 8.x' as 'Server Runtime'. Press 'Finish'.
- Choose 'Add External JARs...' Browse to
$media/server.app/lib/external
. Select all the jar files there and press 'OK'.
Project setup for 'los.location-ejb'.
Repeat all steps from Project setup for 'los.common-ejb', but choose 'los.locationejb'.
Project setup for 'los.inventory-ejb'.
Repeat all steps from Project setup for 'los.common-ejb' for 'los.inventory-ejb'.
Project setup for 'los.stocktaking-ejb'.
Repeat all steps from Project setup for 'los.common-ejb' for 'los.stocktaking-ejb'.
Project setup for 'los.mobile'.
Repeat all steps from Project setup for 'los.common-ejb' for 'los.mobile'.
Project setup for 'project-ejb'
This project is needed for customization. So repeat project setup for 'project-ejb'. Repeat all steps from Project setup for 'los.common-ejb' for 'los.project-ejb'.
Project setup for 'server.app'
This project is needed in Eclipse just to access build file $media/server.app/build.xml
.
- Choose 'File - New - Project'. In the project type selection wizard select 'General/Project'. It is important not to create a new 'Java Project'.
- Name it 'LOS Reference Server App' and disable option 'Use default location'. Browse to and select
$media/server.app
and press 'Finish'. - Open Ant view with 'Window - Show View - Ant'. Drag 'build.xml' from newly created project into the 'Ant'-view.
- Run target 'components.build', 'ear.package' and 'jboss.deploy'. This will build all LOS server modules and deploy them to WildFly. Maybe you have to grant JavaVM access to the internet.
Project setup for 'LOS Reference DB'
This project is neeeded in Eclipse to acces ant buid files for database setup.
- Create a new plain project, not a java-project, likein the step before and name it 'LOS Reference DB'.
- Disable 'Use default location' and browse to
$media/database/postgres
and check 'OK', then 'Finish'. - Maybe you want to check connection.properties to configure another database.
- Drag 'build.xml' from the newly created project into the 'Ant'-view.
- Run '
postgres.local.createSchema
'. - Run '
postgres.local.init
'. - Start the server ('Window - Show View - Other - Server - Servers', right click in 'Server'-view on the 'WildFly 8.x at localhost [Stopped]' and select 'Start').
Now all LOS Server Modules are available to you.
Point a web browser to 'http://localhost:8080/los-mobile'.
Now you should be able to login with 'admin', 'admin'.
Setup Client (Netbeans)
If you wish to work with workspaces in Netbeans too, you have to do a little workaround, because Netbeans is not aware of workspaces.
- Start Netbeans with parameter userdir
$media/workspace
- Choose 'File / Open Project' and browse to
$media/rich.client/los.clientsuite
. - You will get a project called 'LinogistiX LOS Client'. To see the content of the suite expand 'LinogistiX LOS Client / Modules'.
- Open context menu on the project and choose 'Clean and Build'.
There is another netbeans suite available called 'LOS Reference Client' This is a reference implementation of the basic 'LinogistiX LOS Client'. To start this application, you first have to create a netbeans platform based on the 'LinogistiX LOS Client' and then you can build and start the reference-implementation.
- Open the context menu on the project 'Linogistix LOS Client'.
- Select 'Package as | ZIP Distribution'.
- Choose 'File / Open Project' and browse to
$media/rich.client/los.reference.
You will get a project called 'LOS Reference Client'.
- Open the context menu on the project 'LOS Reference Client'. And choose 'Properties'.
- Navigate to the Libraries category and select 'Manage Platforms...'
- Choose 'Add Platform...'
- Navigate to $media/rich.client/los.clientsuite/nbplatform/linogistix_clientsuite and Choose 'Finish'.
- Now you are able to select the NetBeans Platform 'Linogistix LOS Client'. Make sure that all platform modules are included!
- Finish this step with 'OK'.
- Open the context menu on the project 'LOS Reference Client'. Choose 'Run'.
On start up a login dialog is displayed and you should be able to log in with
'admin','admin'