Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7826453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T09:25:25+00:00 2026-06-02T09:25:25+00:00

I do requests to my servlet try { Log.d(Constants.DEBUG_TAG_MAPS, try); HttpEntity entity = new

  • 0

I do requests to my servlet


try {
                Log.d(Constants.DEBUG_TAG_MAPS, "try");

                HttpEntity entity = new StringEntity(json);
                post.setEntity(entity);

                HttpParams httpParameters = new BasicHttpParams();
                HttpConnectionParams.setConnectionTimeout(httpParameters, 15000);
                HttpConnectionParams.setSoTimeout(httpParameters, 150000);

                httpclient  = new DefaultHttpClient(httpParameters);
                BasicHttpResponse  response = (BasicHttpResponse ) httpclient.execute(post);
                Log.d(Constants.DEBUG_TAG_MAPS, "http status code : "+response.getStatusLine().getStatusCode());
                if(response.getStatusLine().getStatusCode() == 200){
                    Log.d(Constants.DEBUG_TAG_MAPS, "response 200");
                    HttpEntity responseEntity = response.getEntity();
                    if (responseEntity!= null) {
                        Gson g = new Gson();

                        InputStream is = responseEntity.getContent();
                        InputStreamReader isr = new InputStreamReader(is);
                        BufferedReader reader = new BufferedReader(isr);

                        try{
                            responseEntity.getContent();
                            String x = EntityUtils.toString(responseEntity);
                        }catch (Exception e) {
                            // TODO: handle exception
                        }

                        responseJSONObject = g.fromJson(reader, JSONResponseObject.class);
                        Log.d(Constants.DEBUG_TAG_MAPS_console, responseJSONObject.toString());
                        reader.close();
                        System.gc();    
                    }

                }   


            } catch (Exception e) {
                e.printStackTrace();
            }

/code>

and on line :

InputStream is = responseEntity.getContent();

app is crashing …response code is 200 …
I have looked on my tomcat logs and everything is ok. JSONResponseObject is filled with values and sended.

What could be the problem? How can I get stacktrace to logcat?

One maybe related problem:
I have well know “Couldn’t et connection factory client” in logcat
Any of thing could causing that issue is not my case

  1. api key is correct, path to correct debug.keystore
  2. all permissions in manifest
  3. uses-library android:name=”com.google.android.maps in manifest as well

Map is displayed correctly, refreshing on zooming/moving.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T09:25:29+00:00Added an answer on June 2, 2026 at 9:25 am

    Problem solved after anotate json objects with google.gson.annotations instead of just implementing serializable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a main Servlet that processes post/get requests. I am using connection pooling
I've written a simple servlet that accepts HTTP POST requests and sends back a
I want a Servlet to handle requests to files depending on prefix and extension,
Possible Duplicate: Where are the request method constants in the Servlet API? I'm looking
I want to make an entry in the log if my servlet throws ServletException
I have a Servlet that sends back a JSON Object and I would like
When I try using standard servlet approach , in my browser the popup window
I'm attempting to write a Java Servlet to receive binary data requests and reply
I understand that Servlet requests are by default multithreaded. I created a simple servlet
I am trying to dispatch in a servlet request handler to the JSP processor

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.