21

I have java maven project which is working fine in my computer but when i upload this project to the ubuntu server and trying to run it on command line using following command its give me error.

Command line code:

mvn exec:java -Dexec.mainClass=SitemapCheck.SitemapAction 

Its give me error Like

[WARNING] NOTE: 2 thread(s) did not finish despite being asked to via interruption. This is not a problem with exec:java, it is a problem with the running code. Although not serious, it should be remedied. [WARNING] Couldn't destroy threadgroup org.codehaus.mojo.exec.ExecJavaMojo$IsolatedThreadGroup[name=SitemapCheck.SitemapAction,maxpri=10] java.lang.IllegalThreadStateException at java.lang.ThreadGroup.destroy(ThreadGroup.java:778) at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:321) at 

After search on the internet i found one solution but unfortunately its not working

 cleanupDaemonThreads = false 

Can anyone please suggest me how can i fixed the error?

3
  • That is no error. It is a warning Commented Aug 16, 2018 at 7:23
  • 1
    please see the error after warning massage Commented Aug 16, 2018 at 7:23
  • Codes run but after gives few output its stopped.. Commented Aug 16, 2018 at 7:24

3 Answers 3

38

I was having the same thread warning issue with that org.codehaus.mojo package that also included a java.lang.IllegalThreadStateException and this command worked for me:

mvn compile exec:java -Dexec.cleanupDaemonThreads=false

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you for the pointer! My application was hanging after finishing, and it turns out that the Exec Maven Plugin was trying to shut down a daemon thread in the AWS Java SDK and it wasn't responding.
4

To build further on the answer of @Azurespot, you can specify this parameter within the pom.xml:

<properties> <exec.cleanupDaemonThreads>false</exec.cleanupDaemonThreads> </properties> 

from now on you can just launch it with:

mvn compile exec:java 

Comments

0

The command that works along with the main class

Also works with mongoDB Learning Platform for the java.lang.IllegalThreadStateException Exception

mvn exec:java -Dexec.mainClass=com.mdbu.app.DemoApp -Dexec.cleanupDaemonThreads=false 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.