Skip to end of metadata
Go to start of metadata

Version Warning

The content below is for Apache Syncope <= 1.2 - for later versions check the "System Administration" chapter of the Reference Guide.

Introduction

Once you have created your project, you can start adapting it to your own needs and requirements.

Deployment directory

Currently, Syncope needs three base directories to be defined:

  • bundles - where ConnId bundles are stored (check what a connector bundle is);
  • log - where all system logs are written;
  • conf (optional) - where configuration files are located, if override is needed.

Bundles directory should only contain connector bundle JAR files.

The presence of any other file might cause the unavailability of any connector bundle in Apache Syncope.

For example, you can create directories as follows:

Internal storage

Internal storage is a database where all information and configurations are stored.

You may want to setup some default content to be loaded on internal storage upon schema creation: for this you need to edit

.

Please note that Syncope core will populate internal storage with provided content only if the corresponding database is empty, i.e. does not contain any table or view.

Depending on your DBMS, you will need to change your project setup accordingly; modify the content of

as indicated in the following.

PostgreSQL

This assumes that you have a PostgreSQL instance running on localhost, listening on its default port 5432 with a database syncope fully accessible by user syncope with password syncope.

MySQL

This assumes that you have a MySQL instance running on localhost, listening on its default port 3306 with a database syncope fully accessible by user syncope with password syncope.

It also assumes that the InnoDB engine is enabled in your MySQL instance - if this is not the case, then change the value for 'quartz.sql' to

MariaDB

This assumes that you have a MariaDB instance running on localhost, listening on its default port 3306 with a database syncope fully accessible by user syncope with password syncope.

Oracle

This assumes that you have an Oracle instance running on localhost, listening on its default port 1521 with a database syncope under tablespace SYNCOPE fully accessible by user syncope with password syncope.

You will also need to

  1. create directory

  2. download Oracle mapping file for the version you are building (1_2_X, 1.1.X, 1.0.X)
  3. rename it to

    and copy it under the directory created above

Microsoft SQL Server

This assumes that you have an SQL Server instance running on localhost, listening on its default port 1344 with a database syncope fully accessible by user syncope with password syncope.

You will also need to

  1. create directory

  2. download MS SQL Server mapping file for the version you are building (1_2_X, 1.1.X, 1.0.X)
  3. rename it to

    and copy it under the directory created above

JEE container

Apache Tomcat 7

This assumes that you have got Apache Tomcat 7 installed in directory $CATALINA_HOME.

Debian / Ubuntu warning

If you have installed Apache Tomcat 7 via Debian / Ubuntu package, you will also need to

  1. download the Tomcat JDBC Connection Pool JAR from Maven central repository, same version of the installed Tomcat 7
  2. copy the downloaded JAR file under /usr/share/java

Set Environment

GNU / Linux - Mac OS X

Create $CATALINA_HOME/bin/setenv.sh with content (keep everything on a single line).

Windows

Create %CATALINA_HOME%\bin\setenv.bat with content (keep everything on a single line).

context.xml

Uncomment <Manager pathname="" /> in $CATALINA_HOME/conf/context.xml.

Optionally, define a datasource for internal storage (following example is for MySQL): please check that the connection parameters are same as configured above.

Be sure to put the JDBC driver JAR file under $CATALINA_HOME/lib for the Datasource you have defined above.

Glassfish 4.1

Update core glassfish-web.xml

When using a datasource for internal storage, be sure to add

assuming that your Glassfish instance provides a datasource named jdbc/syncopeDataSource.

right after </context-root> in core/src/main/webapp/WEB-INF/glassfish-web.xml.

JBoss AS 7.1

Version warning

Content of this paragraph applies to Apache Syncope < 1.2.0

Download this file, copy it under core/src/main/resources/ and replace

 

with

 

Fixing error messages at core startup

When core application starts up you will see many yet harmless error messages and stacktraces: this is due to an internal mechanism that looks for custom implementations of standard Apache Syncope interfaces.

If you want to remove such messages you can provide an override of the org.apache.syncope.core.init.ImplementationClassNamesLoader class: see an example here.

Wildfly 8.1

Version warning

Content of this paragraph applies to Apache Syncope >= 1.2.X

Download this file, copy it under core/src/main/resources/ and replace

with

Fixing error messages at core startup 

When core application starts up you will see many yet harmless error messages and stacktraces: this is due to an internal mechanism that looks for custom implementations of standard Apache Syncope interfaces.

If you want to remove such messages you can provide an override of the org.apache.syncope.core.init.ImplementationClassNamesLoader class: see an example here.

Use DataSource

When using a DataSource, a few additional adjustments are needed.

core web.xml

Change

to

assuming that you have defined a DataSource with JNDI name 'java:/syncopeDataSource' in JBoss configuration.

core jboss-deployment-structure

Add

right before

assuming that 'com.mysql' is the name of the JBoss module you have deployed for your JDBC Driver (MySQL in this case).

Oracle WebLogic 12

Update core web.xml

Change

to

at the beginning of core/src/main/webapp/WEB-INF/web.xml.

Update core weblogic.xml

When using a datasource for internal storage, be sure to add

assuming that your WebLogic instance provides a datasource named syncopeDataSource.

before </weblogic-web-app> in core/src/main/webapp/WEB-INF/weblogic.xml.

Other setup tasks

Use datasource

Syncope, when not finding a datasource called jdbc/syncopeDataSource, will connect to internal storage by instantiating a new connection upon request: this is of course strongly discouraged for any production environment.

When using a container-managed datasource, be sure to uncomment the <resource-ref ... /> element in core/src/main/webapp/WEB-INF/web.xml.

Connect console to core

Modify console/src/main/resources/console.properties so that provided properties reflects the scheme, hostname and port number where your JEE container is running and the URL context where Syncope core will be deployed.

For example, when running your JEE container on port 9080, you should have

Build and deploy

Assuming that you have created the two deployment directories defined above, just run

Syncope >= 1.2.0

At this point you can deploy core/target/syncope.war and console/target/syncope-console.war to your JEE container.

Test your installation

  1. Point your favorite browser to administration console at http://localhost:8080/syncope-console/ (assuming that your JEE container is running on localhost, port 8080)
  2. Login as 'admin' / 'password'

2 Comments

  1. Hi,

    I don't know if this is the right place ... but, I'll give it a try.

    I am having trouble running Syncope on Tomcat 7 with MariaDB. I followed all the instructions but keep getting the error:

    ...

    Dec 04, 2015 2:51:22 PM org.apache.catalina.core.StandardContext listenerStart
    SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springContextInitializer' defined in file [/home/fabricio/tomcat/apache-tomcat-7.0.65/webapps/syncope/WE
    B-INF/classes/org/apache/syncope/core/init/SpringContextInitializer.class]: Invocation of init method failed; nested exception is <openjpa-2.3.0-r422266:1540826 fatal user error> org.apache.op
    enjpa.persistence.ArgumentException: Errors encountered while resolving metadata. See nested exceptions for details.

    ...

    Caused by: <openjpa-2.3.0-r422266:1540826 fatal user error> org.apache.openjpa.persistence.ArgumentException: Table "ExternalResource" given for "org.apache.syncope.core.persistence.beans.ExternalResource" does not exist.

    It seems a database table has not been created during startup, as it was supposed to.

    If anyone has any idea it would be much appreciated,

    1. Please send an empty e-mail to user-subscribe@syncope.apache.org and follow instructions received.

      Then send the question above in a mail to user@syncope.apache.org - at that point I will remove the comment above.

      Regards.