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

Error message when starting XWiki for the first time on PostgreSQL & Oracle

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 6.1-milestone-2, 5.4.6
    • 5.4.4, 6.1-milestone-1, 6.0.1
    • Old Core
    • None
    • PostgreSQL
      Oracle
    • Unknown
    • N/A
    • N/A

    Description

      Setup an XWiki server that uses PostgreSQL as the DB, then start the server and connect to it. You'll see a message similar to this one:

      2014-05-26 15:23:01,630 [XWiki initialization] INFO  .HibernateDataMigrationManager - Checking Hibernate mapping and updating schema if needed for wiki [xwiki]
      2014-05-26 15:23:02,696 [XWiki initialization] ERROR .HibernateDataMigrationManager - The empty database xwiki seems to be not writable, please check your configuration!
      com.xpn.xwiki.store.migration.DataMigrationException: Unable to update schema of wiki [xwiki]
              at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.updateSchema(HibernateDataMigrationManager.java:181) ~[xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.initializeEmptyDB(HibernateDataMigrationManager.java:141) ~[xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.initNewDB(AbstractDataMigrationManager.java:434) [xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.initializeCurrentDatabase(AbstractDataMigrationManager.java:534) [xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.checkDatabase(AbstractDataMigrationManager.java:517) [xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              at com.xpn.xwiki.store.XWikiHibernateBaseStore.setDatabase(XWikiHibernateBaseStore.java:722) [xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              at com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:898) [xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              at com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:830) [xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:829) [xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:291) [xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1357) [xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1405) [xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              at com.xpn.xwiki.XWiki.getXWikiPreference(XWiki.java:2081) [xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              at com.xpn.xwiki.XWiki.getXWikiPreference(XWiki.java:2113) [xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              at com.xpn.xwiki.render.XWikiMacrosMappingRenderer.loadPreferences(XWikiMacrosMappingRenderer.java:107) [xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              at com.xpn.xwiki.render.XWikiMacrosMappingRenderer.<init>(XWikiMacrosMappingRenderer.java:83) [xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.<init>(DefaultXWikiRenderingEngine.java:72) [xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              at com.xpn.xwiki.XWiki.resetRenderingEngine(XWiki.java:1004) [xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:760) [xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              at com.xpn.xwiki.XWiki.<init>(XWiki.java:661) [xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              at com.xpn.xwiki.internal.XWikiInitializerJob.runInternal(XWikiInitializerJob.java:129) [xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              at org.xwiki.job.internal.AbstractJob.run(AbstractJob.java:155) [xwiki-commons-job-6.1-milestone-1.jar:na]
              at org.xwiki.context.concurrent.ExecutionContextRunnable.run(ExecutionContextRunnable.java:70) [xwiki-commons-context-6.1-milestone-1.jar:na]
              at java.lang.Thread.run(Unknown Source) [na:1.8.0_05]
      Caused by: org.hibernate.HibernateException: Failed updating schema while executing query [create sequence public.hibernate_sequence]
              at com.xpn.xwiki.store.XWikiHibernateBaseStore.updateSchema(XWikiHibernateBaseStore.java:613) [xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              at com.xpn.xwiki.store.XWikiHibernateBaseStore.updateSchema(XWikiHibernateBaseStore.java:371) [xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.hibernateShemaUpdate(HibernateDataMigrationManager.java:196) ~[xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.updateSchema(HibernateDataMigrationManager.java:178) ~[xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              ... 23 common frames omitted
      Caused by: org.postgresql.util.PSQLException: ERROR: relation "hibernate_sequence" already exists
              at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161) ~[postgresql-9.3-1101.jdbc41.jar:na]
              at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890) ~[postgresql-9.3-1101.jdbc41.jar:na]
              at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) ~[postgresql-9.3-1101.jdbc41.jar:na]
              at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:559) ~[postgresql-9.3-1101.jdbc41.jar:na]
              at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:403) ~[postgresql-9.3-1101.jdbc41.jar:na]
              at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:331) ~[postgresql-9.3-1101.jdbc41.jar:na]
              at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228) ~[commons-dbcp-1.3.jar:1.3]
              at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228) ~[commons-dbcp-1.3.jar:1.3]
              at com.xpn.xwiki.store.XWikiHibernateBaseStore.updateSchema(XWikiHibernateBaseStore.java:609) [xwiki-platform-legacy-oldcore-6.1-milestone-1.jar:na]
              ... 26 common frames omitted
      2014-05-26 15:23:02,703 [XWiki initialization] INFO  .HibernateDataMigrationManager - Checking Hibernate mapping and updating schema if needed for wiki [xwiki]
      2014-05-26 15:23:03,602 [XWiki initialization] INFO  .HibernateDataMigrationManager - Storage schema updates and data migrations are enabled
      2014-05-26 15:23:03,603 [XWiki initialization] INFO  .HibernateDataMigrationManager - No data migration to apply for wiki [xwiki] currently in version [54300]
      2014-05-26 15:23:03,603 [XWiki initialization] INFO  .HibernateDataMigrationManager - Checking Hibernate mapping and updating schema if needed for wiki [xwiki]
      2014-05-26 15:23:07,809 [XWiki Solr index job thread] INFO  o.x.s.s.i.j.IndexerJob         - Starting job of type [solr.indexer] with identifier [[solr, indexer]]
      2014-05-26 15:23:07,954 [XWiki Solr index job thread] INFO  o.x.s.s.i.j.IndexerJob         - 0 documents added, 28 deleted and 0 updated during the synchronization of the Solr index.
      2014-05-26 15:23:07,955 [XWiki Solr index job thread] INFO  o.x.s.s.i.j.IndexerJob         - Finished job of type [solr.indexer] with identifier [[solr, indexer]]
      

      The message says "The empty database xwiki seems to be not writable, please check your configuration!", but I am able to install the UI using DW.
      Doesn't reproduce on 3.5.1 & 4.5.4.

      Attachments

        Issue Links

          Activity

            People

              vmassol Vincent Massol
              msmeria Manuel Smeria
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: