The message gets logged once for me, and i have tested it with HFE, may be you have 2 instances of the class(though i wonder why this would happen), if you add the static modifier to the logger, do you still have the message logged twice?
Wyclif On Mon, Dec 19, 2011 at 3:18 AM, Ben Wolfe <[email protected]> wrote: > I quickly looked over the calls and I don't see why it would be called > twice either. Is a module failing to start? If thats the case the spring > context would be refreshed twice and so the .started methods would be > called twice. > > Can you debug and put a breakpoint on that method and look at the > stacktrace? (or just print the stacktrace from that method to the logs) > > Ben > > > On Fri, Dec 16, 2011 at 1:18 PM, Rowan Seymour <[email protected]> wrote: > >> I've now noticed on 3 different machines with OpenMRS 1.8.2 and 1.8.3, >> sometimes module activator startup methods are called twice. I can see this >> from modules which write something to the log when they are being started >> >> For example... >> >> INFO - LoggingAdvice.invoke(109) |2011-12-14 18:48:43,003| In method >> SchedulerService.restoreFromMemento. Arguments: OpenmrsMemento=null, >> INFO - LoggingAdvice.invoke(134) |2011-12-14 18:48:43,004| Exiting method >> restoreFromMemento >> *INFO - JMXActivator.started(33) |2011-12-14 18:48:43,005| Starting JMX >> Module* >> INFO - SchedulerServiceInterceptor.afterReturning(36) |2011-12-14 >> 18:48:43,020| schedules service >> INFO - JMXActivator.started(37) |2011-12-14 18:48:43,027| Registered >> management beans >> INFO - FrameworkServlet.initServletBean(301) |2011-12-14 18:48:43,028| >> FrameworkServlet 'openmrs': initialization started >> INFO - SchedulerServiceInterceptor.afterReturning(36) |2011-12-14 >> 18:48:43,057| schedules service >> INFO - ContextRefreshListener.onApplicationEvent(37) |2011-12-14 >> 18:48:43,063| Refreshed management beans >> INFO - FrameworkServlet.initServletBean(320) |2011-12-14 18:48:43,064| >> FrameworkServlet 'openmrs': initialization completed in 35 ms >> WARN - CommonsLoggingOutput.warn(59) |2011-12-14 18:48:43,099| Setting >> extra type info to overloaded methods may fail with <parameter .../> >> ERROR - CommonsLoggingOutput.error(75) |2011-12-14 18:48:43,100| >> Parameter mismatch parsing signatures section in dwr.xml on line: >> DWRProgramWorkflowService.updatePatientProgram(Integer patientProgramId, >> String enrollmentDateYmd, String completionDateYmd, Integer locationId) >> *INFO - JMXActivator.started(33) |2011-12-14 18:48:43,100| Starting JMX >> Module* >> INFO - SchedulerServiceInterceptor.afterReturning(36) |2011-12-14 >> 18:48:43,112| schedules service >> INFO - JMXActivator.started(37) |2011-12-14 18:48:43,118| Registered >> management beans >> INFO - ModuleListController.formBackingObject(261) |2011-12-14 >> 18:48:43,140| Returning 5 modules >> INFO - SchedulerServiceInterceptor.afterReturning(36) |2011-12-14 >> 18:48:46,198| schedules service >> INFO - SchedulerServiceInterceptor.afterReturning(36) |2011-12-14 >> 18:48:46,201| schedules service >> >> I've also noticed it with modules like that one that use >> BaseModuleActivator, but also HTML Form Entry which uses the old Activator >> interface. >> >> Haven't been able to figure out why yet... >> >> -- >> >> *Dr Rowan Seymour** >> Partners In Health, Rwanda* >> Tel: +250783835665 >> >> ------------------------------ >> Click here to >> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from >> OpenMRS Developers' mailing list > > > ------------------------------ > Click here to > unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from > OpenMRS Developers' mailing list > _________________________________________ To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [email protected] with "SIGNOFF openmrs-devel-l" in the body (not the subject) of your e-mail. [mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

