Thanks for that idea. The problem was that my Solr server was on 4.0.0, but
the latest version for SolrJ on Maven is 4.0.0-Beta. I downgraded my server
to 4.0.0-beta and it worked.

-Kevin

On Wed, Oct 24, 2012 at 6:03 AM, Mark Miller <markrmil...@gmail.com> wrote:

> Did up upgrade your Solr instance from the beta or alpha to 4 at some
> point?
>
> - Mark
>
> On Wed, Oct 24, 2012 at 1:14 AM, Kevin Osborn <kevin.osb...@cbsi.com>
> wrote:
> > It looks like this is where the problem lies. Here is the JSON that SolrJ
> > is receiving from Zookeeper:
> >
> > "data":"{\\"manufacturer\\":{\\n    \\"shard1\\":{\\n
> >  \\"range\\":\\"80000000-ffffffff\\",\\n
> >  \\"replicas\\":{\\"myhost:5270_solr_manufacturer\\":{\\n
> >  \\"shard\\":\\"shard1\\",\\n          \\"roles\\":null,\\n
> >  \\"state\\":\\"active\\",\\n          \\"core\\":\\"manufacturer\\",\\n
> >        \\"collection\\":\\"manufacturer\\",\\n
> >  \\"node_name\\":\\"phx2-ccs-apl-dev-wax1.cnet.com:5270_solr\\",\\n
> >  \\"base_url\\":\\"http://myhost:5270/solr\\",\\n
> >  \\"leader\\":\\"true\\"}}},\\n    \\"shard2\\":{\\n
> >  \\"range\\":\\"0-7fffffff\\",\\n
> >  \\"replicas\\":{\\"myhost:5275_solr_manufacturer\\":{\\n
> >  \\"shard\\":\\"shard2\\",\\n          \\"roles\\":null,\\n
> >  \\"state\\":\\"active\\",\\n          \\"core\\":\\"manufacturer\\",\\n
> >        \\"collection\\":\\"manufacturer\\",\\n
> >  \\"node_name\\":\\"myhost:5275_solr\\",\\n          \\"base_url\\":\\"
> > http://myhost:5275/solr\\",\\n
> >  \\"leader\\":\\"true\\"}}}}}"}},{"data":{
> >
> > Where SolrJ is expecting the shard Name, it is actually getting "range"
> as
> > the shard name and "80000000-ffffffff" as the value. Any ideas? Did I
> > configure something wrong?
> >
> >
> > On Tue, Oct 23, 2012 at 5:17 PM, Kevin Osborn <kevin.osb...@cbsi.com>
> wrote:
> >
> >> I am getting a ClassCastException when i call Solr. My code is pretty
> >> simple.
> >>
> >> SolrServer mySolrServer = new CloudSolrServer(zookeeperHost);
> >> ((CloudSolrServer)mySolrServer).setDefaultCollection("manufacturer")
> >> ((CloudSolrServer)mySolrServer).connect()
> >>
> >>
> >> The actual error is thrown on line 300 of ClusterState.java:
> >> new ZkNodeProps(sliceMap.get(shardName))
> >>
> >> It is trying to convert a String to a Map which causes the
> >> ClassCastException.
> >>
> >> My zookeepHost string is simply  "myHost:6200". My SolrCloud has 2
> shards
> >> over a single collection. And two instances are running. I also tried an
> >> external Zookeeper with the same results.
> >>
> >>
> >> --
> >> *KEVIN OSBORN*
> >> LEAD SOFTWARE ENGINEER
> >> CNET Content Solutions
> >> OFFICE 949.399.8714
> >> CELL 949.310.4677      SKYPE osbornk
> >> 5 Park Plaza, Suite 600, Irvine, CA 92614
> >> [image: CNET Content Solutions]
> >>
> >>
> >>
> >
> >
> > --
> > *KEVIN OSBORN*
> > LEAD SOFTWARE ENGINEER
> > CNET Content Solutions
> > OFFICE 949.399.8714
> > CELL 949.310.4677      SKYPE osbornk
> > 5 Park Plaza, Suite 600, Irvine, CA 92614
> > [image: CNET Content Solutions]
>
>
>
> --
> - Mark
>



-- 
*KEVIN OSBORN*
LEAD SOFTWARE ENGINEER
CNET Content Solutions
OFFICE 949.399.8714
CELL 949.310.4677      SKYPE osbornk
5 Park Plaza, Suite 600, Irvine, CA 92614
[image: CNET Content Solutions]

Reply via email to