Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed in [xwiki:Licenses.Code.AvailableTemplateProvidersFilter]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.
Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed in [xwiki:CKEditor.EditMenuEntry]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.
Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed in [xwiki:SyntaxHighlighting.EnableSyntaxHighlighting]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.

Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed in [xwiki:Licenses.Code.MissingLicensesUIX]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.
Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed in [xwiki:Licenses.Code.MissingLicensesUIX]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.

Follow these instuctions:

  • Download and install PostgreSQL (http://www.postgresql.org/)
  • Download appropriate Postgres JDBC4 driver (or directly from the Maven Central Repository and copy the JAR into your container's common lib directory or in the XWiki webapp (in WEB-INF/lib)
  • Start PostgreSQL
    • On Mac you could issue the following shell commands to start/stop PostgreSQL 9.1 (adapt to your version and to your setup):
      sudo -u postgres /Library/PostgreSQL/9.1/bin/pg_ctl start -D /Library/PostgreSQL/9.1/data
      sudo -u postgres /Library/PostgreSQL/9.1/bin/pg_ctl stop -D /Library/PostgreSQL/9.1/data
  • Create the xwiki user and the xwiki database:
    • Using the psql tool:

      In a shell, start the PostgreSQL interactive terminal:

      psql -U <replace_with_your_admin_user_eg_postgres>;

      Create the xwiki database:

      CREATE DATABASE xwiki
      WITH OWNER = <replace_with_your_admin_user_eg_postgres>
      ENCODING = 'UNICODE'
      TABLESPACE = pg_default;

      Verify that the xwiki database is listed in the available databases:

      \l

      Connect to the xwiki database:

      \connect xwiki

      Create a xwiki user:

      CREATE USER xwiki PASSWORD 'xwiki' VALID UNTIL 'infinity';

      Verify that the xwiki user is listed in the available users:

      \du

      Gives all permissions to the xwiki user:

      GRANT ALL ON SCHEMA public TO xwiki;
    • Using the createuser and createdb programs:

      Make sure that the createuser and createdb programs are in your $PATH. The example below also assumes that the postgres user exists in your setup (this is the default on Linux).

      Create the xwiki user:

      createuser xwiki -S -D -R -P -Upostgres

      Create the xwiki database:

      createdb xwiki -Eunicode -Oxwiki -Upostgres
  • Tell XWiki to use this database. To do this, edit the WEB-INF/hibernate.cfg.xml file where you have expanded the XWiki WAR file and uncomment the PostgreSQL part. Make sure to review the connection.url property. For example a typical value would be:
    <property name="connection.url">jdbc:postgresql://localhost:5432/xwiki</property>
Tags:
   

Get Connected