[Building Sakai] spring beans with job

Gary Seibold gseibold at bumail.bradley.edu
Fri Mar 20 06:52:21 PDT 2009


I have a tool using course management functions that is working.  When  
I try to convert this over to a Job, I get the error following error:

ERROR: Job DEFAULT.Update Official Course Sites threw an unhandled  
Exception:  (2009-03-19 14:17:14,659  
QuartzScheduler_Worker-1_org.quartz.core.JobRunShell)
org.springframework.beans.factory.BeanCreationException: Error  
creating bean with name 'courseManagementService' defined in file [/ 
usr/local/tomcat/components/test/WEB-INF/application-context- 
test.xml]: Cannot create inner bean  
'org 
.sakaiproject 
.coursemanagement.impl.CourseManagementServiceFederatedImpl#f57993' of  
type  
[org 
.sakaiproject 
.coursemanagement.impl.CourseManagementServiceFederatedImpl] while  
setting bean property 'target'; nested exception is  
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot  
find class  
[org 
.sakaiproject 
.coursemanagement.impl.CourseManagementServiceFederatedImpl] for bean  
with name  
'org 
.sakaiproject 
.coursemanagement.impl.CourseManagementServiceFederatedImpl#f57993'  
defined in file [/usr/local/tomcat/components/test/WEB-INF/application- 
context-test.xml]; nested exception is  
java.lang.ClassNotFoundException:  
org 
.sakaiproject.coursemanagement.impl.CourseManagementServiceFederatedImpl
Caused by:
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot  
find class  
[org 
.sakaiproject 
.coursemanagement.impl.CourseManagementServiceFederatedImpl] for bean  
with name  
'org 
.sakaiproject 
.coursemanagement.impl.CourseManagementServiceFederatedImpl#f57993'  
defined in file [/usr/local/tomcat/components/test/WEB-INF/application- 
context-test.xml]; nested exception is  
java.lang.ClassNotFoundException:  
org 
.sakaiproject.coursemanagement.impl.CourseManagementServiceFederatedImpl
Caused by:
java.lang.ClassNotFoundException:  
org 
.sakaiproject.coursemanagement.impl.CourseManagementServiceFederatedImpl
.
.
.


  What did I miss in the transition?  Where do I find  
"CourseManagementServiceFederatedImpl"?

I am using Sakai 2.5.1.  I have beans defined in /usr/local/tomcat/ 
components/test/WEB-INF/application-context-test.xml as:

	<bean id="courseManagementService" parent="cmTxTemplate">
         <property name="target">
             <bean  
class 
= 
"org 
.sakaiproject 
.coursemanagement.impl.CourseManagementServiceFederatedImpl">
             	<property name="implList">
             		<!-- List the implementations here, in descending order  
of authority -->
             		<list>
			            <!--
			            	For testing, we use an impl that returns no data.
			            	Replace this sample chained impl with your custom  
impl, if any.
			            -->
			            <bean  
class 
= 
"org 
.sakaiproject 
.coursemanagement.impl.CourseManagementServiceSampleChainImpl"/>

             			<!-- The internal, hibernate-backed implementation -->
						<bean  
class 
= 
"org 
.sakaiproject 
.coursemanagement.impl.CourseManagementServiceHibernateImpl">
							<property name="sessionFactory"><ref bean="cmSessionFactory"/></ 
property>
						</bean>
					</list>
             	</property>
             </bean>
         </property>
	</bean>

I don't understand why the same code and xml  word as a tool but is  
not as a Job.  Ideas?
----------------------------------------------------------



More information about the sakai-dev mailing list