Thank Erick for the pointer. I'll investigate. On Wed, Sep 28, 2016 at 2:20 PM, Erick Erickson <erickerick...@gmail.com> wrote:
> NoSuchMethod exceptions are _usually_ the result of somehow > mixing old and new jars, do you have any older versions of Solr > on your machine? How are you starting Solr? A common root > cause is using some kind of servlet container and copying Solr > jars around to try to make the container happy thus getting old > and new versions.... > > Best, > Erick > > On Wed, Sep 28, 2016 at 11:46 AM, Darshan Pandya > <darshanpan...@gmail.com> wrote: > > Hello, > > > > I am facing the following issue with trying to add documents to a solr > 6.2 > > cloud collection > > > > I am facing the following problem > > > > curl -X POST -H 'Content-Type: application/json' ' > > http://host:8983/solr/one/update/json/docs' --data-binary ' > > { > > "dataset_id": "1", > > "search_string": "search documents" > > }' > > > > { > > "responseHeader": { > > "status": 500, > > "QTime": 29 > > }, > > "error": { > > "metadata": [ > > "error-class", > > "org.apache.solr.common.SolrException", > > "root-error-class", > > "java.lang.NoSuchMethodException" > > ], > > "msg": "Unable to invoke function processAdd in script: > > update-script.js: Can't unambiguously select between fixed arity > signatures > > [(java.lang.String, java.lang.String), (java.lang.String, > java.io.Reader)] > > of the method org.apache.solr.analysis.TokenizerChain.tokenStream for > > argument types [java.lang.String, null]", > > "trace": "org.apache.solr.common.SolrException: Unable to invoke > > function processAdd in script: update-script.js: Can't unambiguously > select > > between fixed arity signatures [(java.lang.String, java.lang.String), > > (java.lang.String, java.io.Reader)] of the method > > org.apache.solr.analysis.TokenizerChain.tokenStream for argument types > > [java.lang.String, null]\n\tat > > org.apache.solr.update.processor.StatelessScriptUpdateProcessor > Factory$ScriptUpdateProcessor.invokeFunction( > StatelessScriptUpdateProcessorFactory.java:436)\n\tat > > org.apache.solr.update.processor.StatelessScriptUpdateProcessor > Factory$ScriptUpdateProcessor.processAdd(StatelessScriptUpdateProcessor > Factory.java:373)\n\tat > > org.apache.solr.update.processor.UpdateRequestProcessor.processAdd( > UpdateRequestProcessor.java:48)\n\tat > > org.apache.solr.update.processor.LanguageIdentifierUpdateProces > sor.processAdd(LanguageIdentifierUpdateProcessor.java:205)\n\tat > > org.apache.solr.update.processor.UpdateRequestProcessor.processAdd( > UpdateRequestProcessor.java:48)\n\tat > > org.apache.solr.update.processor.AddSchemaFieldsUpdateProcessorFactory$ > AddSchemaFieldsUpdateProcessor.processAdd(AddSchemaFieldsUpdateProcessor > Factory.java:335)\n\tat > > org.apache.solr.update.processor.UpdateRequestProcessor.processAdd( > UpdateRequestProcessor.java:48)\n\tat > > org.apache.solr.update.processor.FieldMutatingUpdateProcessor. > processAdd(FieldMutatingUpdateProcessor.java:117)\n\tat > > org.apache.solr.update.processor.UpdateRequestProcessor.processAdd( > UpdateRequestProcessor.java:48)\n\tat > > org.apache.solr.update.processor.FieldMutatingUpdateProcessor. > processAdd(FieldMutatingUpdateProcessor.java:117)\n\tat > > org.apache.solr.update.processor.UpdateRequestProcessor.processAdd( > UpdateRequestProcessor.java:48)\n\tat > > org.apache.solr.update.processor.FieldMutatingUpdateProcessor. > processAdd(FieldMutatingUpdateProcessor.java:117)\n\tat > > org.apache.solr.update.processor.UpdateRequestProcessor.processAdd( > UpdateRequestProcessor.java:48)\n\tat > > org.apache.solr.update.processor.FieldMutatingUpdateProcessor. > processAdd(FieldMutatingUpdateProcessor.java:117)\n\tat > > org.apache.solr.update.processor.UpdateRequestProcessor.processAdd( > UpdateRequestProcessor.java:48)\n\tat > > org.apache.solr.update.processor.FieldNameMutatingUpdateProcess > orFactory$1.processAdd(FieldNameMutatingUpdateProcess > orFactory.java:74)\n\tat > > org.apache.solr.update.processor.UpdateRequestProcessor.processAdd( > UpdateRequestProcessor.java:48)\n\tat > > org.apache.solr.update.processor.FieldMutatingUpdateProcessor. > processAdd(FieldMutatingUpdateProcessor.java:117)\n\tat > > org.apache.solr.update.processor.UpdateRequestProcessor.processAdd( > UpdateRequestProcessor.java:48)\n\tat > > org.apache.solr.update.processor.DistributedUpdateProcessor.doLocalAdd( > DistributedUpdateProcessor.java:939)\n\tat > > org.apache.solr.update.processor.DistributedUpdateProcessor.versionAdd( > DistributedUpdateProcessor.java:1094)\n\tat > > org.apache.solr.update.processor.DistributedUpdateProcessor.processAdd( > DistributedUpdateProcessor.java:720)\n\tat > > org.apache.solr.update.processor.LogUpdateProcessorFactory$ > LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:103)\n\tat > > org.apache.solr.update.processor.UpdateRequestProcessor.processAdd( > UpdateRequestProcessor.java:48)\n\tat > > org.apache.solr.update.processor.AbstractDefaultValueUpdateProc > essorFactory$DefaultValueUpdateProcessor.processAdd( > AbstractDefaultValueUpdateProcessorFactory.java:91)\n\tat > > org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader$1. > handle(JsonLoader.java:233)\n\tat > > org.apache.solr.common.util.JsonRecordReader$Node.handleObjectStart( > JsonRecordReader.java:397)\n\tat > > org.apache.solr.common.util.JsonRecordReader$Node.parse( > JsonRecordReader.java:309)\n\tat > > org.apache.solr.common.util.JsonRecordReader$Node.access$ > 200(JsonRecordReader.java:156)\n\tat > > org.apache.solr.common.util.JsonRecordReader.streamRecords( > JsonRecordReader.java:141)\n\tat > > org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader. > handleSplitMode(JsonLoader.java:213)\n\tat > > org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader. > processUpdate(JsonLoader.java:130)\n\tat > > org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.load( > JsonLoader.java:115)\n\tat > > org.apache.solr.handler.loader.JsonLoader.load(JsonLoader.java:78)\n\tat > > org.apache.solr.handler.UpdateRequestHandler$1.load( > UpdateRequestHandler.java:97)\n\tat > > org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody( > ContentStreamHandlerBase.java:68)\n\tat > > org.apache.solr.handler.RequestHandlerBase.handleRequest( > RequestHandlerBase.java:154)\n\tat > > org.apache.solr.core.SolrCore.execute(SolrCore.java:2089)\n\tat > > org.apache.solr.servlet.HttpSolrCall.execute( > HttpSolrCall.java:652)\n\tat > > org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:459)\n\tat > > org.apache.solr.servlet.SolrDispatchFilter.doFilter( > SolrDispatchFilter.java:257)\n\tat > > org.apache.solr.servlet.SolrDispatchFilter.doFilter( > SolrDispatchFilter.java:208)\n\tat > > org.eclipse.jetty.servlet.ServletHandler$CachedChain. > doFilter(ServletHandler.java:1668)\n\tat > > org.eclipse.jetty.servlet.ServletHandler.doHandle( > ServletHandler.java:581)\n\tat > > org.eclipse.jetty.server.handler.ScopedHandler.handle( > ScopedHandler.java:143)\n\tat > > org.eclipse.jetty.security.SecurityHandler.handle( > SecurityHandler.java:548)\n\tat > > org.eclipse.jetty.server.session.SessionHandler. > doHandle(SessionHandler.java:226)\n\tat > > org.eclipse.jetty.server.handler.ContextHandler. > doHandle(ContextHandler.java:1160)\n\tat > > org.eclipse.jetty.servlet.ServletHandler.doScope( > ServletHandler.java:511)\n\tat > > org.eclipse.jetty.server.session.SessionHandler. > doScope(SessionHandler.java:185)\n\tat > > org.eclipse.jetty.server.handler.ContextHandler. > doScope(ContextHandler.java:1092)\n\tat > > org.eclipse.jetty.server.handler.ScopedHandler.handle( > ScopedHandler.java:141)\n\tat > > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle( > ContextHandlerCollection.java:213)\n\tat > > org.eclipse.jetty.server.handler.HandlerCollection. > handle(HandlerCollection.java:119)\n\tat > > org.eclipse.jetty.server.handler.HandlerWrapper.handle( > HandlerWrapper.java:134)\n\tat > > org.eclipse.jetty.server.Server.handle(Server.java:518)\n\tat > > org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308)\n\tat > > org.eclipse.jetty.server.HttpConnection.onFillable( > HttpConnection.java:244)\n\tat > > org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded( > AbstractConnection.java:273)\n\tat > > org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)\n\tat > > org.eclipse.jetty.io.SelectChannelEndPoint$2.run( > SelectChannelEndPoint.java:93)\n\tat > > org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume. > produceAndRun(ExecuteProduceConsume.java:246)\n\tat > > org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run( > ExecuteProduceConsume.java:156)\n\tat > > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob( > QueuedThreadPool.java:654)\n\tat > > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run( > QueuedThreadPool.java:572)\n\tat > > java.lang.Thread.run(Unknown Source)\nCaused by: > > java.lang.NoSuchMethodException: Can't unambiguously select between > fixed > > arity signatures [(java.lang.String, java.lang.String), > (java.lang.String, > > java.io.Reader)] of the method > > org.apache.solr.analysis.TokenizerChain.tokenStream for argument types > > [java.lang.String, null]\n\tat > > jdk.internal.dynalink.beans.OverloadedMethod.throwAmbiguousMethod( > OverloadedMethod.java:225)\n\tat > > jdk.nashorn.internal.scripts.Script$Recompilation$262$231A$ > \\^eval\\_.processAdd(<eval>:81)\n\tat > > jdk.nashorn.internal.runtime.ScriptFunctionData.invoke( > ScriptFunctionData.java:642)\n\tat > > jdk.nashorn.internal.runtime.ScriptFunction.invoke( > ScriptFunction.java:228)\n\tat > > jdk.nashorn.internal.runtime.ScriptRuntime.apply( > ScriptRuntime.java:393)\n\tat > > jdk.nashorn.api.scripting.ScriptObjectMirror.callMember( > ScriptObjectMirror.java:199)\n\tat > > jdk.nashorn.api.scripting.NashornScriptEngine.invokeImpl( > NashornScriptEngine.java:383)\n\tat > > jdk.nashorn.api.scripting.NashornScriptEngine.invokeFunction( > NashornScriptEngine.java:190)\n\tat > > org.apache.solr.update.processor.StatelessScriptUpdateProcessor > Factory$ScriptUpdateProcessor.invokeFunction( > StatelessScriptUpdateProcessorFactory.java:424)\n\t... > > 65 more\n", > > "code": 500 > > } > > } > > > > > > My Schema looks like the following > > > > <field name="_version_" type="long" indexed="true" stored="true"/> <field > > name="dataset_id" type="string" indexed="true" stored="true" > required="true" > > multiValued="false" /> <field name="search_string" type="string" indexed= > > "true" stored="false" /> > > > > dataset_id is marked as unique as well.. > > > > Any hints will be helpful. > > > > > > -- > > Sincerely, > > Darshan > -- Sincerely, Darshan