Skip to end of metadata
Go to start of metadata

Once a solution is developed and ready to be deployed to clients, it needs to be moved to the deployment (Application Server) environment. The first step in deployment is getting the solution in a form that can be moved, that is exporting the solution.

Exporting a Solution

There are two formats in which a Servoy solution can be exported: .servoy file or .war file. The solutions of types other than Normal or Web/Smart Client Only can only be exported as a .servoy file.

Exporting To .servoy File

  1. Do one of the following:
    1. Go to File > Export. A window will appear. In the tree, select Servoy > Export Active Solution. Click on the Next button.
    2. Right click on the active solution in the Solution Explorer. Select Export Solution > File Export. A window will appear.
  2. Choose a name and a location for the export file. Click Next.
  3. A list of options is now available. For a simple solution, all these options can be left unchecked. The options include:
    1. Protect Solution with Password - Will require a password to import the solution; an extra security step to reduce unauthorized individuals access to the solution.
    2. Export referenced modules - if checked, it will also export modules attached to the solution. The checked option will spawn an extra window to appear in the wizard to select which modules to export.
    3. Export all tables from referenced servers - if checked, it will export all the tables for any server used in the solution. If it is unchecked, only tables that are actually used in the solution will be exported.

      Note that if this option is unchecked, the tables which are not referenced by the solution will not be exported.

    4. Export metadata tables - if checked, it will export all the metadata files in the workspace which are referenced by the solution. If unchecked, no metadata table will be exported.
    5. Check metadata tables - if checked, before exporting, it will check whether the workspace meta data files are in sync with the database tables. If not, it will throw an exception with the suggestion to update the meta data for the tables first, and it will not continue the export. If it is left unchecked, the export will be done based on the existing workspace meta data files, without checking if they are in sync with the database tables or not. Nevertheless, if no metadata file is found in the workspace, the export will not continue, but throw an exception suggesting to update the meta data for the tables first.
    6. Export solution sample data - if checked, data (from the current connection) for every table exported will be included. All rows or a limited number of rows can be chosen to be exported.

      CAREFUL

      If the dataset is large, then exporting too many rows may fail.

      TIP

      Even if sample data has been exported, if there is data already in a table when importing, it will not move sample data to the table on import.

    7. Export i18n data - exports i18n keys used in the solution
    8. Export users - exports Servoy users specified in user and group security
    9. Export based on DBI files only - if checked, the export will be based on the data model of the .dbi files in the workspace, ignoring the structure of the database tables. If unchecked, the export will be based on the structure of the database tables.
      This option is useful for example when the database that the Developer is connected to contains data model changes that should not be exported with the active solution.
    10. Create import settings - will make the wizard to show an additional page where options used for import can be set; these options will
      be stored in the .servoy file and will be used if you deploy the solution during the export or if you choose to use these options during the import on the Servoy application server admin page
  4. Click Finish (if Export referenced modules is checked, select the modules to be exported, then click Finish)
  5. The .servoy file will appear in the specified location.

