Giter VIP home page Giter VIP logo

Comments (5)

montebove avatar montebove commented on May 17, 2024 11

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

from camelinaction2.

davsclaus avatar davsclaus commented on May 17, 2024

It shutdown nicely for me

davsclaus:/Users/davsclaus/workspace/camelinaction2/chapter1/file-copy (master)/$ mvn compile exec:java
[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] Nothing to compile - all classes are up to date
[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.477 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.505 seconds
[ion.FileCopierWithCamel.main()] DefaultCamelContext            INFO  Apache Camel 2.19.0 (CamelContext: camel-1) is shutdown in 0.026 seconds
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24.821 s
[INFO] Finished at: 2017-05-07T17:17:21+02:00
[INFO] Final Memory: 21M/271M
[INFO] ------------------------------------------------------------------------

from camelinaction2.

davsclaus avatar davsclaus commented on May 17, 2024

Have you tried with latest code as Camel 2.19.0 has been released since.

from camelinaction2.

nguyennv84 avatar nguyennv84 commented on May 17, 2024

Seeing same issue on 2.19.1

$ 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] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- exec-maven-plugin:1.6.0:java (default-cli) @ chapter1-file-copy ---
[ion.FileCopierWithCamel.main()] DefaultCamelContext            INFO  Apache Camel 2.19.1 (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.1 (CamelContext: camel-1) started in 0.381 seconds
[ion.FileCopierWithCamel.main()] DefaultCamelContext            INFO  Apache Camel 2.19.1 (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.1 (CamelContext: camel-1) uptime 10.410 seconds
[ion.FileCopierWithCamel.main()] DefaultCamelContext            INFO  Apache Camel 2.19.1 (CamelContext: camel-1) is shutdown in 0.023 seconds
[WARNING] thread Thread[ForkJoinPool.commonPool-worker-2,5,camelinaction.FileCopierWithCamel] was interrupted but is still alive after waiting at least 991msecs
[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:207)
	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:863)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
	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: 27.606 s
[INFO] Finished at: 2017-07-08T12:25:12+01:00
[INFO] Final Memory: 21M/255M
[INFO] ------------------------------------------------------------------------
$ git show
commit bc2308f1ba628eec92bdd506f218ab3adc0b7d2d
Author: Claus Ibsen <[email protected]>
Date:   Tue Jul 4 21:15:14 2017 +0200

    Polished
$ java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)
$ mvn -version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T16:41:47+00:00)
Maven home: /usr/local/Cellar/maven/3.3.9/libexec
Java version: 1.8.0_111, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_111.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"

from camelinaction2.

montebove avatar montebove commented on May 17, 2024

Still the same Exception with Camel 2.19.1, Java 1.8.0_131, mvn 3.5.0

from camelinaction2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.