tjake/Solandra — Issue #141: java.lang.AssertionError when trying to add document
Author: blinder
Created: 2011-10-19 21:31:32+00:00
State: open

we are seeing this error when trying to add a record to solandra:

```Error 500 null
java.lang.AssertionError
at org.apache.cassandra.locator.TokenMetadata.getToken(TokenMetadata.java:206)
at lucandra.cluster.CassandraIndexManager.getToken(CassandraIndexManager.java:505)
at lucandra.cluster.CassandraIndexManager.getNextId(CassandraIndexManager.java:513)
at solandra.SolandraIndexWriter.addDoc(SolandraIndexWriter.java:244)
at org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:61)
at org.apache.solr.handler.XMLLoader.processUpdate(XMLLoader.java:147)
at org.apache.solr.handler.XMLLoader.load(XMLLoader.java:77)
at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:67)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1368)
at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:356)
at solandra.SolandraDispatchFilter.execute(SolandraDispatchFilter.java:171)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:252)
at solandra.SolandraDispatchFilter.doFilter(SolandraDispatchFilter.java:137)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:930)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
```

(we are using the 0.7 branch of solandra)

I have a simple sample document i am trying to add:
document.xml:

```

5b53408c-c926-4afd-aec1-6acc8db13ed5
42.362595,-71.063416
1
1642.0

```

i'm just using a simple shell script to do the POST:

```#!/bin/sh
XML=/document.xml
POST_URL="http://$HOST_NAME:8983/solandra/search/update?wt=javabin&version=2"
curl $POST_URL --data-binary @$XML -H 'Content-type:text/xml; charset=utf-8'
```

Not sure what actually is happening.