Exporting To .war File

  1. Do one of the following:
    1. Go to File > Export. A window will appear. In the tree, select Servoy > Export War File. Click on the Next button.
    2. Right click on the active solution in the Solution Explorer. Select Export Solution > War Export. A window will appear.
  2. Choose a name and a location for the export file. You can use the options described below, then click Next.

     Option Description

    Include active solution and modules

    Export the active solution and its modules. If unchecked, only the Servoy application server is exported.

    Required for NG solutions export. 

    Allow data model changes

    If checked, it allows database structure in case the database structure on the server is different than the one in the export. 

    e.g. table/columns changes or missing sequences

    Export based on DBI files only

    Exports the database meta data information for the main solution and the modules (if needed) using only table definitions.

    This method is used if at export the database is down (or has errors) so tables/servers are not accessible.


    Export all tables from referenced servers

    If checked, it will export all the tables for any server used in the solution. 

    If it is unchecked, only tables that are actually used in the solution will be exported.

    if this option is unchecked, the tables which are not referenced by the solution will not be exported.

    Allow SQL keywords

    It allows exporting tables which contain SQL keywords in table and column names. 

    e.g. table having a column named “title”

    Update sequencesIf checked the sequences will be updated for the servers involved in the export, 

    otherwise they will not be touched.

    Override sequence types

    The sequence types will be overridden for the exported servers.

    Override default types

    If checked, the default values will be overridden for the exported servers. 

    Export metadata tablesExport all the metadata files in the workspace which are referenced by the solution. 
    Check metadata tablesCheck whether the workspace metadata files are in sync with the database tables.

    If it fails, then it throws an exception with the suggestion to update the meta data for the tables first, and the export does not continue. 

    If it is left unchecked, the export will be done based on the existing workspace meta data files, without checking if they are in sync with the database tables or not. 

    If checked and no metadata file is found in the workspace, the export will not continue, but throw an exception suggesting to update the meta data for the tables first.

    Export solution sample dataIf checked, data (from the current connection) for every table exported will be included. 

    All rows or a limited number of rows can be chosen to be exported.

    Careful

    If the dataset is large, then exporting too many rows may fail.

    Tip

    Even if sample data has been exported, if there is data already in a table when importing, it will not move sample data to the table on import.

    Export i18n data

    Exports the i18n keys used in the solution

    Overwrite repository group security settings with import version If checked, it overwrites the security settings for the groups which are exported and already present in the repository on the server.
    Export users

    Exports the Servoy users specified in user and group security

    Automatically upgrade repository if needed

    In case the repository version on the server is lower than the one of the developer used to export the solution, it automatically upgrades the repository.

    Create Tomcat META-INF/context.xmlTomcat specific option. Enable this option so that the options below can be enabled.
    Set antiResourceLocking to trueSet this option to true if running Tomcat on Windows and if having problems undeploying the war file. This option allows Tomcat to workaround the file locking feature of the OS and execute the undeploy. This option will impact the startup time of the war.
    Set clearReferencesStatic to trueSet this option to true if a war undeploy or stop operation causes a memory leak. This option sets static fields to null, thus allowing them to be garbage collected.
    Set clearReferencesStopThreads to trueUse with care. Set this option to true only as a last resort. Please read https://tomcat.apache.org/tomcat-8.0-doc/config/context.html for more information.
    Set clearReferencesStopTimerThreads to trueSet this option to true if after an undeploy or stop operation there are still Timer threads running.
    Minimize JS and CSS resourcesIf checked, then it tries to compress the resources (removes white space, does not obfuscate).

     

     

  3. A list of all the plugins is shown. The plugins that will be used in the war can be left checked, the others can be omitted from the export.
  4. A list of all the beans is shown. The beans that will be used in the war can be left checked, the others can be omitted from the export.
  5. A list of all the laf files is shown. The lafs that will be used in the war can be left checked, the others can be omitted from the export.
  6. A list of all the jdbc drivers is shown. The drivers that will be used in the war and are not provided by the application server in which the war will be deployed can be left checked, the others can be omitted from the export.
  7. In the next dialog it is possible to choose which NG Components to export. The "exported components" list already contains the components required by the solution. However, in case the solution model is used to add components to forms/layouts, more components should be chosen from the "Available components" list.   
  8. Similarly to the components dialog, the exported services can be chosen. 
  9. Select a servoy properties file to be used for the export.
    1. If no file is provided, a default file will be generated. An extra page will be spawned in the wizard, where a few settings need to be specified for the generated servoy properties file:
      - Allow running smart clients - if checked, both smart web clients will be allowed to run, and it must be noted that when restarting the application context in the web container, the RMI classes will not be garbage collected, and that may lead to out-of-memory errors. If it is left unchecked, only web clients will be allowed to run.
      - Port used by RMI Registry - default port is 1099. 
      -The next page allows to export Servoy client licenses keys in the war. If no licenses are set at this point, they can be configured after the war is deployed on the servoy-admin page, otherwise the solution will run in trial mode. (8.1.2)
    2. If a servoy properties file is specified, make sure the SocketFactory.tunnelConnectionMode on 'Network Settings' page in Servoy Admin is set to 'http&socket'.
  10. Click Finish (if no servoy properties file is specified, the needed settings for the default generated file have to be provided on the next page, then click Finish).
  11. The .war file will appear in the specified location.

Quick Start Video

Command line export

War files can also be exported using the command line, please see to be deleted...

  • No labels