HTTP entity may not be null

1,702 views
Skip to first unread message

Steven Romero

unread,
Feb 4, 2013, 2:20:52 PM2/4/13
to light...@googlegroups.com
Hi, I am getting the following error below, I am not sure what may be causing it, I have configured the couchdb properties file correctly, please let me know what may be causing this error.

Feb 04, 2013 2:04:59 PM org.lightcouch.CouchDbClientBase$2 process
INFO: >> HEAD /med_cloud HTTP/1.1
Exception in thread "main" java.lang.IllegalArgumentException: HTTP entity may not be null
    at org.apache.http.util.EntityUtils.toString(EntityUtils.java:198)
    at org.apache.http.util.EntityUtils.toString(EntityUtils.java:264)
    at org.lightcouch.CouchDbClientBase.validate(CouchDbClientBase.java:374)
    at org.lightcouch.CouchDbClientBase.access$0(CouchDbClientBase.java:358)
    at org.lightcouch.CouchDbClientBase$3.process(CouchDbClientBase.java:342)
    at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:117)
    at org.apache.http.protocol.HttpRequestExecutor.postProcess(HttpRequestExecutor.java:345)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:525)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
    at org.lightcouch.CouchDbClientBase.executeRequest(CouchDbClientBase.java:260)
    at org.lightcouch.CouchDbClientBase.head(CouchDbClientBase.java:179)
    at org.lightcouch.CouchDbContext.createDB(CouchDbContext.java:79)
    at org.lightcouch.CouchDbContext.<init>(CouchDbContext.java:51)
    at org.lightcouch.CouchDbClient.<init>(CouchDbClient.java:131)
    at com.med.cloud.dao.PatientDAO.<init>(PatientDAO.java:11)
    at com.med.cloud.test.TestCouchDB.main(TestCouchDB.java:25)

Ahmed Yehia

unread,
Feb 4, 2013, 6:41:37 PM2/4/13
to light...@googlegroups.com
Hi,
It's not very clear what is causing the issue, could you mention which version are you using ? also verify the correct dependencies in place.



--
You received this message because you are subscribed to the Google Groups "LightCouch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lightcouch+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Steven Romero

unread,
Feb 5, 2013, 8:48:32 AM2/5/13
to light...@googlegroups.com
I am using the latest version of lightcouch, with gson 2.2, httpclient 4.2.2. When I instantiat the couchdbclient object the error in the stack trace appears. It looks like their is nothing in the http entity object. Should it be that way? Does LightCouch add junk data or something when connecting to couchdb?

Ahmed Yehia

unread,
Feb 6, 2013, 12:30:45 AM2/6/13
to light...@googlegroups.com
Looking into that again, it seems to fail due to an error returned from CouchDB on the head request, can you see what is happening on the DB logs ?
also try with setting createDbIfNotExist to false.

saman amp

unread,
Aug 20, 2013, 7:50:00 AM8/20/13
to light...@googlegroups.com
I had the same problem, I set createDbIfNotExist to false; then it gave out "Authentication Error".
I put a username and password on couchdb and it worked fine.
Then I changed the createDbIfNotExist to true and it works.
Reply all
Reply to author
Forward
0 new messages