skip to Main Content

I installed a Solr 8.1.1 on a centos 7, openJdk11 and want to create a new core. But on creating i get an error message:

ERROR: Error CREATEing SolrCore 'myCore': Unable to create core [myCore] Caused by: null

org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Bad or unsupported pattern: java.time.format.DateTimeFormatter$ClassicFormat@53ea7249"

2

Answers


  1. Sample API to create a core is as mentioned below.

    http://localhost:8983/solr/admin/cores?action=CREATE&name=coreName&instanceDir=path/to/dir
    &config=config_file_name.xml&dataDir=data
    

    Using SolrJ API it would be someting like as below.

      String solrUrl = "http://localhost:8983/solr";
      HttpSolrClient client = new HttpSolrClient.Builder(solrUrl).build();
    
      CoreAdminRequest.Create createCore = new CoreAdminRequest.Create();
      createCore.setCoreName(core);
      createCore.setConfigSet( coreName);
      createCore.process(client);
    
    Login or Signup to reply.
  2. I had the same issue, somehow it is related to openJDK. I installed oracleJDK and set it as default java using

    update-alternatives --config java
    

    and selected oracleJDK home as default then used

    solr create -c myCore
    

    It worked for me.

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search