Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-17914

The xwiki-tomcat8-mariadb package is not working on Debian Stretch

    Details

    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Debian stretch is the previous stable version of Debian. It is still used in some places. When I install xwiki-tomcat8-mariadb, the wiki is actually not usable because the application cannot connect to MariaDB.

      Steps to reproduce:
      1. Open a fresh debian stretch machine. The easier is to use Vagrant to create a virtual machine and to provision it with a debian image, available on the "vagrant boxes" collector.
      2. Add a backport to be able to install tomcat8. Edit /etc/apt/sources.list and add

      deb http://ftp.debian.org/debian stretch-backports main

      3. Install the apt-transport-https package

      sudo apt-get install apt-transport-https

      4. Add the XWiki PGP key

      wget -q "https://maven.xwiki.org/public.gpg" -O- | sudo apt-key add -

      5. Add the XWiki repository

      sudo wget "https://maven.xwiki.org/stable/xwiki-stable.list" -P /etc/apt/sources.list.d/

      6. Update the debian packages

      sudo apt-get update

      7. Install XWiki with the debian packages

      sudo apt-get install xwiki-tomcat8-mariadb=12.6.2 xwiki-tomcat8-common=12.6.2 xwiki-mariadb-common=12.6.2 xwiki-common=12.6.2

      As a results, you get a running webapp, where each requests leads to an error page:

      2020-10-07 16:15:58,004 [XWiki initialization] WARN  o.h.c.i.C3P0ConnectionProvider - HHH10001006: No JDBC Driver class was specified by property hibernate.connection.driver_class 
      2020-10-07 16:16:28,840 [C3P0PooledConnectionPoolManager[identityToken->z8kfsxad12focykhmomf|65c07028]-HelperThread-#2] WARN  c.m.v.r.BasicResourcePool      - com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@219e6dba -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:  
      java.sql.SQLException: No suitable driver
              at java.sql.DriverManager.getDriver(DriverManager.java:315)
      
      2020-10-07 16:16:59,115 [XWiki initialization] WARN  o.h.c.i.C3P0ConnectionProvider - HHH10001006: No JDBC Driver class was specified by property 
      hibernate.connection.driver_class 
      

      The configuration (hibernate.cfg.xml) looks good:

      <property name="hibernate.connection.url">jdbc:mariadb://localhost/xwiki?useSSL=false</property>
          <property name="hibernate.connection.username">xwiki</property>
          <property name="hibernate.connection.password">xHl1a0enCVmb</property>
          <property name="hibernate.connection.driver_class">org.mariadb.jdbc.Driver</property>
          <property name="hibernate.dbcp.poolPreparedStatements">true</property>
          <property name="hibernate.dbcp.maxOpenPreparedStatements">20</property>
      
          <property name="hibernate.connection.charSet">UTF-8</property>
          <property name="hibernate.connection.useUnicode">true</property>
          <property name="hibernate.connection.characterEncoding">utf8</property>
      
          <mapping resource="xwiki.hbm.xml"/>
          <mapping resource="feeds.hbm.xml"/>
          <mapping resource="instance.hbm.xml"/>
          <mapping resource="notification-filter-preferences.hbm.xml"/>
          <mapping resource="mailsender.hbm.xml"/>
      

      The database is indeed empty:

      root@cloud--cloudtemplate:/home/vagrant# mysql -u root
      Welcome to the MariaDB monitor.  Commands end with ; or \g.
      Your MariaDB connection id is 13
      Server version: 10.1.45-MariaDB-0+deb9u1 Debian 9.12
      
      Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
      
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
      
      MariaDB [(none)]> use xwiki;
      Database changed
      MariaDB [xwiki]> show tables;
      Empty set (0.00 sec)
      

        Attachments

          Activity

            People

            • Assignee:
              tmortagne Thomas Mortagne
              Reporter:
              gdelhumeau Guillaume Delhumeau
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: