[Building Sakai] Using AssignmentService

Robert Sanfeliu Prat rsprat at gmail.com
Tue Jun 28 02:48:52 PDT 2011


Hi all,
I'm trying to develop a tool that will automatically add new assignments to
the assignment tool, but I'm facing some problems.
In fact I haven't been able to get an instance of assignmentService to work
with.

I declare a my  application bean like that:

 <bean id="projecttrackerApplication"
class="org.sakaiproject.projecttracker.tool.ProjecttrackerApplication">
     <property name="toolManager"
ref="org.sakaiproject.tool.api.ToolManager" />
     <property name="userDirectoryService"
ref="org.sakaiproject.user.api.UserDirectoryService" />
<property name="assignmentService"
 ref="org.sakaiproject.assignment.api.AssignmentService" />
</bean>

and then in the ProjecttrackerApplication.java i have:

private AssignmentService assignmentService;

public AssignmentService getAssignmentService() {
return assignmentService;
}

public void setAssignmentService(AssignmentService assignmentService) {
this.assignmentService = assignmentService;
}


But when I start up sakai I get the following error:

 ERROR main org.springframework.web.context.ContextLoader - Context
initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'projecttrackerApplication' defined in ServletContext resource
[/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested
exception is org.springframework.beans.TypeMismatchException: Failed to
convert property value of type
[org.sakaiproject.assignment.impl.DbAssignmentService] to required type
[org.sakaiproject.assignment.api.AssignmentService] for property
'assignmentService'; nested exception is java.lang.IllegalArgumentException:
Cannot convert value of type
[org.sakaiproject.assignment.impl.DbAssignmentService] to required type
[org.sakaiproject.assignment.api.AssignmentService] for property
'assignmentService': no matching editors or conversion strategy found


Any ideas of what I'm doing wrong?


Thank you very much for your help.

-- 
Atentament:
Robert Sanfeliu Prat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20110628/a12e1960/attachment.html 


More information about the sakai-dev mailing list