lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Hastings <DHasti...@wshein.com>
Subject Re: Null Pointer Exception without details on Update in schemaless 7.4
Date Thu, 06 Sep 2018 03:38:45 GMT
Are you trying to push a java hash to solr?

On Sep 5, 2018, at 10:32 PM, deniz <denizdurmus87@gmail.com<mailto:denizdurmus87@gmail.com>>
wrote:

I have set up a schemaless solr (cloud) and have been trying to test the
updates. as DIH is not going through field guessing, I have wrote a small
piece of code to query data from db and push the docs to solr...

Once the client pushes the docs to solr, on server there are npe logs as
below:


o.a.s.h.RequestHandlerBase java.lang.NullPointerException
 at
org.apache.solr.update.processor.AddSchemaFieldsUpdateProcessorFactory$AddSchemaFieldsUpdateProcessor.mapValueClassesToFieldType(AddSchemaFieldsUpdateProcessorFactory.java:509)
 at
org.apache.solr.update.processor.AddSchemaFieldsUpdateProcessorFactory$AddSchemaFieldsUpdateProcessor.processAdd(AddSchemaFieldsUpdateProcessorFactory.java:396)
 at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
 at
org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:118)
 at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
 at
org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:118)
 at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
 at
org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:118)
 at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
 at
org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:118)
 at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
 at
org.apache.solr.update.processor.FieldNameMutatingUpdateProcessorFactory$1.processAdd(FieldNameMutatingUpdateProcessorFactory.java:75)
 at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
 at
org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:118)
 at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
 at
org.apache.solr.update.processor.AbstractDefaultValueUpdateProcessorFactory$DefaultValueUpdateProcessor.processAdd(AbstractDefaultValueUpdateProcessorFactory.java:92)
 at
org.apache.solr.handler.loader.JavabinLoader$1.update(JavabinLoader.java:98)
 at
org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec$1.readOuterMostDocIterator(JavaBinUpdateRequestCodec.java:188)
 at
org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec$1.readIterator(JavaBinUpdateRequestCodec.java:144)
 at
org.apache.solr.common.util.JavaBinCodec.readObject(JavaBinCodec.java:311)
 at org.apache.solr.common.util.JavaBinCodec.readVal(JavaBinCodec.java:256)
 at
org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec$1.readNamedList(JavaBinUpdateRequestCodec.java:130)
 at
org.apache.solr.common.util.JavaBinCodec.readObject(JavaBinCodec.java:276)
 at org.apache.solr.common.util.JavaBinCodec.readVal(JavaBinCodec.java:256)
 at
org.apache.solr.common.util.JavaBinCodec.unmarshal(JavaBinCodec.java:178)
 at
org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec.unmarshal(JavaBinUpdateRequestCodec.java:195)
 at
org.apache.solr.handler.loader.JavabinLoader.parseAndLoadDocs(JavabinLoader.java:109)
 at
org.apache.solr.handler.loader.JavabinLoader.load(JavabinLoader.java:55)
 at
org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:97)
 at
org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:68)
 at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)
 at org.apache.solr.core.SolrCore.execute(SolrCore.java:2539)
 at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:709)
 at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:515)
 at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:377)
 at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:323)
 at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1634)
 at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
 at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
 at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
 at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
 at
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
 at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
 at
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
 at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
 at
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
 at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
 at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
 at
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
 at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
 at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
 at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:219)
 at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
 at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
 at
org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)
 at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
 at org.eclipse.jetty.server.Server.handle(Server.java:531)
 at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352)
 at
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
 at
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281)
 at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
 at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
 at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
 at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
 at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
 at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
 at
org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
 at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:760)
 at
org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:678)
 at java.lang.Thread.run(Thread.java:745)

o.a.s.s.HttpSolrCall null:java.lang.NullPointerException
 at
org.apache.solr.update.processor.AddSchemaFieldsUpdateProcessorFactory$AddSchemaFieldsUpdateProcessor.mapValueClassesToFieldType(AddSchemaFieldsUpdateProcessorFactory.java:509)
 at
org.apache.solr.update.processor.AddSchemaFieldsUpdateProcessorFactory$AddSchemaFieldsUpdateProcessor.processAdd(AddSchemaFieldsUpdateProcessorFactory.java:396)
 at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
 at
org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:118)
 at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
 at
org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:118)
 at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
 at
org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:118)
 at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
 at
org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:118)
 at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
 at
org.apache.solr.update.processor.FieldNameMutatingUpdateProcessorFactory$1.processAdd(FieldNameMutatingUpdateProcessorFactory.java:75)
 at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
 at
