lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-6182) Using rest manager endpoint to create a new (yet unused) managed resource results in corrupt file, solr can't restart
Date Thu, 19 Jun 2014 20:04:28 GMT

    [ https://issues.apache.org/jira/browse/SOLR-6182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14037780#comment-14037780
] 

Hoss Man commented on SOLR-6182:
--------------------------------

Steps to reproduce:

* launch solr 4.8 with the example configs (java -jar start.jar)
* execute the following curl command (taken verbatim from the ref guide){code}
curl -X PUT -H 'Content-type:application/json' --data-binary '{"class":"org.apache.solr.rest.schema.analysis.ManagedWordSetResource"}'
"http://localhost:8983/solr/collection1/schema/analysis/stopwords/german"
{code}
* shutdown solr (Ctrl-C)
* restart solr (java -jar start.jar)

Error message preventing collection1 from starting...

{noformat}
2726 [coreLoadExecutor-5-thread-1] ERROR org.apache.solr.core.CoreContainer  – Unable to
create core: collection1
org.apache.solr.common.SolrException: java.util.ArrayList cannot be cast to java.util.Map
	at org.apache.solr.core.SolrCore.<init>(SolrCore.java:868)
	at org.apache.solr.core.SolrCore.<init>(SolrCore.java:643)
	at org.apache.solr.core.CoreContainer.create(CoreContainer.java:556)
	at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:261)
	at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:253)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.util.Map
	at org.apache.solr.rest.RestManager$RestManagerManagedResource.onManagedDataLoadedFromStorage(RestManager.java:457)
	at org.apache.solr.rest.ManagedResource.reloadFromStorage(ManagedResource.java:230)
	at org.apache.solr.rest.ManagedResource.loadManagedDataAndNotify(ManagedResource.java:86)
	at org.apache.solr.rest.RestManager.init(RestManager.java:589)
	at org.apache.solr.core.SolrCore.initRestManager(SolrCore.java:2351)
	at org.apache.solr.core.SolrCore.<init>(SolrCore.java:847)
	... 10 more
{noformat}

The contents of the {{solr/collection1/conf/_rest_managed.json}} file that was created by
Solr when the curl command was executed...

{code}
{
  "initArgs":{},
  "initializedOn":"2014-06-19T19:57:11.889Z",
  "managedList":[{
      "resourceId":"/schema/analysis/stopwords/german",
      "class":"org.apache.solr.rest.schema.analysis.ManagedWordSetResource",
      "numObservers":"0"}]}
{code}

> Using rest manager endpoint to create a new (yet unused) managed resource results in
corrupt file, solr can't restart
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-6182
>                 URL: https://issues.apache.org/jira/browse/SOLR-6182
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Hoss Man
>
> The ref guide documents that...
> bq. You can also create new managed resource using PUT/POST to the appropriate URL –
before ever configuring anything that uses these resources.
> ...however attempting to do this results in the creation of "_rest_managed.json" file
that is not in the format expected by solr, and prevents solr from starting up.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message