JaliosXperience
fr en
Path > Home > Documentations > FAQ
Url Link
JCMS FAQs - Installation and configuration

Replies to some Frequently Asked Questions (FAQ) concerning JCMS installation and configuration.


Top

Top
1. How do I install JCMS?

To install JCMS rapidly on Windows with Tomcat, see the article Getting Started with JCMS.

For more installation details see Operating and Installation Manual (in french).

Top
2. How do I configure JCMS with Apache and Tomcat?
Top
3. How do I configure JCMS with an OpenLDAP directory?

See the article Configuring JCMS with OpenLDAP (LDAP/LDAPS) (in french).

Top
4. How do I configure JCMS with an SSO?

See the article JCMS 5: Developing specific authentications with AuthenticationManager.

Severals SSO plugins are available for download.

Top
5. How do I configure JCMS with a reverse proxy?

A reverse proxy is an HTTP(S) server that receives requests and distributes them to other HTTP servers. This type of architecture makes it possible to hide the true servers from HTTP clients which know only the reverse proxy. Reverse proxy architectures are typically used to enhance the security of a cluster of HTTP servers, to supply a homogeneous access URL for heterogeneous HTTP services or for load balancing purposes.

JCMS must be explicitly configured to operate behind a reverse proxy, since it must produce hypertext links and HTTP redirections for the reverse proxy URL instead of the URL for its own HTTP server.

Use the Properties Editor to set the following parameters (Admin Area > Configuration):

  • Site tab:
  • Proxy tab (Reverse Proxy section):
    • Enabled: check 'Yes';
    • Address: the Reverse Proxy IP address (only requests coming from this address will be handled in Reverse Proxy mode);
    • Context Path: access path of the webapp in the base URL ("/" in this example).
Top
6. How do I configure JCMS with a proxy server?

Some JCMS functions, such as the RSS portlet, perform HTTP requests which may have to be sent by the enterprise's proxy server. Use the Properties Editor to set the forward proxy parameters (Admin Area>Configuration>Proxy tab>Forward Proxy section):

  • Host: indicates the address of the outgoing proxy server to use;
  • Port: indicates the port number of the proxy server;
  • Not for: requests indicated by these addresses will be direct and will not pass via the proxy;
  • Login: identifier of an account on the proxy server;
  • Password: account password.

If you have set up a JSync cluster, don't forget to fill the Not for property in order to avoid JSync requests to be sent to the proxy.

Top
7. How do I configure JCMS in a Unix environment without an X server?

In Unix environments, JCMS 5.5 uses some Java APIs that require the presence of an X server (for image rendering). If the X server is absent, some JSP pages will not compile (e.g. the Media Explorer) and exceptions will appear in the application server logs.

JCMS 5.5 and above

Therefore with JCMS 5.5 you must:

  1. Edit the file WEB-INF/data/custom.prop;
  2. Set the property channel.headless to true;
  3. Restart JCMS.

Under Linux, if the following error appears in the logs while JCMS is configured in headless mode, this is certainly because the X11 libraries are missing.

java.lang.UnsatisfiedLinkError: /usr/java/j2sdk1.4.2_12/jre/lib/i386/libawt.so:
libXp.so.6: cannot open shared object file: No such file or directory

With RedHat Linux and its derivatives you must install the xorg-x11-deprecated-libs package.

With other Linux distributions you will need to find the packets supplying the libraries on which the libawt.so library depends. To do this, execute the command:

ldd /usr/java/j2sdk1.4.2_12/jre/lib/i386/libawt.so

which gives, for example, with the CentOS distribution:

 libmlib_image.so => not found
        libjvm.so => not found
        libXp.so.6 => /usr/X11R6/lib/libXp.so.6 (0x00367000)
        libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x00208000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x00d4d000)
        libXtst.so.6 => /usr/X11R6/lib/libXtst.so.6 (0x00111000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x00116000)
        libm.so.6 => /lib/tls/libm.so.6 (0x00e5e000)
        libdl.so.2 => /lib/libdl.so.2 (0x001f5000)
        libjava.so => not found
        libc.so.6 => /lib/tls/libc.so.6 (0x0036f000)
        libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x001f9000)
        libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x00dcf000)
        /lib/ld-linux.so.2 (0x008a5000)

Previous JCMS releases

