Solrj DeleteByQuery is not working - java

I have spent more than 3 hours of time to fix this issue, but unfortunately i am not able to fix it. Can anyone help me on this ?
Here is the exception i am getting while running deletebyQuery using solrj while adding to solr is working. Note : deletebyQuery is not working but add is working.
org.apache.solr.client.solrj.SolrServerException: IOException occured when talking to server at: http://localhost:8090/solr/abc
at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:589)
at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:241)
at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:230)
at org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient.request(ConcurrentUpdateSolrClient.java:351)
at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:150)
at org.apache.solr.client.solrj.SolrClient.deleteByQuery(SolrClient.java:896)
at org.apache.solr.client.solrj.SolrClient.deleteByQuery(SolrClient.java:914)
at net.merger.prune.Merger.run(Merger.java:19)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.http.client.ClientProtocolException
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:886)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:480)
... 14 more
Caused by: org.apache.http.client.NonRepeatableRequestException: Cannot retry request with a non-repeatable request entity.
at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:663)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:487)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:882)
... 18 more
and here is my SolrServerHolder code.
public class SolrServerHolder {
private static SolrClient concurrentSolrServer = null;
private static HttpSolrClient solrServer = null;
#SuppressWarnings("deprecation")
private static HttpSolrServer httpServer = null;
private static DefaultHttpClient client = null;
private static synchronized void initHttpClient() {
try {
PoolingClientConnectionManager connManager = new PoolingClientConnectionManager();
connManager.setDefaultMaxPerRoute(20); // Allow upto 20 connections for solr server
connManager.setMaxTotal(1000);
client = new DefaultHttpClient(connManager);
} catch (Error e) {
e.getMessage();
}
}
private static synchronized void initConcurrentSolrServer() throws Exception {
if(client == null)
initHttpClient();
UsernamePasswordCredentials defaultcreds = new UsernamePasswordCredentials("XXXX", "YYYY");
client.getCredentialsProvider().setCredentials(
new AuthScope("localhost",
"8090", AuthScope.ANY_REALM),defaultcreds);
concurrentSolrServer = new ConcurrentUpdateSolrClient("http://localhost:8090/solr/abc", client, 5000, 2);
}
public static SolrClient getConcurrentSolrServer() throws Exception {
if(concurrentSolrServer == null)
initConcurrentSolrServer();
return concurrentSolrServer;
}
}
and Here is my code which will trying to delete the data by query and throwing exception :
SolrClient server =SolrServerHolder.getConcurrentSolrServer();
server.deleteByQuery("id:65657575", 12000);
server.commit();
if i am trying to add docs to solr it is working perfectly Fine
SolrInputDocument docs = getDocs();
SolrClient server =SolrServerHolder.getConcurrentSolrServer();
server.add(abc);
server.commit();
I have refereed similar issues and solutions but it didn't help me.
Solrj Authentication Fails On Write Operation

Related

java.lang.NoClassDefFoundError: com/google/common/cache/RemovalListener

I want to work telegram API, I create Bot in telegram and set username and get a token but I can not connect with my java code please help me
I use this code
ApiContextInitializer.init();
TelegramBotsApi telegramBotsApi = new TelegramBotsApi();
try {
telegramBotsApi.registerBot(new TradeBot());
} catch (TelegramApiException e) {
e.printStackTrace();
}
and my proxy is set and test connection is right
public class TradeBot extends TelegramLongPollingBot {
public void onUpdateReceived(Update update) {
}
public String getBotUsername() {
return "xxx";
}
public String getBotToken() {
return "xxx";
}
}
and after run code give this error :
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/cache/RemovalListener
at com.google.inject.internal.InheritingState.<init>(InheritingState.java:63)
at com.google.inject.internal.InjectorShell$Builder.getState(InjectorShell.java:208)
at com.google.inject.internal.InjectorShell$Builder.lock(InjectorShell.java:114)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:102)
at com.google.inject.Guice.createInjector(Guice.java:87)
at com.google.inject.Guice.createInjector(Guice.java:69)
at com.google.inject.Guice.createInjector(Guice.java:59)
at org.telegram.telegrambots.meta.ApiContext.getInjector(ApiContext.java:48)
at org.telegram.telegrambots.meta.ApiContext.getInstance(ApiContext.java:27)
at org.telegram.telegrambots.bots.TelegramLongPollingBot.<init>(TelegramLongPollingBot.java:16)
at TradeBot.<init>(TradeBot.java:6)
at MainClass.main(MainClass.java:10)
Caused by: java.lang.ClassNotFoundException: com.google.common.cache.RemovalListener
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 12 more
Was answered here:
Google Guice can't find class
You need the correct version of the com.google.guava/guava dependency related to the com.google.inject/guice library that you are already using.

Read operation right after Elasticsearch index creation causes exception

I try to perform a read opertion on Elasticsearch index right after it was created. Here is simple code to reproduce this situation:
import org.elasticsearch.action.admin.indices.exists.indices.IndicesExistsResponse;
import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
import static java.net.InetAddress.getLoopbackAddress;
public class ElasticIssue {
static String index = "my_index";
public static void main(String[] args) {
final Client c = getClient();
deleteIndexIfExists(c);
createIndex(c);
//refresh(c);
//flush(c);
//delay();
//indexDoc(c);
getDoc(c);
}
static void getDoc(Client client) {
client.prepareGet(index, "some-type", "1").get();
}
static void indexDoc(Client client) {
client.prepareIndex(index, "another-type", "25").setSource("{}").get();
}
static void createIndex(Client client) {
client.admin().indices().prepareCreate(index).get();
}
static void delay() {
try {Thread.sleep(3000);} catch (InterruptedException e) {}
}
static void flush(Client client) {
client.admin().indices().prepareFlush(index).get();
}
private static void refresh(Client client) {
client.admin().indices().prepareRefresh(index).get();
}
static void deleteIndexIfExists(Client client) {
final IndicesExistsResponse response = client.admin().indices().prepareExists(index).get();
if (response.isExists()) {
deleteIndex(client);
}
}
static void deleteIndex(Client client) {
client.admin().indices().prepareDelete(index).get();
}
static Client getClient() {
final Settings settings = Settings.builder()
.put("cluster.name", "elasticsearch") //default name
.put("node.name", "my-node")
.build();
return TransportClient.builder()
.settings(settings)
.build()
.addTransportAddress(new InetSocketTransportAddress(getLoopbackAddress(), 9300));
}
}
And then I get the following error:
Exception in thread "main" NoShardAvailableActionException[No shard available for [get [my_index][some-type][1]: routing [null]]]; nested: RemoteTransportException[[my-node][172.17.0.2:9300][indices:data/read/get[s]]]; nested: IllegalIndexShardStateException[CurrentState[RECOVERING] operations only allowed when shard state is one of [POST_RECOVERY, STARTED, RELOCATED]];
at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.perform(TransportSingleShardAction.java:199)
at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.onFailure(TransportSingleShardAction.java:186)
at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.access$1300(TransportSingleShardAction.java:115)
at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction$2.handleException(TransportSingleShardAction.java:240)
at org.elasticsearch.transport.TransportService$DirectResponseChannel.processException(TransportService.java:855)
at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:833)
at org.elasticsearch.transport.TransportService$4.onFailure(TransportService.java:387)
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:39)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: RemoteTransportException[[my-node][172.17.0.2:9300][indices:data/read/get[s]]]; nested: IllegalIndexShardStateException[CurrentState[RECOVERING] operations only allowed when shard state is one of [POST_RECOVERY, STARTED, RELOCATED]];
Caused by: [my_index][[my_index][3]] IllegalIndexShardStateException[CurrentState[RECOVERING] operations only allowed when shard state is one of [POST_RECOVERY, STARTED, RELOCATED]]
at org.elasticsearch.index.shard.IndexShard.readAllowed(IndexShard.java:1035)
at org.elasticsearch.index.shard.IndexShard.get(IndexShard.java:651)
at org.elasticsearch.index.get.ShardGetService.innerGet(ShardGetService.java:173)
at org.elasticsearch.index.get.ShardGetService.get(ShardGetService.java:86)
at org.elasticsearch.action.get.TransportGetAction.shardOperation(TransportGetAction.java:101)
at org.elasticsearch.action.get.TransportGetAction.shardOperation(TransportGetAction.java:44)
at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$ShardTransportHandler.messageReceived(TransportSingleShardAction.java:282)
at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$ShardTransportHandler.messageReceived(TransportSingleShardAction.java:275)
at org.elasticsearch.transport.TransportRequestHandler.messageReceived(TransportRequestHandler.java:33)
at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:75)
at org.elasticsearch.transport.TransportService$4.doRun(TransportService.java:376)
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
It seems like Elasticsearch index creation was not complete despite response was already returned. That is a bit frustrating. And if I do any of: delay, index any doc, refresh index, flush index (uncomment any line for this); then read operation performs successfully.
What is the explanation of this behavior? What is a recommended way to make sure that index is ready to work? Listed solutions are found by experiment.
I'am using Elasticsearch 2.3.3 and Java 8. All communication with Elasticsearch is done using Transport protocol (with Java api).
For easier setup here is docker command to get container with all necessary settings:
docker run -p 9200:9200 -p 9300:9300 elasticsearch:2.3.3 -Des.node.name="my-node"
Here is Maven dependency for Elasticsearch Java API:
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>2.3.3</version>
</dependency>
You need to wait till the index is created. This is what you can do to wait till the health of index is in yellow status.
After index creation function call the below function :
static void indexStatusCheck(Client client) {
ClusterHealthResponse response = client.admin().cluster().prepareHealth().setIndices(index).setWaitForYellowStatus().get();
if (response.getStatus() == ClusterHealthStatus.RED) {
throw Exception("Index not ready");
}
}
Then you can proceed with the getDoc() call.

