[ https://issues.apache.org/jira/browse/CAMEL-4208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065843#comment-13065843 ]
Claus Ibsen commented on CAMEL-4208: ------------------------------------ Ah okay its not a bug. The exception is logged at WARN level, but it states in the message: That this exception will be ignored. 641 [628168058@qtp-1679600408-11] WARN org.apache.camel.component.gae.context.GaeDefaultCamelContext - Error occurred while shutting down routes. This exception will be ignored. The reason for this exception is that GAE does not allow Java applications to shutdown thread pools. > Camel context (GaeDefaultCamelContext) stop method call throwing exception > while trying to shut down on google app engine via ctx.stop(); > ------------------------------------------------------------------------------------------------------------------------------------------- > > Key: CAMEL-4208 > URL: https://issues.apache.org/jira/browse/CAMEL-4208 > Project: Camel > Issue Type: Bug > Components: camel-core, camel-gae > Affects Versions: 2.7.2 > Environment: Google app engine sdk 1.5.1, Camel core - 2.7.2, > came-gae - 2.7.2 > Reporter: sumit > Fix For: 2.8.0 > > > Camel context stop throwing exception while trying to shut down on google app > engine via ctx.stop(); > Test case: > Start apache camel on Google app engine via start method as follows upon > stopping context, exception occurs: > ----------------------------------------------- > {code} > public void stop() throws Exception { > ctx.stop(); > } > public void start() throws Exception { > ctx = new GaeDefaultCamelContext(); > ctx.disableJMX(); > MyRegistry r = new MyRegistry();/*myregistry code is below*/ > r.init(); > ctx.setRegistry(r); > tmpl = ctx.createProducerTemplate(); > ctx.start(); > } > public static class MyRegistry extends SimpleRegistry{ > public void init(){ > put("direct",new DirectComponent()); > put("browse", new BrowseComponent()); > put("class", new ClassComponent()); > put("bean", new BeanComponent()); > put("dataset", new DataSetComponent()); > put("mock", new MockComponent()); > put("language", new LanguageComponent()); > put("ref", new RefComponent()); > put("vm", new VmComponent()); > put("log", new LogComponent()); > put("properties", new PropertiesComponent()); > > > } > {code} > ------------------------------------------ > {code} > at > java.security.AccessControlContext.checkPermission(AccessControlContext.java:393) > at > java.security.AccessController.checkPermission(AccessController.java:553) > at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) > at > com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkPermission(DevAppServerFactory.java:166) > at > java.util.concurrent.ThreadPoolExecutor.checkShutdownAccess(ThreadPoolExecutor.java:711) > at > java.util.concurrent.ThreadPoolExecutor.shutdownNow(ThreadPoolExecutor.java:1379) > at > java.util.concurrent.Executors$DelegatedExecutorService.shutdownNow(Executors.java:631) > at > org.apache.camel.impl.DefaultExecutorServiceStrategy.shutdownNow(DefaultExecutorServiceStrategy.java:352) > at > org.apache.camel.impl.DefaultShutdownStrategy.doShutdown(DefaultShutdownStrategy.java:304) > at > org.apache.camel.impl.ServiceSupport.shutdown(ServiceSupport.java:175) > at > org.apache.camel.util.ServiceHelper.stopAndShutdownService(ServiceHelper.java:174) > at > org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:1571) > at > org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:1593) > at > org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:1581) > at > org.apache.camel.impl.DefaultCamelContext.doStop(DefaultCamelContext.java:1484) > at org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:100) > at org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:124) > {code} -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira