You are here: Wiki>Metadata Web>SmartEditor>SmartEditorInstallationGuide (28 Oct 2015, DanielNuest)Edit Attach

smartEditor Installation Guide


This guide is for smartEditor Version 2.1.6.

Editors: Stefan Blume, Kristian Senkler, DanielNuest

Introduction

Smart Editor is a web editor integrating both the INSPIRE metadata publication queryables for services, series, and data and the ISO 19139 metadata implementation of ISO 19115 and ISO 19119 as well.

This document describes the installation and configuration of smartEditor application as you download from 52°North smartEditor web page (http://52north.org/communities/metadata).

Prerequisites - System requirements

Database support

smartEditor supports the following databases:

Servlet Containers

This document assumes you are using Apache Tomcat Servlet Container.

Browsers

  • Firefox
  • Internet Explorer 7 and higher
  • Google Chrome
  • Limited support for Safari

Installation

There are two ways to get the smartEditor and deploy it into your servlet container respectively. For running it within your servlet container it is sufficient to download the binary distribution. If you want to have look into the code or make changes, you might be interested in checking out the sources via Maven and SVN.

Introduction

About the downloaded binary

The smartEditor binary currently available from the 52°North web page is a precompiled web application packaged as a war archive. The file name is:

smarteditor-webapp-.war

The binary file is a zip archive having the file extension .war. For the configuration of this file we suggest to unpack it, apply the proposed changes in this document and put it onto your servlet container afterwards.

About checking out the sources

The sources are hosted by the metadata community’s subversion repository of 52°North. Check out the sources via your favourite SVN client like the following console example:

$ svn co https://svn.52north.org/svn/metadata/smarteditor/trunk/editor

Having the Maven tool in your system path, you can build the web application via the maven goal:

$ mvn install

After that, you should find the smarteditor-webapp-.war file in the editor/smartEditor/target directory.

Internal file structure

The binary distribution contains a set of folders which will be explained in the following:

  • images/
    Contains all images used in smartEditor
  • js/
    Contains all internal JavaScript resources
  • META-INF/
    Contains context information and information about the build process
  • styles/
    Contains all CSS files for rendering the UI
  • tooltips/
    Bundles the html tooltips on metadata elements (multi lingual)
  • WEB-INF/
    • classes/
      Contains configuration and transformation files an d message resources as well
    • defs/
      Configuration files for Apache Tiles page layout
    • config/sql
      SQL files for database setup
    • jsp/
      All Java Server Pages constituting the web frontend lib Set of internal and third - party libraries (jar files)
    • tld/
      Used tag libraries
    • beans-definitions.xml
      Configuration of metadata beans
    • dispatcher-servlet.xml
      Main Spring Framework configuration file
    • dao-definitions.xml
      Definition of businesstier beans
    • service-definitions.xml
      Definition of applied services
    • static-definitions.xml
      Definition of static aspects of the application
    • tiles-definitions.xml
      Definition of tiles
    • validator-definitions.xml
      Validators that are used by the application
    • web.xml
      Servlet Container Deployment Descriptor
    • weblogic.xml
      Deployment Descriptor Extension for Oracle WebLogic Server
  • THIRD_PARTY_LICENSES.txt
    List of all third - party libraries and licenses used
  • index.jsp
    Welcome Page
This folder will be referenced as $EDITOR_HOME in the next chapters.

Database preparation

smartEditor has support for Oracle, PostgreSQL and SQL Server. Please run the scripts according to your database environment.

ALERT! Direct download from source dir currently not possible for license reasons. Please download the sources for version 2.1.6 directly from here

The scripts can be obtained from https://svn.52north.org/svn/metadata/smarteditor/trunk/smarteditor-api/src/main/config/sql/ Additionally these SQL files are part of the binary distribution, see folder WEB-INF/config/sql.

It is recommended to create the tables for an appropriate database user. If no user exists, create e.g. a user “smartEditor” and a belonging tablespace.

The following SQL Scripts are shipped with the distribution:
  • oracle.sql
  • postgres.sql
  • sqlserver.sql
The script creates two tables (SAVED_TEMPLATES and LOCKING) for the storage of smartEditor metadata templates and for maintaining the list of “locked” metadata documents currently being edited by a user.

Servlet container configuration (Apache Tomcat)

The Apache Tomcat folder will be referenced as $TOMCAT_HOME in the next chapters.

Container managed database connections -JNDI configuration

We recommend letting the servlet container provide the management of JDBC connections to your underlying database.

For Apache Tomcat this can be done by creating a global resource configuration.

Open the file $TOMCAT_HOME/conf/server.xml and add the following snippet to the <GlobalNamingResources>-Element:

<Resource name="jdbc/editor" auth="Container" type="javax.sql.DataSource"
      maxActive="100" maxIdle="0" maxWait="10000"
      defaultAutoCommit="false"
      username="[db user]" password="[db password]"
      driverClassName="oracle.jdbc.OracleDriver"
      url="jdbc:oracle:thin:@[database host]:1521:[SID]"/>

Note: This snippet has the Oracle JDBC driver class and JDBC URL connection template pre-configured. You have to change these values if you use a different database! The following example shows a Postgres database configuration for a local database called "smarteditor" with username and password of the same value.

<Resource name="jdbc/editor" auth="Container" type="javax.sql.DataSource"
      maxActive="100" maxIdle="0" maxWait="10000"
      defaultAutoCommit="false"
      username="smarteditor" password="smarteditor"
      driverClassName="org.postgresql.Driver"
      url="jdbc:postgresql://localhost:5432/smarteditor"/>

Copy JDBC Database Driver

When using container managed database connections the jar file containing the database vendor-specific JDBC implementation needs to be accessible to the container. The JDBC driver that matches the database must be copied into the directory $TOMCAT_HOME/lib. The driver appropriate to the database product used is usually supplied with the product and can also be downloaded from the manufacturer's website.

Context configuration

If you do not want to run smartEditor within your $TOMCAT_HOME/webapps folder, it is necessary to create a smartEditor.xml context file to be put into the $TOMCAT_HOME/conf/Catalina/localhost folder. The file definition looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<Context reloadable="true"
      crossContext="false"
      antiJARLocking="false"
      docBase="[path to smartEditor]" debug="0"
      antiResourceLocking="false">

<!--jndi support-->
<ResourceLink name="jdbc/editor"
      global="editor"
      type="javax.sql.DataSource"/>

<!--disable persistent sessions-->
<Manager distributable="false"
      saveOnRestart="false"
      pathname=""/>
</Context>

Please note the docBase attribute that needs to point to the smartEditor folder. The ResourceLink provides a web application internal JNDI resource named jdbc/editor but delegates it to the global resource editor configured above.

smartEditor application configuration

Configuring application.properties

The file $EDITOR_HOME/WEB-INF/classes/application.properties is the main configuration file for the whole smartEditor application. The following table shows all configuration attributes and adds some explanatory information:
attribute name default value explanation
locale.default en default application locale
csw.discovery <none> URL to the CSW disocvery service bound to this smartEditor instance (necessary when starting up with an ISO fileIdentifier)
csw.manager <none> URL to the CSW-T endpoint. smartEditor will send documents to this URL when publishing metadata
import.xslt.dir /internal/import internal configuration (do NOT change)
external.xslt.dir /internal/external internal configuration (do NOT change)
dictionary.resource.xml /codelist_enumeration.xml internal configuration (do NOT change)
dictionary.resource.messages /isolist internal configuration (do NOT change)
map.service.url http://vmap0.tiles.osgeo.org/wms/vmap0? default OGC WMS map service to be displayed in the smartEditor
layer.names basic layer names to be displayed
bbox.minx -30.0 default BBOX parameter
bbox.miny 35.0 default BBOX parameter
bbox.maxx 50.0 default BBOX parameter
bbox.maxy 70.0 default BBOX parameter
projection EPSG:4326 default CRS for map
image.format image/png default image output format for map widget
db.jndi.name java:comp/env/jdbc/editor default lookup name for container managed database resource
db.hibernate.dialect

org.hibernate.dialect.Oracle9iDialect
org.hibernate.dialect.Oracle10gDialect
org.hibernate.dialect.PostgreSQLDialect
org.hibernate.dialect.MySQLDialect

specific SQL dialect implementation for hibernate, choose the one that fits to your database vendor

db.hibernate.schemaUpdate false do not allow hibernate to create tables if they do not exist
db.hibernate.showSQL false debug SQL statements of hibernate
when running smartEditor in conjunction with 52n security com ponents or sdi.suite securityManager these parameter needs to be defined for a proper validation of the SAML tokens
security.keystore.provider.class defaults to de.conterra.smarteditor.common.authentication.ClassPathKeyStoreProvider

the class that loads the keystore file: use de.conterra.smartedito r.common.authentication.ClassPathKeyStoreProvider if the keystore is located in the classpath

use de.conterra.smartedito r.common.authenticati on.SystemIdK eyStoreProvider if the keystore is l ocated somewhere on the hosting machine

security.keystore.pwd defaults to ‘changeit password to access the keystore
security.keystore.path /.keystore path to the keystore containing the certificate that is used to sign the SAML assertions within the SAML token. Path needs to be classpath resolvable
security.certificate.alias for example “gpt - security” if integrating with ESRI Geoportal Server alias of named certificate
security.certificate.pwd defaults to ‘changeit password to access the certificate

Configuring the log level of smartEditor

You may need to increase the log level of smartEditor. Therefore open the file $EDITOR_HOME/WEB-INF/classes/log4j.xml. The file contains the following information:

<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<param name="Threshold" value="WARN"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="[%-5p] %d [%t] %c-%m%n"/>
</layout>
</appender>
<appender name="LOGFILE" class="org.apache.log4j.
RollingFileAppender">
<param name="File" value="${catalina.base}/logs/smarteditor-webapp.log"/>
<param name="Threshold" value="INFO"/>
<param name="MaxFileSize" value="5000KB"/>
<param name="MaxBackupIndex" value="3"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%-5p] %d{ISO8601} [%t]%c-%m%n"/>
</layout>
</appender>
<logger name="de.conterra.smarteditor">
<level value="INFO"/>
</logger>
<logger name="org.springframework">
<level value="WARN"/>
</logger>
<root>
<level value="WARN"/>
<appender-ref ref="CONSOLE"/>
<appender-ref ref="LOGFILE"/>
</root>
</log4j:configuration>

If necessary the output location of the logfile can be changed. The level of detail of the logging can be determined by setting the level value from INFO to DEBUG.

Test application

After carrying out the steps described in the chapters above (re)start your Apache Tomcat and open a browser. Type http://[host]:port/smartEditor and see the application start.

Versions

A list of versions of this wiki page matching the respective versions of smartEditor:

Topic revision: r6 - 28 Oct 2015 09:31:13, DanielNuest
This site is powered by FoswikiCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Wiki? Send feedback