Solr 6.x – SolrException Unable to create core [xxx] Caused by: Input length = 1

Solr 6.x – SolrException Unable to create core [xxx] Caused by: Input length = 1

In Solr 6.x if you are getting exceptions like java.nio.charset.MalformedInputException: Input length = 1  and unable to load/reload the core, then most likely you are having issues is synonyms file. I added exception details at the end of the post so you can compare the typical exception message.

This issue is cause by improper character set encoding of synonyms file(s). The expected encoding of file is UTF-8 so if file is encoded as ANSI or ASCII Solr will be unable to read that file and throw this ugly exception.

To fix the issue convert the files to UTF-8 and try reload the cores. There are several ways of converting but for me Notpad++ is handy and always work. To convert open the file in Notepad++ got to menu item “Encoding” and click “Convert to UTF-8” and then save file.

After converting upload the file to solr and reload core it should fix your issue.

Here is the full exception I was getting

 

 

By | 2017-04-12T17:33:53+00:00 April 12th, 2017|0 Comments

About the Author:

Waseem is our consultant for Sphinx Search, Elastic and Solr. He is lamp stack backend developer and has 14 years of experience of development. His areas of interest (other than search) are NoSQL and BigData tools.