org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:118)
 at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
 at
org.apache.solr.update.processor.AbstractDefaultValueUpdateProcessorFactory$DefaultValueUpdateProcessor.processAdd(AbstractDefaultValueUpdateProcessorFactory.java:92)
 at
org.apache.solr.handler.loader.JavabinLoader$1.update(JavabinLoader.java:98)
 at
org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec$1.readOuterMostDocIterator(JavaBinUpdateRequestCodec.java:188)
 at
org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec$1.readIterator(JavaBinUpdateRequestCodec.java:144)
 at
org.apache.solr.common.util.JavaBinCodec.readObject(JavaBinCodec.java:311)
 at org.apache.solr.common.util.JavaBinCodec.readVal(JavaBinCodec.java:256)
 at
org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec$1.readNamedList(JavaBinUpdateRequestCodec.java:130)
 at
org.apache.solr.common.util.JavaBinCodec.readObject(JavaBinCodec.java:276)
 at org.apache.solr.common.util.JavaBinCodec.readVal(JavaBinCodec.java:256)
 at
org.apache.solr.common.util.JavaBinCodec.unmarshal(JavaBinCodec.java:178)
 at
org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec.unmarshal(JavaBinUpdateRequestCodec.java:195)
 at
org.apache.solr.handler.loader.JavabinLoader.parseAndLoadDocs(JavabinLoader.java:109)
 at
org.apache.solr.handler.loader.JavabinLoader.load(JavabinLoader.java:55)
 at
org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:97)
 at
org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:68)
 at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)
 at org.apache.solr.core.SolrCore.execute(SolrCore.java:2539)
 at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:709)
 at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:515)
 at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:377)
 at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:323)
 at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1634)
 at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
 at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
 at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
 at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
 at
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
 at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
 at
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
 at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
 at
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
 at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
 at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
 at
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
 at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
 at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
 at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:219)
 at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
 at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
 at
org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)
 at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
 at org.eclipse.jetty.server.Server.handle(Server.java:531)
 at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352)
 at
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
 at
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281)
 at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
 at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
 at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
 at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
 at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
 at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
 at
org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
 at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:760)
 at
org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:678)
 at java.lang.Thread.run(Thread.java:745)


And on the client side, error logs are

Server Error



request: http://host:port/solr/collection/update?wt=javabin&version=2
 at
org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient$Runner.sendUpdateStream(ConcurrentUpdateSolrClient.java:383)
[solr-solrj-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc -
jpountz - 2018-06-18 16:55:14]
 at
org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient$Runner.run(ConcurrentUpdateSolrClient.java:182)
[solr-solrj-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc -
jpountz - 2018-06-18 16:55:14]
 at
org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:209)
[solr-solrj-7.4.0.jar:7.4.0 9060ac689c270b02143f375de0348b7f626adebc -
jpountz - 2018-06-18 16:55:14]
 at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
~[na:na]
 at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
~[na:na]


The related part which throws the exception in Solr source code:


private TypeMapping mapValueClassesToFieldType(List<SolrInputField> fields)
{
     NEXT_TYPE_MAPPING: for (TypeMapping typeMapping : typeMappings) {
       for (SolrInputField field : fields) {
         *NEXT_FIELD_VALUE: for (Object fieldValue : field.getValues()) *{
           for (Class<?> valueClass : typeMapping.valueClasses) {
             if (valueClass.isInstance(fieldValue)) {
               continue NEXT_FIELD_VALUE;
             }
           }
           // This fieldValue is not an instance of any of the mapped
valueClass-s,
           // so mapping fails - go try the next type mapping.
           continue NEXT_TYPE_MAPPING;
         }
       }
       // Success! Each of this field's values is an instance of a mapped
valueClass
       return typeMapping;
     }
     // At least one of this field's values is not an instance of any of
the mapped valueClass-s
     // Return the typeMapping marked as default, if we have one, else
return null to use fallback type
     List<TypeMapping> defaultMappings =
typeMappings.stream().filter(TypeMapping::isDefault).collect(Collectors.toList());
     if (defaultMappings.size() > 1) {
       throw new SolrException(SERVER_ERROR, "Only one typeMapping can be
default");
     } else if (defaultMappings.size() == 1) {
       return defaultMappings.get(0);
     } else {
       return null;
     }
   }


I couldnt get any more details from the logs to find out what is triggering
this error... any one encountered similar error before?




-----
Zeki ama calismiyor... Calissa yapar...
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message