With earlier JCMS releases (5.0 and 4.x) it is necessary to install a pseudo X server such as xvfb. This program is free and can be downloaded from the Internet.

Once xvb is installed (see the xvfb documentation) and started, set the environment variable DISPLAY:

$ export DISPLAY=unix:0 

Test the operation by launching an xterm (no error message should appear), then terminate the process.

$ xterm

Top
8. How do I configure JCMS 4 with the IBM JavaVirtual Machine (JVM)?

If you install JCMS 4.x on IBM Websphere or, more generally, in an environment using IBM's JVM (for example on AIX), you must enable MD5 encryption for passwords (with JCMS 5.x this is the default encryption).

The procedure to follow is described in the article Activating MD5 encryption for passwords (in french).

The JIT (Just-In-Time) compiler of the JVM can sometimes cause blockages accompanied by "signal=11". If this type of problem occurs it is recommended to check the JIT options, which are specific to the operating platform. The page Introduction to IBM JVM for Linux JIT diagnostics gives explanations for Linux.

The option JITC_COMPILEOPT=NALL is used to disable all the optimizations outside the native compilation, but the intermediate options JITC_COMPILEOPT=NQOPTIMIZE or JITC_COMPILEOPT=NINLINING are generally sufficient.

Top
9. How do I configure the temporary folder?

In several cases (types generation, upload, deployment, etc.) JCMS creates temporary files using the <code>File.createTempFile()</code> method. By default, this method uses the temporary directory of the hosting platform (e.g. the /tmp folder under Unix). To change this, you must modify the system property java.io.tmpdir. This is done in the application server start script by setting the property at the startup of the JVM via the -D option:

-Djava.io.tmpdir=/my/temporary/directory/

Attention: if your application server starts in secure mode, you must add a read/write permission on this property.

Top
10. How do I configure replication with JSync?
Top
11. How do I configure the memory allocated to JCMS?

If an access to a JSP fails with the 'OutOfMemory' message, this means the application server does not have enough memory to compile this JSP, for example. You must restart the application server, but before doing so check that its memory configuration is correct. This generally depends on the JVM parameters -Xmx (maximum heap size) and -Xms (initial heap size). For JCMS it is recommended to set both these parameters to the same value in order to avoid reallocations when restarting the webapp. By way of example, here are the scripts used to launch Resin and Tomcat with 512 MB of allocated memory.

Resin

Script for Unix:

#!/bin/sh
export JAVA_HOME=[JDK_DIR]
export RESIN_HOME=[RESIN_DIR] 
$RESIN_HOME/bin/httpd.sh -J-Xmx512m -J-Xms512m

Script forWindows:

@echo off
set PATH=[JDK_DIR]\bin;%PATH% 
c:\[RESIN_DIR]\bin\httpd.exe -J-Xmx512m -J-Xms512m 

Tomcat

In the Windows environments, if Tomcat is launched by the menu Programs > Apache Tomcat 4.1 > Start Tomcat, you must edit the properties of this menu (right-click > Properties) and add:

C:\[JDK_DIR]\bin\java.exe 
    -Xmx512m -Xms512m 
    -jar -Duser.dir="[TOMCAT_DIR]" "[TOMCAT_DIR]\bin\bootstrap.jar" start #

Do not modify the rest which depends on the configuration. If Tomcat is launched via the command bin\startup.bat, edit the file bin\catalina.bat to add at the start of the file:

set JAVA_OPTS=-Xmx512m -Xms512m 

Note that to make bin\startup.bat operational you must also identify the JVM used, for example by adding:

set JAVA_HOME=C:\[JDK_DIR]

It is possible to check that the parameters have been properly taken into account by first checking the operation with correct values then checking bad operation with values that are too small. Values that exceed the capacity of the machine result in a blockage at startup. The memory size used can be deduced:

  • either from the indication of memory consumption of the Java process by the Windows task manager or by using the top command under Unix.
  • or from the indication given by JCMS's memory monitoring features in Admin Area > Monitoring > Memory Monitor

Other applications servers

Remark about Linux

Under Linux, if you consult the memory usage with the top utility, the figures returned must be interpreted correctly. Linux indicate a free memory value generally much less than the memory actually available since the cache and buffer memories should be taken into account (Linux can take this memory since it is free, but it will release it very rapidly as soon as an application needs it). For more details see http://gentoo-wiki.com/FAQ_Linux_Memory_Management).

