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 8227195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:02:37+00:00 2026-06-07T16:02:37+00:00

I am unable to figure out why I am getting this error. I have

  • 0

I am unable to figure out why I am getting this error. I have checked and rechecked my code does not seems to find nay error.

16 Jul, 2012 3:21:25 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [XYZ] in context with path [/ABC] threw exception
java.lang.NullPointerException
    at com.mnp.abc.xyz.doPost(XYZ.java:116)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)

doPost method of XYZ servlet

@Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        response.setContentType("application/json");
        response.setCharacterEncoding("UTF-8");
        StringBuilder sb = new StringBuilder();

        InputStream rin = request.getInputStream();
        InputStream gzipStream = new GZIPInputStream(rin);
        Reader decoder = new InputStreamReader(gzipStream, "UTF-8");
        BufferedReader br = new BufferedReader(decoder);

        String str;

        // retrieve JOSNArray send to Servlet
        while ((str = br.readLine()) != null) {
            sb.append(str);
        }
        JSONArray jsonArray = null;
        try {
            jsonArray = new JSONArray(sb.toString());
        } catch (JSONException e) {
            System.out.println("Error parsing JSON");
        }
        System.out.println("json object: " + jsonArray.toString());


        // parse JSONArray and obtain ContactArray
        ArrayList<Contact> contactArray = null;
        try {
            contactArray = frmJSONArrayToContactArray(jsonArray);
        } catch (JSONException e1) {
            System.out.println(TAG + " frmJSONArrayToContactArray Failed");
        }
        // connect JDBC with MySQL server
        Context initContext;
        Connection connection;
        DataSource datasource;
        Statement statement;
        ResultSet rs = null;
        try {
            initContext = new InitialContext();
            Context envContext = (Context) initContext.lookup("java:/comp/env");
            datasource = (DataSource) envContext.lookup("jdbc/bolsms");

            // load Connector/J
            connection = datasource.getConnection();
            statement = connection.createStatement();
            // get query String
            Iterator<Contact> itetor = contactArray.iterator();
            boolean greatPeopleBoo = false;
            while (itetor.hasNext()) {
                ***Contact contact = itetor.next();***
                ....
                ....
                .... 
            }
            rs.close();
            statement.close();
            connection.close();
        } catch (NamingException ex) {
            Logger.getLogger(MarkGreatPeopleFromContact.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SQLException e) {
            for (Throwable t : e) {
                System.out.println(t.getMessage());
            }
        }

        /*
         * send contactArray back to Android Client
         */

        }
    }
  • 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-07T16:02:41+00:00Added an answer on June 7, 2026 at 4:02 pm

    org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet [XYZ] in context with path [/ABC]

    It appears to be uncorrectly configured into the application. If it uses a context xml in the application appart from the web.xml it would be wise to check both anyhow and that the servlet XYZ is properly configured in the web.xml particularly , if it is in a .jar in lib then the .jar will need to be named in the web.xml as a resource and the server will need to be restarted.
    It about said it could not find the servlet.

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

Sidebar

Related Questions

I am getting this error on the following code, and cant figure out why.
Hey i am unable to figure out why this xml is not being generated
I'm getting really tired of trying to figure out why this code works in
The following code produces no suitable constructor found error. I am unable to figure
This seems like it should be really simple, but I'm unable to figure this
This sure seems like a simple error to fix. However, I somehow can't figure
I keep getting a 'System.OutOfMemoryException' thrown at the code below. I can't figure out
In a DOS script that I wrote, I am unable to figure out what
I'm new to Entity Framework and am trying to figure things out. I have
Been trying to figure out what's wrong with this one for a while. I'm

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.