Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-12770

Error when updating solr core url

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 4.10.1, 4.11.0
    • 4.10.0
    • Solr
    • None
    • 4.10.1

      I have multiple instances of Ametys using the same solr server with different prefix.
      One use the prefix ametys- an other use the prefix ametys-odf-

      During initialisation, of the one with prefix ametys- I have the following warning in my log :

      Message:		Error when trying to update Ametys URL core property on Solr server.
      Location:	org.apache.cocoon.util.log.SLF4JLoggerAdapter.warn(SLF4JLoggerAdapter.java:101)
      Thrown:
      java.lang.NullPointerException: Cannot invoke "org.apache.solr.client.solrj.SolrClient.request(org.apache.solr.client.solrj.SolrRequest, String)" because "client" is null
      	at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:279)
      	at org.ametys.cms.content.indexing.solr.SolrIndexer.updateAmetysUrlCoreProperty(SolrIndexer.java:424)
      	at org.ametys.cms.content.indexing.solr.SolrCoreInit.updateAmetysUrlCoreProperty(SolrCoreInit.java:105)
      	at org.ametys.cms.content.indexing.solr.SolrCoreInit.init(SolrCoreInit.java:70)
      

      After investigation, it happens because we try to update the collection named odf-xxx because the method getCoreNames() returns every available core that starts with the prefix

            ggouin Guillaume Gouin
            ggouin Guillaume Gouin
            Guillaume Gouin Guillaume Gouin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: