Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-11494

Expected mime type application/octet-stream but got text/html

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 6.5
    • Fix Version/s: None
    • Component/s: SolrCLI, SolrJ
    • Labels:
      None
    • Environment:

      Windows 10
      Java jdk1.8.0_144
      Solr 6.5.0
      Spring Data Solr 2.0.5.RELEASE
      Spring Version 4.3.12.RELEASE

      Description

      I have been following tutorial from below link to implement Spring data Solr
      http://www.baeldung.com/spring-data-solr

      Attached is my config file, model and repository for spring data solr.

      when i make any query or save my model i receive the below exception.....
      my solr is working fine when i ping from browser " http://127.0.0.1:8983/solr/"

       MerchantModel model = new MerchantModel();
      model.setId("2");
      model.setLocation("31.5287,74.4121");
      model.setTitle("khawaja");
      merchantRepository.save(model);
      

      upon save i am getting the below exception
      ###############################################
      org.springframework.data.solr.UncategorizedSolrException: Error from server at http://127.0.0.1:8983/solr: Expected mime type application/octet-stream but got 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</h2>
      <p>Problem accessing /solr/update. Reason:
      <pre> Not Found</pre></p>
      </body>
      </html>
      ; nested exception is org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://127.0.0.1:8983/solr: Expected mime type application/octet-stream but got 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</h2>
      <p>Problem accessing /solr/update. Reason:
      <pre> Not Found</pre></p>
      </body>
      </html>
      ###############################################

        Attachments

        1. MerchantRepository.java
          0.6 kB
          khawaja MUHAMMAD Shoaib
        2. MerchantModel.java
          1 kB
          khawaja MUHAMMAD Shoaib
        3. SolrConfig.java
          0.9 kB
          khawaja MUHAMMAD Shoaib

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              thekhawaja khawaja MUHAMMAD Shoaib
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: