Export to GitHub

contactlistimporter - issue #3

java.lang.IllegalStateException


Posted on May 28, 2008 by Massive Rabbit

What steps will reproduce the problem? 1. I used the sample code in my own project:

ContactListImporter importer=ContactListImporterFactory.guess(username, password); List<Contact> contacts=importer.getContactList(); for(Contact c : contacts) { out.println("name: "+c.getName()+", email: "+c.getEmail());

  1. I input a gmail account.

What is the expected output? What do you see instead?

I got the contactlist of this gmail account,but I also got this exception in the server: 2008-5-28 14:35:01 com.xdatasystem.contactsimporter.ContactListImporterImpl getContactList 信息: Performing login 2008-05-28 14:35:02,609 [http-8080-2] [org.apache.http.client.protocol.ResponseProcessCookies] [WARN] [133] - Cookie rejected: "[version: 0][name: CAL][name: DQAAAHYAAACf8IJAYCByIJiO30jzqwz2e5z9t3GJlaojOhwvF_A8jeXjef7jG26K6ee7- NjdbKJMDxXuLOZ-q4lunCvZ6_whr0EGAYOhsrMBX9MZx- qlFoRfnVlzVK6p7HJm19YSGGI8jxLJBBhXnetMtCHnm7QXjk91j8ySap7eGsu_Kh_t9A] [domain: www.google.com][path: /calendar][expiry: null]". Illegal path attribute "/calendar". Path of origin: "/accounts/ServiceLoginAuth" 2008-5-28 14:35:06 com.xdatasystem.contactsimporter.ContactListImporterImpl getContactList 信息: Login succeeded 2008-5-28 14:35:06 com.xdatasystem.contactsimporter.ContactListImporterImpl getContactList 信息: Retrieving contactlist 2008-5-28 14:35:06 com.xdatasystem.contactsimporter.ContactListImporterImpl getContactList 信息: Parsing contactlist 2008-05-28 14:35:06,953 [http-8080-2] [org.apache.http.impl.conn.SingleClientConnManager] [WARN] [347] - Invalid use of SingleClientConnManager: connection still allocated. Make sure to release the connection before allocating another one. java.lang.IllegalStateException: Revoking connection to HttpRoute[{s}- >https://mail.google.com] at org.apache.http.impl.conn.SingleClientConnManager.revokeConnection (SingleClientConnManager.java:345) at org.apache.http.impl.conn.SingleClientConnManager.getConnection (SingleClientConnManager.java:220) at org.apache.http.impl.conn.SingleClientConnManager.getConnection (SingleClientConnManager.java:195) at org.apache.http.impl.client.DefaultClientRequestDirector.allocateConnection (DefaultClientRequestDirector.java:508) at org.apache.http.impl.client.DefaultClientRequestDirector.execute (DefaultClientRequestDirector.java:293) at org.apache.http.impl.client.AbstractHttpClient.execute (AbstractHttpClient.java:500) at org.apache.http.impl.client.AbstractHttpClient.execute (AbstractHttpClient.java:455) at com.xdatasystem.contactsimporter.ContactListImporterImpl.doGet (ContactListImporterImpl.java:150) at com.xdatasystem.contactsimporter.ContactListImporterImpl.getContactList (ContactListImporterImpl.java:84) at org.apache.jsp.widget.contactImport_jsp._jspService (contactImport_jsp.java:109) at org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:393) at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:320) at org.apache.jasper.servlet.JspServlet.service (JspServlet.java:266) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:261) at org.apache.coyote.http11.Http11AprProcessor.process (Http11AprProcessor.java:852) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process (Http11AprProtocol.java:584) at org.apache.tomcat.util.net.AprEndpoint$Worker.run (AprEndpoint.java:1508) at java.lang.Thread.run(Thread.java:619)

Comment #1

Posted on May 28, 2008 by Happy Panda

The exception is harmless, it is outputted because the logging of HttpClient is turned on. You should be able to disable it, but you must do a complete build from source.

Status: WontFix

Labels:
Type-Defect Priority-Medium