Java Elasticsearch client: throws ConnectException when connecting from local to ES in Google Cloud VM

I have an elasticsearch cluster running in google-compute-engine(VMs), and I am trying to connect from my Java program.
ES instante in the google-cloud has an external-ip & internal-ip.
I have configured the external-ip for connecting, and all the firewall settings are enabled to connect.
Still it seems like, the internal-ip is using somewhere by the client while writing myd data to ES.
10.240.0.237 is the internal-ip
Caused by: java.net.ConnectException: Connection timed out: no further information: /10.240.0.237:9300
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:152)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79)
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42)
at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
Code
public class ESClient {
final static Node[] esNodes = new Node[1];
static String indexName = "sa-sonarshock-log";
public static Client getClient(){
if(esNodes[0] == null){
esNodes[0] = _setupNode();
}
return esNodes[0].client();
}
public static Node _setupNode(){
Settings settings = ImmutableSettings.settingsBuilder()
.put("cluster.name", "es-tifc-retro-testing")
.put("http.enabled", false)
.put("transport.tcp.port", "9300-9400")
.put("discovery.zen.ping.multicast.enabled", false)
.put("discovery.zen.ping.unicast.hosts", "estifcretrotest-es-tifc-retro-testing-1-vm")
.build();
return nodeBuilder().settings(settings).client(true).node();
}
public static Map<String, Object> putJsonDocument(String title, String content, Date postDate,
String[] tags, String author){
Map<String, Object> jsonDocument = new HashMap<String, Object>();
jsonDocument.put("title", title);
jsonDocument.put("conten", content);
jsonDocument.put("postDate", postDate);
jsonDocument.put("tags", tags);
jsonDocument.put("author", author);
return jsonDocument;
}
public static void main(String[] args) {
Client esClient = getClient();
CreateIndexRequestBuilder createIndexRequestBuilder = esClient.admin().indices().prepareCreate(indexName);
createIndexRequestBuilder.execute().actionGet();
esClient.prepareIndex(indexName, "default", "1")
.setSource(putJsonDocument("ElasticSearch: Java API",
"ElasticSearch provides the Java API, all operations "
+ "can be executed asynchronously using a client object.",
new Date(),
new String[]{"elasticsearch"},
"Remis Haroon")).execute().actionGet();
esNodes[0].close();
}
}
It looks like you are connecting on port 9300, but I think you want port 9200.

passing through firewall in htmlunit

I am creating something on htmlunit to read content of webpage. However I am working on netwer where firewall is enabled. I have my Credential that i can use to pass through the firewall(we use this credential to access internet). I am not sure where to configure this.
I tried the below but it didn't work. Any thoughts?
public class Sparsh {
private WebClient webClient;
private final String userName,password,loginUrl="https://www.google.com";
public Sparsh(String userName,String password)
{
this.userName=userName;
this.password=password;
webClient = new WebClient(BrowserVersion.CHROME);
DefaultCredentialsProvider cp = (DefaultCredentialsProvider)webClient.getCredentialsProvider();
cp.addCredentials("user", "password");
//cp.addProxyCredentials("myuser", "mypasswd");
webClient.getOptions().setUseInsecureSSL(true);
webClient.getOptions().setJavaScriptEnabled(true);
}
public boolean loginCheck() throws IOException
{
final HtmlPage page = webClient.getPage(loginUrl);
System.out.println(page.asText());
if (page.asText().contains("Service Catalog"))
{
return true;
}
return false;
} public static void main(String[] Arg) throws IOException
{
Sparsh snow=new Sparsh("xxxxxx","xxxxxx");
snow.loginCheck();
snow.close();
}
}
I am getting below error
Exception in thread "main" java.net.UnknownHostException: www.google.com
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:876) at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:876)
at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1229)
at java.net.InetAddress.getAllByName0(InetAddress.java:1180)
at java.net.InetAddress.getAllByName(InetAddress.java:1110)
at java.net.InetAddress.getAllByName(InetAddress.java:1046)
at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:44)
at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:102)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:314)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:85)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:179)
at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1297)
at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1214)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:325)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:379)
at Authentication.Sparsh.loginCheck(Sparsh.java:59)
at Authentication.Sparsh.main(Sparsh.java:113)
Java Result: 1
Are you able to access google.com from your browser on this machine? If yes, then try setting proxy.
webClient.getOptions.setProxyConfig(new ProxyConfig(proxy_host, proxy_port));
Proxy user/password should be same as the credentials you use for machine (AD credentials for example).
Make sure to add domain-name to your user name.

Dynamics CRM 2011 Online WebServices from Java

I'm trying to access MicroSoft Dynamic CRM 2011 online webservices from Java but no luck so far.
I got Organization WSDL file and generated required java stub files with the help of Axis2 (wsdl2Java).
And my simple client code is
public class TestCRM2 {
public static void main(String[] args) {
try {
// create query
QueryExpression query = new QueryExpression();
query.setEntityName("Contact");
ArrayOfstring colAra = new ArrayOfstring();
colAra.addString("fullname");
ColumnSet columnSet = new ColumnSet();
columnSet.setAllColumns(false);
columnSet.setColumns(colAra);
PagingInfo pageinfo = new PagingInfo();
pageinfo.setCount(10);
pageinfo.setPageNumber(1);
query.setColumnSet(columnSet);
query.setPageInfo(pageinfo);
ConditionExpression condition = new ConditionExpression();
condition.setAttributeName("fullname");
condition.setOperator(ConditionOperator.Equal);
ArrayOfanyType values = new ArrayOfanyType();
values.setAnyType(new String[] {"something"});
condition.setValues(values);
RetrieveMultiple retrieveMultiple = new RetrieveMultiple();
retrieveMultiple.setQuery(query);
OrganizationServiceStub stub = new OrganizationServiceStub();
//set Timeout
ServiceClient serviceClient = stub._getServiceClient();
serviceClient.getOptions().setTimeOutInMilliSeconds( 3 * 60 * 1000);
/*serviceClient.getOptions().setProperty(HTTPConstants.HTTP_PROTOCOL_VERSION, HTTPConstants.HEADER_PROTOCOL_10);
serviceClient.getOptions().setProperty(HTTPConstants.HEADER_TRANSFER_ENCODING_CHUNKED,false);*/
RetrieveMultipleResponse response = stub.retrieveMultiple(retrieveMultiple);
EntityCollection collection = response.getRetrieveMultipleResult();
int count = collection.getTotalRecordCount();
System.out.println(count);
} catch (Exception e) {
e.printStackTrace();
}
}}
When i run this from Eclipse, i get the following runtime error
org.apache.axis2.AxisFault: Connection reset
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:197)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:404)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:231)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at com.microsoft.schemas.xrm._2011.contracts.OrganizationServiceStub.retrieveMultiple(OrganizationServiceStub.java:1177) at test.TestCRM.main(TestCRM.java:105)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293)
at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:331)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:798)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:755)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413)
at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973)
at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:621)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193)
... 9 more
Is there any thing I'm missing in my client code. Your help is highly appreciated.
Regards,
You have to append "/web" at the end of your endpoint url in service client.
You will have to provide NTLM2 authenticator implementation and register it with httpclient used by your stub.

Categories

Resources