Page tree

Old Release

This documentation covers an old version of Fedora. Looking for another version? See all documentation.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Application Configuration

The Fedora 4 web-application supports several deploy-time, system-level configuration options. These configuration elements are set via the definition of System Properties.


Four means of deploying Fedora 4 have been verified

  • Tomcat 7 servlet container
  • Jetty 9 servlet container
  • Maven jetty:run plugin - for testing
  • One-Click Run - for testing

Each of these deployment approaches has its own way of setting System Properties.

Tomcat 7

On Debian Linux systems, the typical way of setting System Properties is to update the following file:


Within that file, new properties can be added per the example below:

JAVA_OPTS="${JAVA_OPTS} -Dfcrepo.modeshape.configuration=classpath:/config/file-simple/repository.json -Dfcrepo.home=/mnt/fedora-data"

Additional information regarding the configuration of System Properties in Tomcat 7 can be found here.

Windows notes

Alternatively on Windows systems you can set the following file:

CATALINA_BASE/bin/setenv.bat (windows)

Within that file, new properties can be added per the example below:

set CATALINA_OPTS=%CATALINA_OPTS% -Dfcrepo.ispn.repo.cache=F:\fedora\cache
When starting up tomcat on windows if you receive an error like the following it may be necessary to include a fcrepo.ispn.repo.cache like above.
Caused by: org.fusesource.leveldbjni.internal.NativeDB$DBException: IO error: F:\apache-tomcat-7.0.50-windows-x64\apache-tomcat-7.0.50\bin\fcrepo4-data\fcrepo.ispn.repo.cache\data\MANIFEST-000002: The handle is invalid.

Jetty 9

On Debian Linux systems, one way of setting System Properties is to update the following file:


Within that file, new properties can be added per the example below (note the use of JAVA_OPTIONS instead of JAVA_OPTS):

JAVA_OPTIONS="${JAVA_OPTIONS} -Dfcrepo.modeshape.configuration=classpath:/config/file-simple/repository.json -Dfcrepo.home=/mnt/fedora-data"

Additional information regarding the configuration of System Properties in Jetty 9 can be found here.

Windows notes

Alternatively on Windows systems you can set the following file:


Within that file, new properties can be added per the example below:


Maven jetty:run

System Properties can be set when using the Maven jetty:run plugin by passing them per the example below:

mvn -Dfcrepo.home=/mnt/fedora-data -Dfcrepo.modeshape.configuration=classpath:/config/file-simple/repository.json jetty:run

One-Click Run

If the One-Click Run is started from the command line, System Properties can be passed in per the example below:

java -Dfcrepo.home=/mnt/fedora-data -jar fcrepo-webapp-jetty-console.war 

Configuration Elements

There are a number of configuration elements that can be optionally be set when starting the Fedora 4 web-application, noted below within brackets: <>. The only configuration element that is required to be set is "fcrepo.modeshape.configuration".


This can be set to a path (relative to the current working directory or absolute) to which Fedora repository content will be written.  Any of the Modeshape and Infinispan configuration options below will default to being within this folder if unset or if set to a relative path.  If unset, content will be put in the "fcrepo4-data" directory within the current working directory.

fcrepo.modeshape.configuration=<classpath:/config/repository.json | file:/path/to/repository.json>

This specifies the configuration for the underlying Modeshape repository and is required to be set. See other available options for this value within the source tree. Example repository.json configurations are located within the WAR file within sub-directories under WEB-INF/classes/config. Note: this configuration file must be readable by the servlet container process.


This specifies the underlying Infinispan cache configuration. This value has a tested default set in the modeshape.json file mentioned above; and therefore, can usually be left as is. The default file is located within the WAR file under WEB-INF/classes/config.</tmp on Linux, $TMPDIR on MacOSX, and %TEMP% on Windows>

This specifies the directory for writing temp files.  You may need to set this property to a larger disk/filesystem to upload large files, particularly on Linux where /tmp is sometimes on a small partition.


This specifies the baseUrl to use when generating JMS messages. You can specify the hostname with or without port and with or without path. If your system is behind a NAT firewall you may need this to avoid your message consumers trying to access the system on an invalid port. If this system property is not set, the host, port and context from the user's request will be used in the emitted JMS messages.

Note: If you have multiple instances of Fedora running, the following system properties must be set to avoid messaging port conflicts:


This specifies the ports used by the embedded JMS-based message broker, both for OpenWire and STOMP protocols.


The HTML template code uses Apache Velocity, which generates a runtime log called velocity.log. By default this is placed inside fcrepo.home, but it is possible to override the location to have it written to an alternate location.

Modeshape and Infinispan

The Modeshape and Infinispan configurations mentioned above have a number of more detailed configuration elements that can optionally be set. To see exactly which elements are available to be set, inspect the repository.json and infinispan.xml files specified above. Those files can be browsed in the source tree in:

Some common elements for Modeshape and Infinispan relate to the directories in which application information is persisted. As mentioned above, if no fcrepo.home property is set then application information will be persisted under the directory "fcrepo4-data" in the application's current working directory. There will then be several directories within "fcrepo4-data" that are named by default with the name of the property that can be set to configure each of those directories.

Below are some common examples of these directories:


Contains the serialized repository resource properties.

Contains the internal Lucene index used by Modeshape/Admin Search.

Contains the reliable messaging information maintained by ActiveMQ.



Contain JBoss JTA transaction engine artifacts.

Configuration Chain

The standard configuration chain is as follows:

  1. fcrepo4/fcrepo-webapp/src/main/webapp/WEB-INF/web.xml contains a context-param element with param-name "contextConfigLocation".  The param-value points to your spring configuration file, usually a path like WEB-INF/classes/*.xml
  2. One of your spring configuration files is repo.xml that contains a property repositoryConfiguration defining the location of your repository.json
  3. fedora-node-types.cnd is defined in repository.json
  • No labels