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

  • Home
  • SEARCH
  • 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 8139331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:47:35+00:00 2026-06-06T11:47:35+00:00

This is the first time I got this error. This code basically gets the

  • 0

This is the first time I got this error.
This code basically gets the sum of each item sold in a particular date.

Any tips on resolving this problem? Thanks.

       Statement statement = connection.createStatement();
       String query = "SELECT itemcode, SUM(quantity) AS 'Total Sales Per Day' "
               + "FROM sales "
               + "WHERE real_pur_date = '" + date + "' "
               + "GROUP BY itemcode ";
       ResultSet rs = statement.executeQuery( query ); // this line gets the error / exception
       while( rs.next() ){
           Vector row = new Vector();
           row.add( rs.getString( "itemcode" ) );
           row.add( rs.getInt( "Total Sales Per Day" ) );
           dailyData.add( row );
       }
       statement.close();
Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
at com.mysql.jdbc.Util.handleNewInstance(Util.java:431)
at com.mysql.jdbc.ResultSetImpl.getInstance(ResultSetImpl.java:383)
at com.mysql.jdbc.MysqlIO.buildResultSetWithRows(MysqlIO.java:3140)
at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:491)
at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3118)
at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2288)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2709)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2677)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2627)
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1556)
at posinventory.Controller.StatisticEngine.getDailyData(StatisticEngine.java:20)
at posinventory.Statistic.refreshTableDailyStat(Statistic.java:36)
at posinventory.Statistic.refreshTableDailyStat(Statistic.java:37)
at posinventory.Statistic.refreshTableDailyStat(Statistic.java:37)
at posinventory.Statistic.refreshTableDailyStat(Statistic.java:37)
  • 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-06T11:47:38+00:00Added an answer on June 6, 2026 at 11:47 am

    You really should post the code from posinventory.Statistic.refreshTableDailyStat, but I’ll guess at it: in that method, line 36 calls StatisticEngine.getDailyData; line 37 calls refreshTableDailyStat recursively — so there’s your problem, Statistic.java, line 37.

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

Sidebar

Related Questions

Got this error for the first time, I have looked around and cannot find
I got this map/set iterator not incrementable run-time error with the code below in
Observed: First, 'ctrl+v'+selection always worked before for me. But this time, i got normal
I've got this code which basically loops through a set of folders and subfolders
This is my first time using splint (from Ubuntu repositories) and I immediately got
i am new to android and this my first time using AsyncTask. I made
This is my first time working with a WPF datagrid. From what I understand
this is my first time asking a question here. I tried to be well
This is my first time that I use WCF and Android. So, sorry for
This is my first time using XML documents. What I'm trying to do is

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.