Advertisement
Guest User

Untitled

a guest
Jul 5th, 2015
508
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.64 KB | None | 0 0
  1. 10:32:35.742 [localhost-startStop-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Eagerly caching bean 'cronTrigger' to allow for resolving potential circular references
  2. 10:32:35.746 [localhost-startStop-1] DEBUG o.s.s.a.ScheduledAnnotationBeanPostProcessor - No @Scheduled annotations found on bean class: class org.springframework.scheduling.support.CronTrigger
  3. 10:32:35.747 [localhost-startStop-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Finished creating instance of bean 'cronTrigger'
  4. 10:32:35.747 [localhost-startStop-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Creating shared instance of singleton bean 'taskExecutor'
  5. 10:32:35.747 [localhost-startStop-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Creating instance of bean 'taskExecutor'
  6. 10:32:35.747 [localhost-startStop-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'webConfig'
  7. 10:32:35.749 [localhost-startStop-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Eagerly caching bean 'taskExecutor' to allow for resolving potential circular references
  8. 10:32:35.757 [localhost-startStop-1] DEBUG o.s.s.a.ScheduledAnnotationBeanPostProcessor - No @Scheduled annotations found on bean class: class java.util.concurrent.ScheduledThreadPoolExecutor
  9. 10:32:35.757 [localhost-startStop-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Finished creating instance of bean 'taskExecutor'
  10. 10:32:35.757 [localhost-startStop-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Creating shared instance of singleton bean 'getInternalResourceViewResolver'
  11. 10:32:35.757 [localhost-startStop-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Creating instance of bean 'getInternalResourceViewResolver'
  12. 10:32:35.757 [localhost-startStop-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'webConfig'
  13. 10:32:35.770 [localhost-startStop-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Eagerly caching bean 'getInternalResourceViewResolver' to allow for resolving potential circular references
  14. 10:32:35.781 [localhost-startStop-1] DEBUG o.s.s.a.ScheduledAnnotationBeanPostProcessor - No @Scheduled annotations found on bean class: class org.springframework.web.servlet.view.InternalResourceViewResolver
  15. 10:32:35.781 [localhost-startStop-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Finished creating instance of bean 'getInternalResourceViewResolver'
  16. 10:32:35.785 [localhost-startStop-1] DEBUG o.s.w.c.s.AnnotationConfigWebApplicationContext - Unable to locate LifecycleProcessor with name 'lifecycleProcessor': using default [org.springframework.context.support.DefaultLifecycleProcessor@31b09c11]
  17. 10:32:35.785 [localhost-startStop-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'lifecycleProcessor'
  18. 10:32:35.788 [localhost-startStop-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'delegatingApplicationListener'
  19. 10:32:35.788 [localhost-startStop-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'org.springframework.context.annotation.internalScheduledAnnotationProcessor'
  20. 10:32:35.788 [localhost-startStop-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'mvcResourceUrlProvider'
  21. 10:32:35.788 [localhost-startStop-1] DEBUG o.s.w.s.resource.ResourceUrlProvider - Looking for resource handler mappings
  22. 10:32:35.789 [localhost-startStop-1] DEBUG o.s.w.s.resource.ResourceUrlProvider - No resource handling mappings found
  23. 10:32:35.789 [localhost-startStop-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'webConfig'
  24. 10:32:35.794 [localhost-startStop-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'cronTrigger'
  25. 10:32:35.808 [localhost-startStop-1] DEBUG o.s.s.a.ScheduledAnnotationBeanPostProcessor - Could not find default TaskScheduler bean
  26.  
  27. //Exception Starts from here.
  28. org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.scheduling.TaskScheduler] is defined
  29. at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:371) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
  30. at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:331) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
  31. at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.finishRegistration(ScheduledAnnotationBeanPostProcessor.java:183) [spring-context-4.1.6.RELEASE.jar:4.1.6.RELEASE]
  32. at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.onApplicationEvent(ScheduledAnnotationBeanPostProcessor.java:162) [spring-context-4.1.6.RELEASE.jar:4.1.6.RELEASE]
  33. at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.onApplicationEvent(ScheduledAnnotationBeanPostProcessor.java:85) [spring-context-4.1.6.RELEASE.jar:4.1.6.RELEASE]
  34. at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:151) [spring-context-4.1.6.RELEASE.jar:4.1.6.RELEASE]
  35. at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:128) [spring-context-4.1.6.RELEASE.jar:4.1.6.RELEASE]
  36. at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:331) [spring-context-4.1.6.RELEASE.jar:4.1.6.RELEASE]
  37. at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:773) [spring-context-4.1.6.RELEASE.jar:4.1.6.RELEASE]
  38. at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:483) [spring-context-4.1.6.RELEASE.jar:4.1.6.RELEASE]
  39. at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) [spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]
  40. at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) [spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]
  41. at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) [spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]
  42. at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4726) [catalina.jar:8.0.20.B]
  43. at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5162) [catalina.jar:8.0.20.B]
  44. at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.0.20.B]
  45. at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725) [catalina.jar:8.0.20.B]
  46. at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701) [catalina.jar:8.0.20.B]
  47. at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717) [catalina.jar:8.0.20.B]
  48. at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:581) [catalina.jar:8.0.20.B]
  49. at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1683) [catalina.jar:8.0.20.B]
  50. at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_45]
  51. at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_45]
  52. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45]
  53. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45]
  54. at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
  55. 10:32:35.809 [localhost-startStop-1] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'taskExecutor'
  56. 10:32:35.827 [localhost-startStop-1] DEBUG o.s.c.e.PropertySourcesPropertyResolver - Searching for key 'spring.liveBeansView.mbeanDomain' in [servletConfigInitParams]
  57. 10:32:35.827 [localhost-startStop-1] DEBUG o.s.c.e.PropertySourcesPropertyResolver - Searching for key 'spring.liveBeansView.mbeanDomain' in [servletContextInitParams]
  58. 10:32:35.827 [localhost-startStop-1] DEBUG o.s.c.e.PropertySourcesPropertyResolver - Searching for key 'spring.liveBeansView.mbeanDomain' in [jndiProperties]
  59. 10:32:35.827 [localhost-startStop-1] DEBUG o.springframework.jndi.JndiTemplate - Looking up JNDI object with name [java:comp/env/spring.liveBeansView.mbeanDomain]
  60. 10:32:35.830 [localhost-startStop-1] DEBUG o.s.jndi.JndiLocatorDelegate - Converted JNDI name [java:comp/env/spring.liveBeansView.mbeanDomain] not found - trying original name [spring.liveBeansView.mbeanDomain]. javax.naming.NameNotFoundException: Name [spring.liveBeansView.mbeanDomain] is not bound in this Context. Unable to find [spring.liveBeansView.mbeanDomain].
  61. 10:32:35.830 [localhost-startStop-1] DEBUG o.springframework.jndi.JndiTemplate - Looking up JNDI object with name [spring.liveBeansView.mbeanDomain]
  62.  
  63. @Configuration
  64. @EnableScheduling
  65. @EnableWebMvc
  66. @ComponentScan(basePackages="com.project")
  67. public class WebConfig implements SchedulingConfigurer
  68. {
  69. protected static final Logger slf4jLogger = Logger.getLogger(WebConfig.class.getName());
  70. private static final String cronExpression = "0 0 * * * ?";
  71.  
  72.  
  73.  
  74. /*@Bean
  75. public MobileNotifSchedulerBean schedulerbean()
  76. {
  77. return new MobileNotifSchedulerBean();
  78. }*/
  79.  
  80. @Bean
  81. public InternalResourceViewResolver getInternalResourceViewResolver()
  82. {
  83. InternalResourceViewResolver resolver = new InternalResourceViewResolver();
  84. resolver.setPrefix("/WEB-INF/jsp/");
  85. resolver.setSuffix(".jsp");
  86. resolver.setSuffix(".html");
  87. resolver.setSuffix(".htm");
  88. return resolver;
  89. }
  90.  
  91. @Bean
  92. CronTrigger cronTrigger()
  93. {
  94. //String timeZone = "Asia/Calcutta";
  95.  
  96. String timeZone = null;
  97. HashSet<String> userTimeZonesfromDB = FetchUserTimeZones.fetchUserTimeZone();
  98. for (String s : userTimeZonesfromDB)
  99. {
  100. timeZone = s;
  101. slf4jLogger.info(s);
  102. }
  103. return new CronTrigger(cronExpression, TimeZone.getTimeZone(timeZone));
  104. }
  105.  
  106.  
  107. @Override
  108. public void configureTasks(ScheduledTaskRegistrar taskRegistrar)
  109. {
  110.  
  111. taskRegistrar.addCronTask(new CronTask(new MobileNotifSchedulerBean(), cronTrigger()));
  112. }
  113.  
  114. @Bean(destroyMethod="shutdown")
  115. public Executor taskExecutor()
  116. {
  117. return Executors.newScheduledThreadPool(1);
  118. }
  119. }
  120.  
  121. @EnableScheduling
  122. public class MobileNotifSchedulerBean implements Runnable
  123. {
  124. protected static final Logger slf4jLogger = Logger.getLogger(MobileNotifSchedulerBean.class.getName());
  125.  
  126.  
  127. public void sendQuestionNotif()
  128. {
  129. try
  130. {
  131. HashSet<String> reg_ids = FetchRegistrationIDs.fetchItems();
  132. for (String s : reg_ids)
  133. {
  134. String REGISTRATION_IDs = s;
  135. slf4jLogger.info(s);
  136. MobileSNSPushNotification.sendNotification(REGISTRATION_IDs);
  137. }
  138. }
  139. catch (IOException e)
  140. {
  141. //e.printStackTrace();
  142. slf4jLogger.error(e);
  143. slf4jLogger.error(e.getMessage());
  144. slf4jLogger.error(e.getStackTrace());
  145. }
  146. }
  147.  
  148.  
  149. @Override
  150. public void run()
  151. {
  152. sendQuestionNotif();
  153. }
  154. }
  155.  
  156. 03-Jul-2015 00:00:04.129 INFO [java-sdk-http-connection-reaper] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading
  157. Illegal access: this web application instance has been stopped already.
  158. Could not load [org.apache.http.pool.AbstractConnPool$3].
  159. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
  160.  
  161. java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already.
  162. Could not load [org.apache.http.pool.AbstractConnPool$3].
  163. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement