<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2000 - 2024 Silverpeas

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as
    published by the Free Software Foundation, either version 3 of the
    License, or (at your option) any later version.

    As a special exception to the terms and conditions of version 3.0 of
    the GPL, you may redistribute this Program in connection with Free/Libre
    Open Source Software ("FLOSS") applications as described in Silverpeas's
    FLOSS exception.  You should have received a copy of the text describing
    the FLOSS exception, and it is also available here:
    "https://www.silverpeas.org/docs/core/legal/floss_exception.html"

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

-->

<faqs xmlns="http://maven.apache.org/FML/1.0.1"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/FML/1.0.1 https://maven.apache.org/xsd/fml-1.0.1.xsd"
      title="Frequently Asked Questions" toplink="false">

  <part id="tech-admin">
    <title>Technical Administration</title>
    <faq id="jboss">
      <question>
        JBoss is listening only on <b>localhost</b>. How do I configure the binding address(es) ?
      </question>
      <answer>
        <p>Symptoms: </p>
        <ul>
          <li>You can only reach Silverpeas using <i>localhost</i> or <i>127.0.0.1</i>.</li>
        </ul>
        <ol>
          <li>Stop Silverpeas.</li>
          <li>Edit the file
            <i>silverpeas_start_jboss.sh</i> or<i>silverpeas_start_jboss.cmd</i> and on the last line append
            <source>-b 0.0.0.0</source> before the <b>-c</b>.
          </li>
          <li>Restart Silverpeas </li>
        </ol>
        <p>Jboss should be listening on every IP address.</p>
      </answer>
    </faq>
    <faq id="jboss-ssl-port">
      <question>
        How do I configure the default SSL port for JBoss ?
      </question>
      <answer>
        <ol>
          <li>Stop Silverpeas.</li>
          <li>Edit your specific properties configuration file (i.e. <i>CustomerSettings.xml</i>, see below)
            and append
            <source>
<![CDATA[<fileset root="${JBOSS_CONF}/bindingservice.beans/META-INF/">
  <xmlfile name="bindings-jboss-beans.xml">
    <parameter key="/deployment/bean[@name='StandardBindings']//bean[property = 'HttpsConnector']" mode="update">
      <value location="property[@name='port']">${JBOSS_SSL_LISTEN_PORT}</value>
    </parameter>
  </xmlfile>
</fileset>]]></source> as a <b>silverpeas-settings</b> tag child.
          </li>
          <li>Configure JBOSS_SSL_LISTEN_PORT in $SILVERPEAS_HOME/setup/settings/config.properties. For example : <source>JBOSS_SSL_LISTEN_PORT=8443</source></li>
          <li>Launch SilverpeasSettings script (.bat or .sh)</li>
          <li>Restart Silverpeas</li>
        </ol>
        <p>
          <strong>Warning</strong> : this is not enabling a SSL connector. For this purpose, you still need to uncomment the SSL connector in JBoss server.xml</p>
      </answer>
    </faq>
    <faq id="jboss-win-service">
      <question>
        How do I install JBoss as a Windows service ?
      </question>
      <answer>
        <ol>
          <li>Stop Silverpeas.</li>
          <li>Edit $JBOSS_HOME/bin/run.conf.bat. Add an empty ADDITIONAL_JAVA_OPTS variable, initialize PROFILE variable and add the <em>-server</em> option at the first JAVA_OPTS line :
            <source>rem # these variables will be set by SilverpeasSettings script
              <strong>set ADDITIONAL_JAVA_OPTS=
                set PROFILE=default</strong>

              rem # JVM memory allocation pool parameters - modify as appropriate. Memory params will be set by SilverpeasSettings script
              set "JAVA_OPTS=<strong>-server</strong> -Xmx2048m -Xms2048m -XX:MaxPermSize=512m"</source>
          </li>
          <li>You can customize service name, display name and description by editing SVCNAME, SVCDISP and SVCDESC in $JBOSS_HOME/bin/service.bat. For example :
            <source>if "x%SVCNAME%" == "x" (
              set "SVCNAME=Silverpeas"
              )
              set SVCDISP=Silverpeas X.X
              set SVCDESC=Silverpeas X.X on a JBoss Application Server 6.1.0</source>
          </li>
          <li>Edit your specific properties configuration file (i.e. <i>CustomerSettings.xml</i>, see below) so that the SilverpeasSettings script update some parameters (Java options and JBoss profile) in the same way as start/debug commands. Append :
            <source>
<![CDATA[<fileset root="${JBOSS_HOME}/bin/">
  <textfile name="run.conf.bat">
    <parameter key="-Xms[0-9]+m" use-regex="true">-Xms${RAM_MIN}m</parameter>
    <parameter key="-Xmx[0-9]+m" use-regex="true">-Xmx${RAM_MAX}m</parameter>
    <parameter key="-XX:MaxPermSize=[0-9]+m" use-regex="true">-XX:MaxPermSize=${PERMSIZE_MAX}m</parameter>
    <parameter key="PROFILE=[a-zA-Z]+" use-regex="true">PROFILE=${JBOSS_SERVER_PROFILE}</parameter>
    <parameter key="ADDITIONAL_JAVA_OPTS=.*" use-regex="true">ADDITIONAL_JAVA_OPTS=${JAVA_OPTS}</parameter>
  </textfile>
</fileset>]]></source> as a <b>silverpeas-settings</b> tag child.
          </li>
          <li>Launch SilverpeasSettings script (.bat or .sh)</li>
          <li>Install service : <source>cd /d %JBOSS_HOME%\bin
              service.bat install</source>
          </li>
          <li>Silverpeas can now be launched as a service</li>
        </ol>
      </answer>
    </faq>
    <faq id="macosx">
      <question>
        On my Mac OS X I can't access a local Silverpeas installation.
      </question>
      <answer>
        <p>Symptoms: </p>
        <ul>
          <li>My Mac doesn't resolve <i>localhost</i> or <i>127.0.0.1</i> when offline.</li>
        </ul>
        <ol>
          <li>Stop Silverpeas.</li>
          <li>Execute the foloowing command:
            <source>sudo ifconfig en0 alias 127.0.0.1</source>.
          </li>
          <li>Restart Silverpeas </li>
        </ol>
        <p>You should be able to resolve <b>localhost</b> on your Mac now.</p>
        <p>Thanks to Galder Zamarreño for the answer (<a href="http://stackoverflow.com/questions/7892609/inetaddress-getlocalhost-resolution-on-osx-lion-when-offline">InetAddress.getLocalHost() resolution on OSX Lion when offline</a>)</p>
      </answer>
    </faq>
    <faq id="hornetq">
      <question>
        JBoss Hornet Q won't start with AIO library ?
      </question>
      <answer>
        <p>Symptoms: </p>
        <ul>
          <li>Silverpeas doesn't start.</li>
          <li>You have something like this in the
            <i>boot.log</i>
          </li>
        </ul>
        <source>
          ERROR [AbstractKernelController] Error installing to Start: name=JMSServerManager state=Create: HornetQException[errorCode=205 message=Can't open file]
          at org.hornetq.core.asyncio.impl.AsynchronousFileImpl.init(Native Method) [:6.0.0.20100911-M5]
          at org.hornetq.core.asyncio.impl.AsynchronousFileImpl.open(AsynchronousFileImpl.java:206) [:6.0.0.20100911-M5]
        </source>
        <ol>
          <li>Stop Silverpeas.</li>
          <li>Edit the file
            <i>hornetq-configuration.xml</i> adding just before the closing tag
            <b>"configuration"</b> :
            <source><![CDATA[<journal-type>NIO</journal-type>]]>
            </source>
          </li>
          <li>Restart Silverpeas </li>
          <li>Check the logs for verifying that the fix is done.</li>
        </ol>
        <p>Jboss should be ok.</p>
      </answer>
    </faq>
    <faq id="jcr">
      <question>
        How to fix a corrupted JCR ?
      </question>
      <answer>
        <p>Symptoms: </p>
        <ul>
          <li>Silverpeas doesn't start.</li>
          <li>You have something like this in the
            <i>traces.txt</i>
          </li>
        </ul>
        <source>
          ERROR : failed to read bundle: b623a49a-d944-4f33-9412-efca41c7a75f: java.lang.IllegalArgumentException: Invalid namespace index: 11
          ERROR : Node /attachments/kmelia76/Attachment/Images/4825 (ac61b0c4-1b92-429d-b695-f62950e73627) has missing child 'Cahier de gestion de l Education juin 2010.xls' (b623a49a-d944-4f33-9412-efca41c7a75f)
          ERROR : Failed to initialize workspace 'jackrabbit'
          javax.jcr.RepositoryException: Error indexing workspace: Error indexing workspace: Error indexing workspace
        </source>
        <ol>
          <li>Stop Silverpeas.</li>
          <li>Edit the file
            <i>repository.xml</i> adding into the section
            <b>"PersistenceManager"</b> :
            <source><![CDATA[<param name="consistencyCheck" value="true" />
<param name="consistencyFix" value="true" />]]>
            </source>
          </li>
          <li> Comment the section
            <b>"SearchIndex"</b>
          </li>
          <li>Restart Silverpeas </li>
          <li>Check the traces for verifying that the fix is done.</li>
          <li>Stop Silverpeas and put the file
            <i>repository.xml</i> into its previous state.
          </li>
        </ol>
        <p>The JCR should be ok.</p>
      </answer>
    </faq>
    <faq id="Upgrade">
      <question>
        How do I upgrade my Silverpeas installation ?
      </question>
      <answer>
        <p>Edit the file
          <i>$SILVERPEAS_HOME/bin/pom.xml</i> and change the version value (fort example, use 5.3.).
          <br/>
          In order to know the last available version got to
          <a href="http://www.silverpeas.org/redmine/projects/silverpeas/roadmap?completed=1&amp;with_subprojects=0&amp;with_subprojects=1">http://www.silverpeas.org/redmine/projects/silverpeas/roadmap?completed=1&amp;with_subprojects=0&amp;with_subprojects=1</a>.
        </p>
      </answer>
    </faq>
    <faq id="dad-config">
      <question>
        How do I configure the maximum size for an uploaded file ?
      </question>
      <answer>
        <p>The maximum size for an uploaded file is configured in the file
          <i>${SILVERPEAS_HOME}/properties/org/silverpeas/util/uploads/uploadSettings</i>.
          You have to change the value for the key
          <source>MaximumFileSize</source> with a size expressed  in bytes.
          <br/>
          For example to limit the size of an uploaded file to 15 Mo, the value should be (15 x 1024 x 1024) :
          <source>MaximumFileSize=15728640</source>
        </p>
      </answer>
    </faq>
    <faq id="files-workflow">
      <question>
        How do I restore files sent into a workflow ?
      </question>
      <answer>
        <p>The files are stored in the directory
          <source>${SILVERPEAS_DATA_HOME}/data/workspaces/Attachment</source>
        </p>
      </answer>
    </faq>
    <faq id="silverpeas-log">
      <question>
        How to configure Silverpeas to use rolling log files?
      </question>
      <answer>
        <p>The file
          <i>traces.txt</i> can grow significally. You can use a rolling file for the logs.
          <br/>
          This can be achieved by configuring the
          <b>Silvertrace</b>.
          <br/>
          Edit the file
          <i>${SILVERPEAS_HOME}/silvertrace/rootModule.properties</i> and configure like this :
          <br/>
          <source>
            appender0.enabled=true
            appender0.type=APPENDER_ROLLING_FILE
            appender0.module=root
            appender0.layout=LAYOUT_DETAILED
            appender0.fileName=@ErrorDir@/traces.txt
            appender0.rollingMode=ROLLING_MODE_WEEK
          </source>
        </p>
        <p> Thus the file
          <i>traces.txt</i> will be renammed each week.
        </p>
      </answer>
    </faq>
    <faq id="config-persistence">
      <question>
        How do I keep my specific properties configuration ?
      </question>
      <answer>
        <p>
          You must pay attention not to manually change properties because you will lose them when you will upgrade Silverpeas.<br/>
          Silverpeas provides an XML file called "CustomerSettings.xml" which is dedicated to that.<br/>
          this file located in $SILVERPEAS_HOME/setup/settings contains all the specific settings.<br/>
          In the extract of this file below you will see how to change a simple properties file such as an XML configuration file.
<br/>
          <source><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<silverpeas-settings product="Custom">
  <!-- simple properties file -->
  <!-- Change the property userSessionTimeout inside ${SILVERPEAS_HOME}/properties/org/silverpeas/peasCore/SessionManager.properties file -->
	<fileset root="${SILVERPEAS_HOME}/properties/org/silverpeas/peasCore/">
    <!-- Path of the properties file is
		<configfile name="SessionManager.properties">
			<!-- Change the session timeout in minute -->
			<parameter key="adminSessionTimeout">360</parameter>
			<parameter key="userSessionTimeout">180</parameter>
		</configfile>
  </fileset>
  <!-- XML properties file -->
  <!-- Change the XPath attribute "value" inside ${SILVERPEAS_DATA_HOME}/workflowRepository/myWorkflow.xml file -->
  <fileset root="${SILVERPEAS_DATA_HOME}/workflowRepository/">
    <xmlfile name="myWorkflow.xml">
      <parameter key="/processModel/actions/action[@name='Archiver']/consequences/consequence/triggers/trigger/param[@name='targetComponentId']" mode="update">
        <value location="@value">kmeliaXXX</value>
      </parameter>
    </xmlfile>
  </fileset>
  <!-- Copy file from ${SILVERPEAS_HOME}/path/to/source.txt to ${SILVERPEAS_DATA_HOME}/path/to/target.txt -->
  <fileset root="${SILVERPEAS_HOME}/path/to/">
    <copyfile name="source.txt">${SILVERPEAS_DATA_HOME}/path/to/target.txt</copyfile>
  </fileset>
</silverpeas-settings>
]]>
          </source>
          Be careful that all the paths are case sensitive (XPath and file Path).<br/>
        </p>
      </answer>
    </faq>
  </part>

  <part id="configuration">

    <title>Configuration</title>
    <faq id="csv-import">
      <question>
        What is the format of the CSV file for importing users in Silverpeas ?
      </question>
      <answer>
        <p>The format is :</p>
        <source>LastName;FirstName;Login;Email;Profile(Ex: Admin, AdminPdc, AdminDomain, User, Guest);Password</source>
      </answer>
    </faq>
    <faq id="unactivate-publication-stars">
      <question>
        How do I unactivate the display of the importance of a publication (the stars) in
        <b>Theme Tracker</b> ?
      </question>
      <answer>
        <p>This can be done by editing the value of
          <b>showImportance</b> in the file
          <i>$SILVERPEAS_HOME/properties/org/silverpeas/kmelia/settings/kmeliaSettings.properties</i>.
          The accepted values are :
          <ul>
            <li>yes : activated</li>
            <li>no : desactivated</li>
          </ul>
        </p>
      </answer>
    </faq>
    <faq id="how-to-setup-default-language">
      <question>
        How do I put all of Silverpeas in <b>English</b> ?
      </question>
      <answer>
        <p>There are two kinds of languages in Silverpeas : one for content and one for displaying the portal.<br/>
          Thus you have two files to edit :
          <b>showImportance</b> in the file
          <i>$SILVERPEAS_HOME/properties/org/silverpeas/kmelia/settings/kmeliaSettings.properties</i>.
          The accepted values are :
          <ul>
            <li>
              <i>org.silverpeas.personalizationPeas.settings.personalizationPeasSettings.properties</i> : the key <b>DefaultLanguage</b> defines the default language for new users.</li>
            <li>
              <i>org.silverpeas.util.i18n.properties</i> : the key <b>languages</b> defines the languages of the content.</li>
          </ul>
        </p>
      </answer>
    </faq>

    <faq id="anonymous-access">
      <question>
        How to put accessible some applications in Silverpeas by anyone without requiring an authentication?
      </question>
      <answer>
        <p>First, the applications having to be accessed by anyone must have their parameter <i>public access</i> at true.</p>
        <p>Then, in order to access anonymously to Silverpeas, the following steps have to be done:</p>
        <ul>
          <li>Create a guest user with <i>guest</i> as both login and password and keep in mind the internal identifier of the newly created user;</li>
          <li>Update the configuration file <i>$SILVERPEAS_HOME/properties/org/silverpeas/lookAndFeel/generalLook.properties</i> as follow:
            <ul>
              <li>Set the value of the parameter <i>loginPage</i> with the value <i>loginAuto.jsp</i>;</li>
              <li>Set the value of the parameter <i>anonymousId</i> with the internal identifier of the guest user.</li>
            </ul>
          </li>
          <li>restart Silverpeas</li>
        </ul>
      </answer>
    </faq>
  </part>

</faqs>