For example, if top displays:

Mem:   3104224k total,  2780584k used,   323640k free,   136908k buffers
Swap:        0k total,        0k used,        0k free,   953968k cached

this is understood to mean that Linux consumes almost 1 GB (953968K + 136908K) for caches and buffers. Therefore in fact there remains 1.3 GB of free memory, not 300 MB.

Top
12. Configuration spécifique de la mémoire pour JCMS 6 (PermGen Space)

Depuis JCMS 6 et l'introduction d'Hibernate, l'accès à une JSP peut échouer avec le message OutOfMemoryError : PermGen space.

Cette erreur peut aussi survenir sur des versions antérieures de JCMS comportant de très nombreux JSP.

Cette erreur liée à un problème d'allocation mémoire concerne la zone mémoire de la JVM appelée "method area". Cette zone se nomme également "permanent generation" dans l'implémentation de la JVM de Sun. Il vous faudra donc l'augmenter.

Cette zone mémoire, partagée par tous les threads, stocke la définition des classes et interfaces, le code des constructeurs et des méthodes, les constantes, les variables de classe (variables static) ...

La taille de cet espace est défini par les options -XX:PermSize et -XX:MaxPermSize, respectivement pour la taille initiale et la taille maximale.

La taille maximale par défaut est de 64Mo.

La prise en compte des nouvelles valeurs nécessite un redémarrage du serveur d'application.

A titre d'exemple voici la commande permettant de lancer Tomcat avec au plus 256Mo de mémoire.

Tomcat

Dans les environnements Windows, si Tomcat est lancé par le menu Tous les programmes > Apache Tomcat 5.5 > Start Tomcat, il faut éditer les propriétés de ce menu (bouton droit > Propriétés) et ajouter :

C:\[JDK_DIR]\bin\java.exe 
    -XX:PermSize=256m -XX:MaxPermSize=256m
    -jar -Duser.dir="[TOMCAT_DIR]" "[TOMCAT_DIR]\bin\bootstrap.jar" start #

Ne pas modifier le reste qui dépend de la configuration. Si Tomcat est lancé par la commande bin\startup.bat, il faut éditer le fichier bin\catalina.bat et ajouter au début du fichier :

set JAVA_OPTS=-XX:PermSize=256m -XX:MaxPermSize=256m

A noter que pour rendre bin\startup.bat opérationnel, il faut aussi ajouter l'indication de la JVM utilisée :

set JAVA_HOME=C:\[JDK_DIR]

Top
13. Do I need to configure the character encoding?

JCMS v5.5 and later use the UTF-8 encoding format, so no configuration is necessary. However when editing files make sure you use an editor that supports this encoding (e.g. UltraEdit).

Earlier versions (JCMS 4.x and 5.0) require the character encoding to be ISO 8859-1. Some operating systems are pre-installed with a different character set. In this case, you must correctly set the environment variables that control the language and the character set, otherwise some characters (e.g. accented) will be replaced in the text of JCMS documents and the data recorded in the file store.xml will be erroneous.

Unix Platforms

export LANG="fr_FR.ISO-8859-1"
export LC_ALL="fr_FR.ISO-8859-1"
export LANGUAGE="fr_FR.ISO-8859-1"

MacOS X Platforms

MacOs X does not support local charset, so JVM must be launched with the following option:

-Dfile.encoding=ISO-8859-1

Top
14. Can I configure quotas for downloads?

JCMS 4.1.1 incorporates a mechanism enabling quotas to be defined according to the type and size of uploaded documents. This configuration is performed via the upload.permission.* properties defined in the file WEB-INF/data/custom.prop.

The upload.permission.size.default property defines the maximum size (in bytes) of uploaded files.

The upload.permission.size.type/mime properties define the maximum size of files of specific types.

Attention: some document types can be described by several MIME types (e.g. application/vnd.ms-powerpoint or application/powerpoint). The MIME type to use in the property suffix upload.permission.size.type/MIME is the one used by JCMS. The list of these MIME types used by JCMS is found in the file WEB-INF/jalios/jcms.prop in the file-document.type.* property.

Examples:

# Limit the maximum size of all uploads to 1 MB (1024*1024 = 1048576)
upload.permission.size.default: 1048576

# Limit the maximum size of all images to about 2 MB
upload.permission.size.image: 2000000

