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

Cannot upgrade when using a remote Solr core

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 13.2-rc-1, 12.10.6
    • 12.10.1
    • Old Core
    • None
    • Unknown
    • N/A
    • N/A

    Description

      When trying to migrate XWiki to 12.10.1 or after, from an instance before XWiki 12.8, with an external Solr server, the following migration error happens:

      2021-03-16 12:03:18,995 [XWiki initialization] ERROR .HibernateDataMigrationManager - Failed to migrate database [xwiki]... 
      com.xpn.xwiki.store.migration.DataMigrationException: Data migration R120901000XWIKI17761 failed
              at com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration.migrate(AbstractHibernateDataMigration.java:120)
              at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.startMigrations(AbstractDataMigrationManager.java:837)
              at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.migrateDatabase(AbstractDataMigrationManager.java:736)
              at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.startMigrations(AbstractDataMigrationManager.java:657)
              at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.startMigrations(HibernateDataMigrationManager.java:361)
              at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.startMigrationsOnlyOnce(AbstractDataMigrationManager.java:637)
              at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.tryToProcceedToMigration(AbstractDataMigrationManager.java:614)
              at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.checkDatabase(AbstractDataMigrationManager.java:539)
              at com.xpn.xwiki.internal.store.hibernate.HibernateStore.setWiki(HibernateStore.java:671)
              at com.xpn.xwiki.internal.store.hibernate.HibernateStore.setWiki(HibernateStore.java:632)
              at com.xpn.xwiki.internal.store.hibernate.HibernateStore.beginTransaction(HibernateStore.java:810)
              at com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:577)
              at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:976)
              at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:394)
              at com.xpn.xwiki.XWiki.getDocument(XWiki.java:2144)
              at com.xpn.xwiki.XWiki.getDocument(XWiki.java:2206)
              at com.xpn.xwiki.XWiki.initializeMandatoryDocument(XWiki.java:1418)
              at com.xpn.xwiki.XWiki.initializeMandatoryDocuments(XWiki.java:1385)
              at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:1290)
              at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:1227)
              at com.xpn.xwiki.XWiki.<init>(XWiki.java:1200)
              at com.xpn.xwiki.internal.XWikiInitializerJob.runInternal(XWikiInitializerJob.java:117)
              at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:243)
              at org.xwiki.job.AbstractJob.run(AbstractJob.java:220)
              at java.base/java.lang.Thread.run(Thread.java:834)
      Caused by: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://IP/solr/xwiki_like: Expected mime type application/octet-stream but g
      ot text/html. <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
      <title>Error 404 Not Found</title>
      </head>
      <body><h2>HTTP ERROR 404 Not Found</h2>
      <table>
      <tr><th>URI:</th><td>/solr/xwiki_like/select</td></tr>
      <tr><th>STATUS:</th><td>404</td></tr>
      <tr><th>MESSAGE:</th><td>Not Found</td></tr>
      <tr><th>SERVLET:</th><td>default</td></tr>
      </table>
      
      </body>
      </html>
      
              at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:629)
              at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:265)
              at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:248)
              at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:211)
              at org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:1003)
              at org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:1018)
              at org.xwiki.ratings.internal.migration.SolrDocumentMigration120900000.migrateAllDocumentsFrom1207000000(SolrDocumentMigration120900000.java:107)
              at org.xwiki.ratings.internal.migration.R120901000XWIKI17761DataMigration.handleLikeMigration(R120901000XWIKI17761DataMigration.java:297)
              at org.xwiki.ratings.internal.migration.R120901000XWIKI17761DataMigration.hibernateMigrate(R120901000XWIKI17761DataMigration.java:274)
              at com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration.migrate(AbstractHibernateDataMigration.java:118)
      
      

      Attachments

        Issue Links

          Activity

            People

              surli Simon Urli
              surli Simon Urli
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: