Couldn't destroy threadgroup ... IllegalThreadStateException
See original GitHub issueFollowing the first maven example in Chapter1. The operation is successful with the file copy, but throws WARNING afterwards. Happened both with Maven 3.3.1 and 3.5.0 (I don’t have 3.3.3 on MacOs)
MacOs, Java8u121, Mvn3.3.1, sha a806764a96c5ae50dfc7c1259fbc684394d0d0c4
[camelinaction2/chapter1/file-copy (master)]$ mvn clean
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Camel in Action 2 :: Chapter 1 :: File Copy Example 2.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ chapter1-file-copy ---
[INFO] Deleting camelinaction2/chapter1/file-copy/target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.331 s
[INFO] Finished at: 2017-05-05T12:59:42-07:00
[INFO] Final Memory: 9M/309M
[INFO] ------------------------------------------------------------------------
[camelinaction2/chapter1/file-copy (master)]$ mvn compile exec:java -Dexec.mainClass=camelinaction.FileCopierWithCamel
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Camel in Action 2 :: Chapter 1 :: File Copy Example 2.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ chapter1-file-copy ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ chapter1-file-copy ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to camelinaction2/chapter1/file-copy/target/classes
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:java (default-cli) @ chapter1-file-copy ---
[ion.FileCopierWithCamel.main()] DefaultCamelContext INFO Apache Camel 2.19.0 (CamelContext: camel-1) is starting
[ion.FileCopierWithCamel.main()] ManagedManagementStrategy INFO JMX is enabled
[ion.FileCopierWithCamel.main()] DefaultTypeConverter INFO Loaded 192 type converters
[ion.FileCopierWithCamel.main()] DefaultRuntimeEndpointRegistry INFO Runtime endpoint registry is in extended mode gathering usage statistics of all incoming and outgoing endpoints (cache limit: 1000)
[ion.FileCopierWithCamel.main()] DefaultCamelContext INFO StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
[ion.FileCopierWithCamel.main()] FileEndpoint INFO Endpoint is configured with noop=true so forcing endpoint to be idempotent as well
[ion.FileCopierWithCamel.main()] FileEndpoint INFO Using default memory based idempotent repository with cache max size: 1000
[ion.FileCopierWithCamel.main()] DefaultCamelContext INFO Route: route1 started and consuming from: file://data/inbox?noop=true
[ion.FileCopierWithCamel.main()] DefaultCamelContext INFO Total 1 routes, of which 1 are started.
[ion.FileCopierWithCamel.main()] DefaultCamelContext INFO Apache Camel 2.19.0 (CamelContext: camel-1) started in 0.229 seconds
[ion.FileCopierWithCamel.main()] DefaultCamelContext INFO Apache Camel 2.19.0 (CamelContext: camel-1) is shutting down
[ion.FileCopierWithCamel.main()] DefaultShutdownStrategy INFO Starting to graceful shutdown 1 routes (timeout 300 seconds)
[el-1) thread #1 - ShutdownTask] DefaultShutdownStrategy INFO Route: route1 shutdown complete, was consuming from: file://data/inbox?noop=true
[ion.FileCopierWithCamel.main()] DefaultShutdownStrategy INFO Graceful shutdown of 1 routes completed in 0 seconds
[ion.FileCopierWithCamel.main()] DefaultCamelContext INFO Apache Camel 2.19.0 (CamelContext: camel-1) uptime 10.252 seconds
[ion.FileCopierWithCamel.main()] DefaultCamelContext INFO Apache Camel 2.19.0 (CamelContext: camel-1) is shutdown in 0.018 seconds
[WARNING] thread Thread[ForkJoinPool.commonPool-worker-2,5,camelinaction.FileCopierWithCamel] was interrupted but is still alive after waiting at least 6999msecs
[WARNING] thread Thread[ForkJoinPool.commonPool-worker-2,5,camelinaction.FileCopierWithCamel] will linger despite being asked to die via interruption
[WARNING] thread Thread[ForkJoinPool.commonPool-worker-3,5,camelinaction.FileCopierWithCamel] will linger despite being asked to die via interruption
[WARNING] thread Thread[ForkJoinPool.commonPool-worker-4,5,camelinaction.FileCopierWithCamel] will linger despite being asked to die via interruption
[WARNING] NOTE: 3 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=camelinaction.FileCopierWithCamel,maxpri=10]
java.lang.IllegalThreadStateException
at java.lang.ThreadGroup.destroy(ThreadGroup.java:778)
at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:321)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 26.884 s
[INFO] Finished at: 2017-05-05T13:00:12-07:00
[INFO] Final Memory: 29M/316M
[INFO] ------------------------------------------------------------------------
[camelinaction2/chapter1/file-copy (master)]$ git show
commit a806764a96c5ae50dfc7c1259fbc684394d0d0c4
Merge: 3e0f8da 6cdf7c7
Author: Claus Ibsen <claus.ibsen@gmail.com>
Date: Fri May 5 11:34:52 2017 -0400
Merge branch '219'
[camelinaction2/chapter1/file-copy (master)]$ java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
[camelinaction2/chapter1/file-copy (master)]$ mvn -version
Apache Maven 3.3.1 (cab6659f9874fa96462afef40fcf6bc033d58c1c; 2015-03-13T13:10:27-07:00)
Maven home: /usr/local/Cellar/maven/3.3.1/libexec
Java version: 1.8.0_121, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.11.6", arch: "x86_64", family: "mac"
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
java - couldn't destroy threadgroup org.codehaus.mojo.exec ...
I was having the same thread warning issue with that org.codehaus.mojo package that also included a java.lang.IllegalThreadStateException ...
Read more >Couldn't destroy threadgroup org.codehaus.mojo.exec ...
Issue When maven calls the mojo plugin exec - see: ...
Read more >[WARNING] Couldn't destroy threadgroup org.codehaus.mojo ...
Re: transport/https-sample - [WARNING] Couldn't destroy threadgroup org.codehaus.mojo.exec.ExecJavaMojo$IsolatedThreadGroup[name=org.apache.
Read more >Recon IllegalThreadStateException when destroy thread group
Recon IllegalThreadStateException when destroy thread group. Status: ... [WARNING] Couldn't destroy threadgroup org.codehaus.mojo.exec.
Read more >Accessing titan graph from java - Google Groups
I need my program to be able to access titan graph and read/write/delete from it ... [WARNING] Couldn't destroy threadgroup org.codehaus.mojo.exec.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The only way to avoid the error is to add -Dexec.cleanupDaemonThreads=false to the launch command:
mvn compile exec:java -Dexec.mainClass=camelinaction.FileCopierWithCamel -Dexec.cleanupDaemonThreads=false
Still the same Exception with Camel 2.19.1, Java 1.8.0_131, mvn 3.5.0