# Limit the maximum size of GIF images to about 100 KB
upload.permission.size.image/gif: 100000

# Forbid videos
upload.permission.size.video: 0

To restrict the files that may be uploaded to a limited set of document types, just set default maximum size to zero and indicate the authorized documents types.

Examples:

# By default all files are forbidden for uploading
upload.permission.size.default: 0

# except images of less than 1 MB
upload.permission.size.image: 1000000

# and MS-Office documents of less than 10 MB
upload.permission.size.application/msword: 10000000
upload.permission.size.application/vnd.ms-excel: 10000000
upload.permission.size.application/vnd.ms-powerpoint: 10000000

Top
15. How do I configure JCMS for Import/Export?

See the article JCMS 5.7 : Mise en œuvre de l’Import/Export (in french).

Top
16. Can I authenticate users with an LDAP Directory that is not case-sensitive (e.g. ActiveDirectory)?

JCMS is by default case-sensitive to the identifier used for authentication, but some LDAP directories are not. If a person authenticates a first time by entering his login in lower-case then a second time in upper-case, JCMS will create two distinct accounts. To avoid this, use the Properties Editor (Admin Area>Properties Editor>Access tab) to set the Case-sensitive option to No.

Top
17. Can I add new file formats to JCMS?

JCMS is configured to recognize the most popular formats (doc, xls, ppt, pdf, jpg, gif, etc.) but it is possible to add formats not supported natively by JCMS. This is declared in the properties. For example, if you want to add support for Flash Video files (extension .flv), proceed as follows:

1. Edit the file WEB-INF/data/webapp.prop to add the following lines:

file-document.ext.flv:                   video/x-flv
file-document.icon.video/x-flv:          images/custom/files/flv.gif
en.file-document.typeinfo.video/x-flv:   Flash Video File
fr.file-document.typeinfo.video/x-flv:   Fichier Flash Video

2. Next, place the icon corresponding to this file type (flv.gif) in the folder images/custom/files/ (16x16 pixels dimension).

3. Finally, don't forget to configure your application server to ensure it returns the right MIME-type for this file type. The configuration is specific to each application server. For example, in Tomcat, in the file TOMCAT_DIR/conf/web.xml you must declare:

<mime-mapping>
  <extension>flv</extension>
  <mime-type>video/x-flv</mime-type>
</mime-mapping>

Top
18. Why do some types of MS-Office document not appear in the browser?

If the browser proposes to save the document rather than display it, the problem is almost certainly due to the configuration of the application server or web server. You must add the corresponding file extension / MIME type association to the server's configuration.

For example, Tomcat 4.1.30 is delivered without support for PowerPoint documents. To be able to handle these files, just add the file extension / MIME type association to the file TOMCAT_DIR/conf/web.xml:

<mime-mapping>
    <extension>ppt</extension>
    <mime-type>application/vnd.ms-powerpoint</mime-type>
</mime-mapping>

To determine the MIME type of a document just consult the "Content Type" field of the JCMS document.

Top
19. Why can't I access the JCMS Admin Area with Tomcat.

Tomcat is delivered by default with an administration webapp on the access path /admin, like the JCMS Admin Area. If you install JCMS on the context /, it is then impossible to access the Admin Area normally.

To resolve the problem, change the access path of the Tomcat administration webapp as follows:

  • Open the file [TOMCAT_DIR]/conf/Catalina/{...}/admin.xml
  • Modify the webapp's access path by changing the path attribute in the Context tag to another value, for example /adminTomcat.
<Context path="/adminTomcat" docBase="${catalina.home}/server/webapps/admin" ...

Top
20. Why do I get a memory allocation error when accessing the store?

When reading the store (loading, access to the version history, synchronization via JSync), if the java.io.IOException: Cannot allocate memory exception occurs, this is due to lack of physical memory.

JCMS 5.0 and later version exploit the java.nio API which enables rapid access to files. Due to a known bug in this API, it is necessary to reserve a quantity of RAM equal to the size of the store.xml file. For example, if store.xml occupies 100 MB, then the operating system must have at least 100 MB of free memory at all times.

It is important to note that this memory size has no relation to the size allocated to the JVM by the parameters -Xmx and -Xms. If there is no physical memory available for reading the store, consider increasing the physical memory of the machine or reducing the size allocated to the JVM (or to other processes running on the machine). If the symptoms persist, it is recommended to disable the usage of the NIO to the detriment of performance during access to the versions and during synchronizations (JSync). To disable the NIO add the following line to the file WEB-INF/data/webapp.prop:

