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

Invalid hibernate configuration in debian packages with Oracle MySQL when system timezone containing a +

    XMLWordPrintable

    Details

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

      Description

      First, you need to have VirtualBox and Vagrant installed, then:

      1. Create a new directory, and go inside
        mkdir stretch && cd stretch
      2. Create a file called Vagrantfile, with the following content
        # -*- mode: ruby -*-
        # vi: set ft=ruby :
        
        Vagrant.configure("2") do |config|
          config.vm.box = "debian/stretch64"
        
          # To access XWiki from the outside on the port 8081
          config.vm.network "forwarded_port", guest: 8080, host: 8081
        
          # Configure the amount of memory on the VM
          config.vm.provider "virtualbox" do |vb|
            vb.memory = "3192"
          end
          
        end
        
      3. Create and start the machine
        vagrant up
      4. Connect to that machine
        vagrant ssh
      5. That's it, you're logged into your new virtual machine with a fresh Debian Stretch install!
      6. Note that you can browse to your wiki with your regular browser using the url http://localhost:8081/xwiki (there is a port redirection)
      7. Make sure the timezone is a "problematic" one
        vagrant@stretch:~$ timedatectl | grep "Time zone"
               Time zone: GMT+0 (GMT, +0000)
        
      8. Install the needed dependency to handle HTTPS repositories
        sudo apt-get install apt-transport-https
        
      9. Now install Oracle MySQL repositories ; create the file /etc/apt/sources.list.d/mysql.list with the following content:
        deb http://repo.mysql.com/apt/debian/ stretch mysql-5.7
        
      10. Install the Oracle's key
        wget -q "https://keyserver.ubuntu.com/pks/lookup?search=0x5072E1F5&op=get" -O- | sudo apt-key add -
        
      11. Now install XWiki repository:
        sudo wget "https://maven.xwiki.org/stable/xwiki-stable.list" -P /etc/apt/sources.list.d/
        wget -q "https://maven.xwiki.org/public.gpg" -O- | sudo apt-key add -
        sudo apt-get update
        
      12. Install XWiki 12.6.5 and CURL
        sudo apt-get install xwiki-tomcat8-mysql=12.6.5 xwiki-tomcat8-common=12.6.5 xwiki-mysql-common=12.6.5 xwiki-common=12.6.5 curl
        
      13. Wait a bit, wake up xwiki
        curl http://localhost:8080/xwiki/bin/view/Main/
        
      14. Wait until xwiki is initialized
        curl http://localhost:8080/xwiki/bin/view/Main/
        

        You end up with the following error in the page:

        java.sql.SQLException: Cannot create PoolableConnectionFactory (No timezone mapping entry for 'GMT 00:00')
        

        Attachments

          Issue Links

            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: