apache zookeeper - Solr cloud client 5.3.1 Timeout Exception while using with spring hibernate transaction -
i connecting solr index database entries getting spring hibernate transaction. facing below exception.
error while calling watcher java.lang.classcastexception: java.util.hashmap cannot cast java.lang.string @ org.apache.solr.common.util.executorutil$mdcawarethreadpoolexecutor.execute(executorutil.java:173) @ java.util.concurrent.abstractexecutorservice.submit(abstractexecutorservice.java:110) @ org.apache.solr.common.cloud.solrzkclient$3.process(solrzkclient.java:261) @ org.apache.zookeeper.clientcnxn$eventthread.processevent(clientcnxn.java:522) @ org.apache.zookeeper.clientcnxn$eventthread.run(clientcnxn.java:498) org.apache.solr.common.solrexception: java.util.concurrent.timeoutexception: not connect zookeeper x.x.x.x:8000 within 10000 ms @ org.apache.solr.common.cloud.solrzkclient.(solrzkclient.java:181) @ org.apache.solr.common.cloud.solrzkclient.(solrzkclient.java:115) @ org.apache.solr.common.cloud.solrzkclient.(solrzkclient.java:105) @ org.apache.solr.common.cloud.zkstatereader.(zkstatereader.java:207) @ org.apache.solr.client.solrj.impl.cloudsolrclient.connect(cloudsolrclient.java:465) @ org.apache.solr.client.solrj.impl.cloudsolrclient.requestwithretryonstalestate(cloudsolrclient.java:822) @ org.apache.solr.client.solrj.impl.cloudsolrclient.request(cloudsolrclient.java:805) @ org.apache.solr.client.solrj.solrrequest.process(solrrequest.java:135) @ org.apache.solr.client.solrj.solrclient.add(solrclient.java:107) @ org.apache.solr.client.solrj.solrclient.add(solrclient.java:72) @ org.apache.solr.client.solrj.solrclient.add(solrclient.java:86) cloudsolrclient cloudsolrclient = null; transactionstatus transactionstatus = null; list leveldefinitions = new linkedlist(); try { defaulttransactiondefinition transactiondefinition = new defaulttransactiondefinition(); transactionstatus = gettransactionmanager().gettransaction(transactiondefinition); //database query cloudsolrclient = new cloudsolrclient("x.x.x.x:8000"); cloudsolrclient.setdefaultcollection("cmd_oustr_new_dev"); solrinputdocument solrinputdocument = new solrinputdocument(); //field setting of solrinputdocument linkedlist solrinputdocuments = new linkedlist(); solrinputdocuments.add(solrinputdocument); cloudsolrclient.add(solrinputdocuments); cloudsolrclient.commit(); gettransactionmanager().commit(transactionstatus);
note: same solr code working if spring hibernate transaction not getting opened in thread.
issue resolved
the issue due incompatible log4j implementation mdc inside activemq jar version 5.8 , using mdc transaction logging. putting map transaction info excecutorutil(line 172) of solrj jar casting string getting submitter context.
replaced jar 5.10 version. working
Comments
Post a Comment