This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am a newbie to spring JMX and quartz scheduling. So trying to explain in layman form. I have a class EmailAlertMessaginService.java. It has a method startService() that needs to run every 3 hours.
I did the entry for this class in a file applicationContext-jmx-export.xml as follows :
Now, as the method startService() needs to run every 3 hours so an entry for the bean emailAlertMessagingService is being made in a file applicationContext-jmx-quartz.xml as follows:
(Not mentioning the CronTriggerBean and MethodInvokingJobDetailFactoryBean here.)
When I start the server it throws an error :
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jmxExporter' defined in ServletContext resource [/WEB-INF/applicationContext-jmx-export.xml]: Cannot resolve reference to bean 'emailAlertMessagingService' while setting bean property 'beans' with key [TypedStringValue: value [ATG_Migration:name=EmailAlertMessagingService], target type [null]]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'emailAlertMessagingService' defined in ServletContext resource [/WEB-INF/applicationContext-jmx-quartz.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException
I suppose that this is because the chatSessionBO bean it is looking for in the startService is null. Please guide me how to go about this and is there anyway by which I can do the whole thing using annotations.