Child pages
  • Getting Started from Source
Skip to end of metadata
Go to start of metadata

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

  1. Download and unpack myWMS LOS 1.8 Source (myWMS-1.8.x-source.zip).
    You will find it on sourceforge.net/projects/mywmslos/files/.
  2. 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.
  3. 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.
  4. Download and unpack the WildFly application server.
    You will find it on www.wildfly.org/. The recommended version is 8.2.0.
  5. 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.

  6. 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'.

  7. 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'.

  8. 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.

  1. Create a new role named 'jboss' with password 'jboss'
  2. Create a new database named 'los.reference' with owner 'jboss'
  3. 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.

  1. Copy $media/config/wildfly82/standalone/configuration/standalone.xml to $wildfly/standalone/configuration
  2. 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.
  3. Create a folder workspace for an Eclipse and Netbeans workspace in $media.
  4. 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.)
  5. 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.
  6. Open 'Servers' view with 'Window - Show View' or 'Window - Show View - Others'.

Create a new server runtime.

  1. 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.
  2. Right click on the WildFly server and choose open.
  3. Open 'Timeouts' and set 'Start'-parameter to 500.
  4. Open 'Open launch configuration'. In the 'Arguments'-Tab and add or change the following VM arguments entries: ' -Xms128m -Xmx1024m -XX:PermSize=256m'.
  5. Close the tab and confirm to save the changes.

Setting up Sources

Setup mywms.as module in Eclipse.

  1. 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'.
  2. 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'.
  3. 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.
  4. You may be asked to change to a certain view. You can check the 'remember my decision'-box and press OK.
  5. 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'.
  6. Choose 'Add External JARs...' Browse to $media/server.app/mywms.as/lib/. Choose all available jar files and press 'OK'.
  7. 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'.

  1. Repeat the steps a-e from 'Setup mywms.as module in Eclipse' but choose 'los.common-ejb' instead of 'mywms.as'.
  2. 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'.
  3. Switch to the 'Libraries'-tab and choose 'Add Library' and add 'WildFly 8.x' as 'Server Runtime'. Press 'Finish'.
  4. 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.

  1. Choose 'File - New - Project'. In the project type selection wizard select 'General/Project'. It is important not to create a new 'Java Project'.
  2. Name it 'LOS Reference Server App' and disable option 'Use default location'. Browse to and select $media/server.app and press 'Finish'.
  3. Open Ant view with 'Window - Show View - Ant'. Drag 'build.xml' from newly created project into the 'Ant'-view.
  4. 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.

  1. Create a new plain project, not a java-project, likein  the step before and name it 'LOS Reference DB'.
  2. Disable 'Use default location' and browse to $media/database/postgres and check 'OK', then 'Finish'.
  3. Maybe you want to check connection.properties to configure another database.
  4. Drag 'build.xml' from the newly created project into the 'Ant'-view.
  5. Run 'postgres.local.createSchema'.
  6. Run 'postgres.local.init'.
  7. 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.

  1. Start Netbeans with parameter userdir $media/workspace
  2. Choose 'File / Open Project' and browse to $media/rich.client/los.clientsuite.
  3. You will get a project called 'LinogistiX LOS Client'. To see the content of the suite expand 'LinogistiX LOS Client / Modules'.
  4. 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.

  1. Open the context menu on the project 'Linogistix LOS Client'.
  2. Select 'Package as | ZIP Distribution'.
  3. Choose 'File / Open Project' and browse to $media/rich.client/los.reference.

You will get a project called 'LOS Reference Client'.

  1. Open the context menu on the project 'LOS Reference Client'. And choose 'Properties'.
  2. Navigate to the Libraries category and select 'Manage Platforms...'
  3. Choose 'Add Platform...'
  4. Navigate to $media/rich.client/los.clientsuite/nbplatform/linogistix_clientsuite and Choose 'Finish'.
  5. Now you are able to select the NetBeans Platform 'Linogistix LOS Client'. Make sure that all platform modules are included!
  6. Finish this step with 'OK'.
  7. 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'

 

 

  • No labels