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

Christopher Jackson edited comment on SOLR-7536 at 6/8/18 7:12 PM:
-------------------------------------------------------------------

I have also just encountered this issue on version 5.5.2 when using solrCloud 
and a ManagedIndexSchemaFactory. The configset included a schema.xml which was 
used to produce a managed-schema file in the config folder on zk, however the 
modify to the schema failed as it was still looking for schema.xml.

To workaround the issue I took the managed-schema that was introduced and 
placed it in my initial configset, dropped the collection, recreated it, and 
tried the update to schema again which worked without issue.


was (Author: jackson):
I have also just encountered this issue on version 5.5.2. The configset 
included a schema.xml which was used to produce a managed-schema file in the 
config folder on zk, however the modify to the schema failed as it was still 
looking for schema.xml.

To workaround the issue I took the managed-schema that was introduced and 
placed it in my initial configset, dropped the collection, recreated it, and 
tried the update to schema again which worked without issue.

>  adding fields to newly created managed-schema could sometimes cause error
> --------------------------------------------------------------------------
>
>                 Key: SOLR-7536
>                 URL: https://issues.apache.org/jira/browse/SOLR-7536
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Zilo Zongh
>            Assignee: Steve Rowe
>            Priority: Major
>
> When using managed schema in SolrCloud, adding fields into schema would 
> SOMETIMES end up prompting "Can't find resource 'schema.xml' in classpath or 
> '/configs/collectionName', cwd=/export/solr/solr-5.1.0/server", there is of 
> course no schema.xml in configs, but 'schema.xml.bak' and 'managed-schema'
> Code to upload configs and create collection:
>  Path tempPath = getConfigPath();
>                       client.uploadConfig(tempPath, name); //customized 
> configs with solrconfig.xml using ManagedIndexSchemaFactory
>                       
>                       if(numShards==0){
>                               numShards = getNumNodes(client);
>                       }
>                       
>                       Create request = new CollectionAdminRequest.Create();
>                       request.setCollectionName(name);
>                       request.setNumShards(numShards);
>                       replicationFactor = 
> (replicationFactor==0?DEFAULT_REPLICA_FACTOR:replicationFactor);
>                       request.setReplicationFactor(replicationFactor);
>                       
> request.setMaxShardsPerNode(maxShardsPerNode==0?replicationFactor:maxShardsPerNode);
>                       CollectionAdminResponse response = 
> request.process(client);
>  adding fields to schema, either by curl or by httpclient,  would sometimes 
> yield the following error, but the error can be fixed by RELOADING the newly 
> created collection once or several times:
> INFO  - [{  "responseHeader":{    "status":500,    "QTime":5},  
> "errors":["Error reading input String Can't find resource 'schema.xml' in 
> classpath or '/configs/collectionName', cwd=/export/solr/solr-5.1.0/server"], 
>  "error":{    "msg":"Can't find resource 'schema.xml' in classpath or 
> '/configs/collectionName', cwd=/export/solr/solr-5.1.0/server",    
> "trace":"java.io.IOException: Can't find resource 'schema.xml' in classpath 
> or '/configs/collectionName', cwd=/export/solr/solr-5.1.0/server
>        
>       at 
> org.apache.solr.cloud.ZkSolrResourceLoader.openResource(ZkSolrResourceLoader.java:98)
>       at 
> org.apache.solr.schema.SchemaManager.getFreshManagedSchema(SchemaManager.java:421)
>       at 
> org.apache.solr.schema.SchemaManager.doOperations(SchemaManager.java:104)
>       at 
> org.apache.solr.schema.SchemaManager.performOperations(SchemaManager.java:94)
>       at 
> org.apache.solr.handler.SchemaHandler.handleRequestBody(SchemaHandler.java:57)
>       at 
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:143)
>       at org.apache.solr.core.SolrCore.execute(SolrCore.java:1984)
>       at 
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:829)
>       at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:446)
>       at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:220)
>       at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
>       at 
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
>       at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
>       at 
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
>       at 
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
>       at 
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
>       at 
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
>       at 
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
>       at 
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
>       at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
>       at 
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
>       at 
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
>       at 
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
>       at org.eclipse.jetty.server.Server.handle(Server.java:368)
>       at 
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
>       at 
> org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
>       at 
> org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:953)
>       at 
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1014)
>       at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)
>       at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
>       at 
> org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
>       at 
> org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
>       at 
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
>       at 
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
>       at java.lang.Thread.run(Thread.java:745)\n",    "code":500}}]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to