channel.store.nio: false

Another workaround is to use the JVM 1.6 that fixes this bug or to use a 64bit JVM along with a 64bit OS.

Top
21. Compatibility with Internet Explorer 7 (IE7)

JCMS is compatible with Internet Explorer 7 since release 5.6.1.

With previous versions, a little rendering glitch occurs with icons. To fix it, edit the stylesheet file css/jalios/misc.css, and replace the following lines:

img.icon { vertical-align: middle; border: 0}
img.icon[src] { vertical-align: sub; border: 0}
with
img.icon { border: 0; vertical-align: text-bottom; }

Top
22. Configurer l'accès WebDAV

Consultez l'article JCMS 5.5 : Accès WebDAV.

Top
23. Configurer l'import/export de données
Top
24. Comment activer les vignettes des pages Web ?

Si vous gérez dans votre site JCMS des publications Pages Web (Web Pages), vous pouvez activer la génération de vignettes. Dans ce cas, à l'affichage de chaque Page Web, JCMS placera une capture d'écran de la page.

JCMS propose par défaut le service Thumbshot.

Pour activer cette fonctionnalité, dans le fichier WEB-INF/data/webapp.prop ajoutez (ou décommentez) la propriété suivante, puis redémarrez JCMS :

tag.thumbnail.thumbshot.url: http://open.thumbshots.org/image.pxf?url=

Il est possible de paramétrer un autre service de rendu. Pour cela il suffit simplement d'indiquer l'URL du service, sachant que l'URL de la page à capturer sera concaténée à la fin de l'URL fournie.

Par exemple, pour utiliser le service de GooglePreview :

tag.thumbnail.thumbshot.url: http://f.googlepreview.com/preview?s=

Top
25. Comment installer un add-pack ?

Un add-pack permet d'augmenter les limites d'espaces de travail, de membres et de langues des Workgroup Edition (WE) et Starter Edition (SE).

Pour obtenir un add-pack, il vous suffit d'appeler votre contact commercial chez Jalios en lui indiquant :

  • Le nombre d'espaces de travail souhaité (WE et SE)
  • Le nombre de membres souhaité (SE)
  • Le nombre de langues souhaité (SE)
  • Le nom du site (celui défini par la propriété channel.name)

En retour nous vous fournirons une clé d'activation se présentant sous la forme d'une propriété (channel.add-pack) à ajouter dans le fichier WEB-INF/data/webapp.prop de votre application JCMS.

Top
26. Comment autoriser le copier/coller dans Firefox avec l'éditeur Wysiwyg

En essayant de faire un copier/coller dans l'éditeur wysiwyg (via les boutons de la barre d'outils), vous obtenez un message d'erreur indiquant que la manipulation est impossible avec Mozilla Firefox.

Pour autoriser cette opération, suivez les indications disponibles sur la page suivante afin de modifier les réglages de votre navigateur en conséquence.
http://www.mozilla.org/editor/midasdemo/securityprefs.html

Top
27. Message de log à propos du jar WEB-INF/lib/jsdk23.jar

Un message de log apparaît dans votre serveur d'application, au démarrage de JCMS, indiquant que le jar WEB-INF/lib/jsdk23.jar n'a pas été chargé.

Exemple sous Tomcat :

INFO main org.apache.catalina.loader.WebappClassLoader
 - validateJarFile(....WEB-INF/lib/jsdk23.jar)
 - jar not loaded. See Servlet Spec 2.3, section 9.7.2.
 Offending class: javax/servlet/Servlet.class

Ce message est normal et peut être ignoré. Attention, la librairie ne doit cependant pas être supprimée de la webapp JCMS !

La librairie jsdk23.jar fournit une implémentation de la spécification des Servlets utilisée par le JspEngine.
Le JspEngine est utilisé pour la génération des classes Java et des JSP des types de publication de JCMS, ainsi que pour l'exécution de certains JSP internes (mail de notification, archive, ...).
Les serveurs d'application ayant leur propre implémentation de la spécification des Servlet, ils ne chargent pas cette librairie.


Login   Home   fr en
JALIOS SA - SIREN 440 126 035