TransactionLog doesn't know how to serialize class java.util.UUID; try implementing ObjectResolver?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

TransactionLog doesn't know how to serialize class java.util.UUID; try implementing ObjectResolver?

Mahmoud Almokadem
Hello,

When I try to update a document exists on solr cloud I got this message:

TransactionLog doesn't know how to serialize class java.util.UUID; try
implementing ObjectResolver?

With the stack trace:


{"data":{"responseHeader":{"status":500,"QTime":3},"error":{"metadata":["error-class","org.apache.solr.common.SolrException","root-error-class","org.apache.solr.common.SolrException"],"msg":"TransactionLog
doesn't know how to serialize class java.util.UUID; try implementing
ObjectResolver?","trace":"org.apache.solr.common.SolrException:
TransactionLog doesn't know how to serialize class java.util.UUID; try
implementing ObjectResolver?\n\tat
org.apache.solr.update.TransactionLog$1.resolve(TransactionLog.java:100)\n\tat
org.apache.solr.common.util.JavaBinCodec.writeVal(JavaBinCodec.java:234)\n\tat
org.apache.solr.common.util.JavaBinCodec.writeSolrInputDocument(JavaBinCodec.java:589)\n\tat
org.apache.solr.update.TransactionLog.write(TransactionLog.java:395)\n\tat
org.apache.solr.update.UpdateLog.add(UpdateLog.java:524)\n\tat
org.apache.solr.update.UpdateLog.add(UpdateLog.java:508)\n\tat
org.apache.solr.update.DirectUpdateHandler2.doNormalUpdate(DirectUpdateHandler2.java:320)\n\tat
org.apache.solr.update.DirectUpdateHandler2.addDoc0(DirectUpdateHandler2.java:239)\n\tat
org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:194)\n\tat
org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:67)\n\tat
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)\n\tat
org.apache.solr.update.processor.DistributedUpdateProcessor.doLocalAdd(DistributedUpdateProcessor.java:980)\n\tat
org.apache.solr.update.processor.DistributedUpdateProcessor.versionAdd(DistributedUpdateProcessor.java:1193)\n\tat
org.apache.solr.update.processor.DistributedUpdateProcessor.processAdd(DistributedUpdateProcessor.java:749)\n\tat
org.apache.solr.update.processor.LogUpdateProcessorFactory$LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:103)\n\tat
org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.handleAdds(JsonLoader.java:502)\n\tat
org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.processUpdate(JsonLoader.java:141)\n\tat
org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.load(JsonLoader.java:117)\n\tat
org.apache.solr.handler.loader.JsonLoader.load(JsonLoader.java:80)\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:173)\n\tat
org.apache.solr.core.SolrCore.execute(SolrCore.java:2440)\n\tat
org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:723)\n\tat
org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:529)\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:347)\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:298)\n\tat
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1691)\n\tat
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)\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:1180)\n\tat
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)\n\tat
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\n\tat
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)\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.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)\n\tat
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)\n\tat
org.eclipse.jetty.server.Server.handle(Server.java:534)\n\tat
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)\n\tat
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)\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.executeProduceConsume(ExecuteProduceConsume.java:303)\n\tat
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)\n\tat
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)\n\tat
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)\n\tat
org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)\n\tat
java.lang.Thread.run(Thread.java:745)\n","code":500}},"status":500,"config":{"method":"POST","transformRequest":[null],"transformResponse":[null],"headers":{"Content-type":"application/json","Accept":"application/json,
text/plain,
*/*"},"data":"[{\"id\":\"1230-11-00000000-0000-0000-7b75-6dee3ec80000\",\"temp_column\":{\"set\":\"\"},\"document_title\":\"0\"}]","url":"/solr/currentawareness/update","params":{"wt":"json","_":1493311132392,"commitWithin":1000,"boost":"1.0","overwrite":true},"timeout":10000},"statusText":"Server
Error"}
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TransactionLog doesn't know how to serialize class java.util.UUID; try implementing ObjectResolver?

deviantcode
Hi Mahmoud, did you ever get to the bottom of this? I'm having the same issue on solr 5.5.2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TransactionLog doesn't know how to serialize class java.util.UUID; try implementing ObjectResolver?

Amrit Sarkar
I looked into the code TransactionLog.java (branch_5_5) ::

JavaBinCodec.ObjectResolver resolver = new JavaBinCodec.ObjectResolver() {
  @Override
  public Object resolve(Object o, JavaBinCodec codec) throws IOException {
    if (o instanceof BytesRef) {
      BytesRef br = (BytesRef)o;
      codec.writeByteArray(br.bytes, br.offset, br.length);
      return null;
    }
    // Fallback: we have no idea how to serialize this.  Be noisy to
prevent insidious bugs
    throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,
        "TransactionLog doesn't know how to serialize " + o.getClass()
+ "; try implementing ObjectResolver?");
  }
};

While UUID implements serializable, so should be BytesRef instance to?? ::

public final class UUID implements java.io.Serializable, Comparable<UUID>

Can you share the payload with you are trying to update?



Amrit Sarkar
Search Engineer
Lucidworks, Inc.
415-589-9269
www.lucidworks.com
Twitter http://twitter.com/lucidworks
LinkedIn: https://www.linkedin.com/in/sarkaramrit2

On Mon, Jul 17, 2017 at 7:03 PM, deviantcode <[hidden email]> wrote:

> Hi Mahmoud, did you ever get to the bottom of this? I'm having the same
> issue
> on solr 5.5.2
>
>
>
> --
> View this message in context: http://lucene.472066.n3.
> nabble.com/TransactionLog-doesn-t-know-how-to-serialize-
> class-java-util-UUID-try-implementing-ObjectResolver-
> tp4332277p4346335.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
Loading...