[Building Sakai] getting the CalendarService
Nicola Monat-Jacobs
nicola at longsight.com
Wed Aug 18 16:54:01 PDT 2010
Hi All -
I am working on SAK-12905, and I'm trying to access the CalendarService in order to create a calendar event.
For the initial proof-of-concept stages, I'm trying to get the CalendarService via the ComponentManger as detailed in this Confluence doc:
http://confluence.sakaiproject.org/display/BOOT/Using+the+Sakai+ComponentManager+to+access+Sakai+Services
But I keep getting this error message:
2010-08-18 16:43:01,935 WARN http-8080-Processor23 org.sakaiproject.component.impl.SpringCompMgr - get(org.sakaiproject.calendar.api.CalendarService):
org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'org.sakaiproject.calendar.api.CalendarService' must be of type [org.sakaiproject.calendar.api.CalendarService], but was actually of type [org.sakaiproject.calendar.impl.DbCalendarService]
Hints?
Here's the code snippet:
CalendarEdit calendar = null;
CalendarService calendarService = (CalendarService) ComponentManager.get(CalendarService.class);
try {
siteid = assessmentService.getAssessmentSiteId(assessmentSettings.getAssessmentId().toString());
String calId = "/calendar/calendar/"+ siteid +"/main";
calendar = calendarService.editCalendar(calId);
} catch (Exception e) {
log.warn(this + ":sendToCalendar " + e.getMessage());
}
Thanks!
- Nicola
More information about the sakai-dev
mailing list