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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:07:41+00:00 2026-06-02T00:07:41+00:00

I got the following error when I try to start again my thread. Exception

  • 0

I got the following error when I try to start again my thread.

Exception in thread "Thread-1" java.lang.IllegalThreadStateException
     at java.lang.Thread.start(Unknown Source)
     at com.jrat.server.Server.run(Server.java:159)

Here is the line:

if (!t.isAlive()) t.start();

The code can be executed many times as it is in a loop (socket handler).
As far as I know, this error means that it can’t start a new Thread because it is already running. What’s weird is I have a isAlive before.

Any idea why it is like that?

Thanks.

  • 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-02T00:07:42+00:00Added an answer on June 2, 2026 at 12:07 am

    As far as I know, this error means that it can’t start a new Thread because it is already running.

    No, it means you can’t start a thread which has already been started.

    You can’t restart a thread, which is what you’re trying to do. From the documentation for start():

    Throws: IllegalThreadStateException – if the thread was already started.

    You should probably be using an ExecutorService instead, at a guess – but it’s not really clear what you’re trying to do.

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

Sidebar

Related Questions

I've got the following java code, which is giving the error below: import java.io.File;
I got following error... System.NullReferenceException: Object reference not set to an instance of an
I tried installing TurboGears 1.0 on Windows 7 using tgsetup.py. and got following error
I got the following error of Oracle, ORA-25226: dequeue failed, queue string.string is not
While working on an existing project I suddenly got the following error when trying
On a server running a Qt application I got the following error, as soon
Whenever I run any jython program in Eclipse, I got the following error in
I tried to update some part of a matrix, I got the following error
After the sub of the exec JCL, i've got the following error : SQLCODE
I get the following error: ActiveRecord::AssociationTypeMismatch in ContractsController#create ExchangeRate(#2183081860) expected, got HashWithIndifferentAccess(#2159586480) Params: {commit=>Create,

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.