You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Zilo Zongh (JIRA)" <ji...@apache.org> on 2015/05/13 03:04:59 UTC
[jira] [Created] (SOLR-7536) adding fields to newly created
managed-schema could sometimes cause error
Zilo Zongh created SOLR-7536:
--------------------------------
Summary: 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
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
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org