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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:35:09+00:00 2026-05-14T05:35:09+00:00

I have a Swing runnable app which updates messages, then I have a Java

  • 0

I have a Swing runnable app which updates messages, then I have a Java servlet that gets messages from Paypal IPN (Instant Payment Notification), when the servlet starts up, in the init(), I starts the Swing runnable app which opens a desktop window, but 30 minutes later an error in the Swing caused the servlet to stop, how can that happen ? Because the runnable is running on it’s own thread, servlet started that thread, why an error in that thread will cause the servlet to stop ?

public class License_Manager extends JPanel implements Runnable
{
  License_Manager()
  {
    Do_GUI();
    ...
    start();
  }

  public static void main(String[] args)
  {
    // Schedule a job for the event-dispatching thread : creating and showing this application's GUI.
    javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { Create_And_Show_GUI(); } });
  }
}

public class PayPal_Servlet extends HttpServlet
{
  public void init(ServletConfig config) throws ServletException
  {
    super.init(config);
    License_Manager.main(null);
  }

  protected void processRequest(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException
  {
  }
}

And besides the error don’t even have anything to do with my code, it looks like this :

Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 17 >= 0
    at java.util.Vector.elementAt(Vector.java:427)
    at javax.swing.DefaultListModel.getElementAt(DefaultListModel.java:70)
    at javax.swing.plaf.basic.BasicListUI.paintCell(BasicListUI.java:191)
    at javax.swing.plaf.basic.BasicListUI.paintImpl(BasicListUI.java:304)
    at javax.swing.plaf.basic.BasicListUI.paint(BasicListUI.java:227)
    at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
    at javax.swing.JComponent.paintComponent(JComponent.java:763)
    at javax.swing.JComponent.paint(JComponent.java:1029)
    at javax.swing.JComponent.paintChildren(JComponent.java:864)
    at javax.swing.JComponent.paint(JComponent.java:1038)
    at javax.swing.JViewport.paint(JViewport.java:747)
    at javax.swing.JComponent.paintChildren(JComponent.java:864)
    at javax.swing.JComponent.paint(JComponent.java:1038)
    at javax.swing.JComponent.paintToOffscreen(JComponent.java:5124)
    at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:278)
    at javax.swing.RepaintManager.paint(RepaintManager.java:1220)
    at javax.swing.JComponent._paintImmediately(JComponent.java:5072)
    at javax.swing.JComponent.paintImmediately(JComponent.java:4882)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:803)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714)
    at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:694)
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Edit :

Thanks for all the replies, it seems starting a thread in init() is a bad idea, my original idea was, my Swing GUI app processes all the messages the servlet gets and writes to a folder and I can see the GUI working on the screen while the servlet gets the messages at the back end, they are related, so I run those two processes at the same time and starting the servlet will automatically starts the GUI for me too in the init(), now I may start those 2 processes separately so that no matter what happens to the GUI, the servlet won’t stop !

  • 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-05-14T05:35:10+00:00Added an answer on May 14, 2026 at 5:35 am

    Seems definitely wierd. Saw something similar on sun (now oracle) forums. No good answer on it till now. But may be you can get a clue as it seems the same problem
    Link http://72.5.124.102/thread.jspa?threadID=5339908&messageID=10469703

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

Sidebar

Ask A Question

Stats

  • Questions 480k
  • Answers 480k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer IIS6 doesn't support the newest versions of .NET. What .NET… May 16, 2026 at 6:12 am
  • Editorial Team
    Editorial Team added an answer 1) Developer is at a junior level - Mentor; be… May 16, 2026 at 6:12 am
  • Editorial Team
    Editorial Team added an answer I'd have thought the answer is obvious: if a socket… May 16, 2026 at 6:12 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.